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
401 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:sourceweb
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 10

Accepted Solution

by:
jeromee earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
It works... with a little tinkering
0
 
LVL 10

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is an explanation of a simple data model to help parse a JSON feed
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now