Link to home
Start Free TrialLog in
Avatar of sourceweb
sourcewebFlag for Italy

asked on

Little problem with Perl-program under 64-bit os (Byte order is not compatible at ../../lib/


I have programmed a perl-program that needs to read files with:

use Storable ('retrieve');

Under 32bit Linux this works fine.
Now I want to upgrade to 64bit Linux, but my program says:

Byte order is not compatible at ../../lib/ (autosplit into ../../lib/auto/Storable/ line 331, at ./ line 127

I have searched with Google and people write to use this command to solve the problem:
$Storable::interwork_56_64bit = 1;

But it doesn't work, I tried out this command in many ways, each time the same error.

Does anyone have any idea how to solve this problem?


Avatar of sourceweb
Flag of Italy image


I forgot to say that the program is very important to me :p.

I need it really in the next days. If there is no way to solve this problem I have to use 32bit for the next years.
Is there a way that you could run the retrieve on a 32bit machine, then save the data using Data::Dumper.
Then on the 64bit machine, you can suck the data up from the Data::Dumper file.
Finally, you can save the data on the 64bit-machine using Storable.

Or use Data::Dumper in the future... since it's hardware independent. Caveat: it's slow.
Thanks, now I know that the problem isn't in my program, but it is in the file file.txt.
Can I convert this file using Data::Dumper?

The file.txt isn't a ASCII-coded file, but it is a binary file, coded for 32bit and maybe this makes the problem.
So I have only to convert this one file.

Can someone give me a little howto, how I can convert this binary for 64bit use?
Ah, if I enter the command

file file.txt

there is this output:
perl Storable(v0.7) data (major 2) (minor 4)

I need to convert this file from the 32bit storable to the 64bit storable.

How can I do this?
Avatar of jeromee
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, I have access to about 50 32bit linux server and Storable::retrieve works fine there, but the program in the 64 bit Linux makes Storable::retrieve, too and I can't modify this, so at the end I need a correct storable file for my 64bit os...

It works... with a little tinkering
Glad to hear that, sourceweb!
Thanks for the points.