The full error: DBRunRecoveryError: (-30974, 'DB_RUNRECOVERY: Fatal error, run database recovery -- process-private: unable to find environment')+
The test sequence to reproduce the error:
Execute my python 2.6 ...
ho = bsddb.hashopen("/Users/pbld/testdb2",'c')
Works when run on MacOSX 10.7 but gives the above error when run on 10.5.4 ... both are Intel Macs.
Python (2.6.7) and bsddb (4.7.25) were built on the MacOSX 10.7 system using Xcode 4.2.1 as Intel 32 bit binaries with OSX 10.5 as the target version. The 10.5 system has my product installed via our product installer while the 10.7 system is running python and bsddb from the custom location. (I've used some renaming of _bsddb.so to prove which copy on the system is being loaded.)
On the 10.7 system:
pbld-mac-mini-dev:usr pbld$ otool -L lib/python2.6/lib-dynload/_bsddb.so
/cust/usr/lib/BerkeleyDB.4.7/lib/libdb-4.7.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)
The /cust/usr/lib issue is resolved on the 10.5 system using a DYLD_LIBRARY_PATH environment variable, other wise the import bsddb fails.
I've spent 2 days reading python and bsddb source code and don't yet see what might be broken. Obviously, the system libgcc and libSystem.B libraries will be different, but surely stable enough???
(And yes, some minor hacking was needed to get the 32 bit intel build from python and bsddb.)
Suggestions as to where to look would be appreciated.