bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GDBM] On x86 fails to read db created on armel and vice versa


From: Bob Proulx
Subject: Re: [GDBM] On x86 fails to read db created on armel and vice versa
Date: Mon, 24 Mar 2008 16:30:24 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Andreas Schwab wrote:
> Max Lapan <address@hidden> writes:
> > Today I found strange problem with libgdbm, and not sure this is a bug
> > or feature. I have one small program which creates gdbm hash from set
> > of pictures and other program which will enumerate and optionally dump
> > them. When I run both programs on one one platform, they work
> > fine. But when I try to open hash file created on x86 box on armel
> > platform it failed to obtain most of the records. The same error I got
> > when I try to open DB created on armel using x86 box.
> 
> The GDBM on-disk format is architecture dependent, you cannot share it
> between different architectures.

As I understood it the on disk format was native endian.  I have seen
patches (not public ones unfortuantely) that allowed it to adapt
between big endian and little endian.  With that in place it was
possible to share a database between i686 (little endian) and parisc
(big endian).  So it is not strictly impossible.  It just doesn't work
in practice without patching.  :-)

But both armel and x86 are little endian and both are 32-bit as I
recall and so I am a little bit surprised to see a problem show up
between those two.  I would have expected that it *might* work if the
sizes and endianness were the same.  That it doesn't work doesn't
surprise me too much because it wasn't designed to work across
architectures.

Off the top of your head do you know what feature causes the on disk
format to be different on those two architectures?  I am mostly just
curious about armel since I know little about it.  Is the integer
sizes different and therefore causing the binary file to be
incompatible?

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]