gdbm compatibility between linux and freebsd

bucket79 bucket79 at
Thu Aug 21 10:10:41 CEST 2003

here's a problem
A is redhatlinux and B is freebsd
$uname -a 
Linux xxxxxxxxx 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown

$python -V
Python 2.2.2

$ldd /usr/local/lib/python2.2/lib-dynload/ => /usr/lib/ (0x4000a000) => /lib/i686/ (0x40011000)
 /lib/ => /lib/ (0x80000000)

$uname -a 
FreeBSD 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Aug 18
11:34:38 KST 2003  xxxxxxxxxxxxxxxxxxxxxx i386

$python -V
Python 2.2.3

$ldd /usr/local/lib/python2.2/site-packages/ => /usr/lib/ (0x2815e000) => /usr/local/lib/ (0x28180000)

and the problem is gdbm db file is not compatible between two system
for example
in system A)
>>import gdbm
>>f ="test.db", "c")
>>f["1"] = "first"
and copy this file to freebsd system and try to open this file then it
fails !!
like this
in system B)
>>import gdbm
>>f ="test.db", "r")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
gdbm.error: File read error

and reverse case is also fails. more precisely say in this case python
occurs gdbm FATAL error :(

anyone know what is the casuse of this problem?

More information about the Python-list mailing list