Storable.pm failing with error Byte order is not compatible at blib/lib/Storable.pm

Discussion in 'Perl Misc' started by arun, Mar 8, 2012.

  1. arun

    arun Guest

    I recently migrated the perl code from SunSolaris to a linux box of
    64 bit .
    After the migration Storable.pm is breaking with the following error.

    Could you please help me in resolving this.

    Error:
    Byte order is not compatible at blib/lib/Storable.pm (autosplit into
    blib/lib/auto/Storable/_retrieve.al) line 324, at testStorable.pl line
    15

    Code:
    #!/usr/local/bin/perl5.6

    use strict;
    use Data::Dumper; $Data::Dumper::Indent = 1;
    use Storable;

    $Storable::interwork_56_64bit = 1;

    my $gNgrpReleaseGraphFile = "usr/local/GRAPH_data";

    my $graph = retrieve( $gNgrpReleaseGraphFile );
    print Data::Dumper($graph);

    Appreciate your response.
    arun, Mar 8, 2012
    #1
    1. Advertising

  2. arun <> writes:
    > I recently migrated the perl code from SunSolaris to a linux box of
    > 64 bit .
    > After the migration Storable.pm is breaking with the following error.
    >
    > Could you please help me in resolving this.
    >
    > Error:
    > Byte order is not compatible at blib/lib/Storable.pm (autosplit into
    > blib/lib/auto/Storable/_retrieve.al) line 324, at testStorable.pl line
    > 15
    >
    > Code:
    > #!/usr/local/bin/perl5.6
    >
    > use strict;
    > use Data::Dumper; $Data::Dumper::Indent = 1;
    > use Storable;
    >
    > $Storable::interwork_56_64bit = 1;
    >
    > my $gNgrpReleaseGraphFile = "usr/local/GRAPH_data";
    >
    > my $graph = retrieve( $gNgrpReleaseGraphFile );
    > print Data::Dumper($graph);
    >
    > Appreciate your response.


    Was the file created on a SPARC machine running Solaris? If so, the
    byte order is not compatible (to Linux on X86*) because SPARC is
    big-endian and x86 little-endian. That's not related to the '64 bit
    data in perl 5.6.0 and 5.6.1' section of the man page despite that
    contains the same error message. You will need to recreate the file on
    the big-endian box using 'Network order' (that is, writing it in
    big-endian and recording 'network [byte] order' in the header) in
    order to be able to read it on the Linux box. It may also be possible
    to just change the header of the file if the Storable 'network byte
    order' serialization isn't really different from a native big-endian
    one.
    Rainer Weikusat, Mar 8, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Durduran
    Replies:
    10
    Views:
    522
    Durduran
    Jul 30, 2007
  2. ntwrkd
    Replies:
    0
    Views:
    219
    ntwrkd
    Apr 4, 2009
  3. Robert Evans
    Replies:
    7
    Views:
    283
    Joel VanderWerf
    Nov 15, 2005
  4. Replies:
    0
    Views:
    134
  5. pantagruel
    Replies:
    0
    Views:
    225
    pantagruel
    Feb 17, 2006
Loading...

Share This Page