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

A

arun

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.
 
R

Rainer Weikusat

arun said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top