Solved

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

Posted on 2010-09-02
8
429 Views
Last Modified: 2012-06-27
Hi,

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

use Storable ('retrieve');
retrieve('file.txt');

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/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 331, at ./autobot.pl 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?


Regards,

Peter
0
Comment
Question by:sourceweb
  • 5
  • 3
8 Comments
 

Author Comment

by:sourceweb
ID: 33591745
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.
0
 
LVL 10

Expert Comment

by:jeromee
ID: 33592478
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.
0
 

Author Comment

by:sourceweb
ID: 33594592
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?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:sourceweb
ID: 33595816
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?
0
 
LVL 10

Accepted Solution

by:
jeromee earned 500 total points
ID: 33596432
Do you still have access to a 32-bit Linux? If so, just run the Storable::retrieve on that machine?
0
 

Author Comment

by:sourceweb
ID: 33596491
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...


0
 

Author Closing Comment

by:sourceweb
ID: 33650109
It works... with a little tinkering
0
 
LVL 10

Expert Comment

by:jeromee
ID: 33650763
Glad to hear that, sourceweb!
Thanks for the points.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Call Shell Script from Perl Script 6 134
Advice in Xamarin 21 97
Object Oriented Programming, C#, referencing, scoping. 13 69
storing csv file in table variable in Python 2 27
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question