Berkeley DB and Python version.

Skip Montanaro skip at pobox.com
Thu Feb 6 16:38:29 CET 2003


    Corrado> [How do I create hash version 5 files from 2.1?]

You need to figure out which version of Berkeley DB Apache was linked
against (I'm going to guess 1.85) and rebuild Python 2.1 so that it also
links against that version of the library.

You didn't mention what your platform is, but if you are running Solaris or
Linux you can use the ldd command to find out which shared libraries an
executable or shared library was linked against (Mac OS X has otool, and I'm
sure other OS's have similar utilites available), e.g.:

    % cd /usr/local/apache/bin
    % ldd httpd
            libm.so.6 => /lib/libm.so.6 (0x4002d000)
            libcrypt.so.1 => /lib/libcrypt.so.1 (0x40050000)
            libdb.so.2 => /usr/lib/libdb.so.2 (0x4007e000)
            libdb-3.2.so => /lib/libdb-3.2.so (0x4008c000)
            libperl.so => /usr/lib/perl5/5.6.1/i386-linux/CORE/libperl.so (0x40113000)
            libnsl.so.1 => /lib/libnsl.so.1 (0x401e7000)
            libdl.so.2 => /lib/libdl.so.2 (0x401fd000)
            libc.so.6 => /lib/libc.so.6 (0x40201000)
            libutil.so.1 => /lib/libutil.so.1 (0x4033f000)
            /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

In the above case it appears Apache was linked against a couple different
versions of libdb.  (This version has mod_perl installed.  Who knows what
evil lurked in the hearts of men when they built it? ;-)

    % cd /usr/local/lib/python2.2/lib-dynload/
    % ldd bsddb.so 
            libdb-3.2.so => /lib/libdb-3.2.so (0x4001c000)
            libc.so.6 => /lib/libc.so.6 (0x400a3000)
            /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

So maybe, just maybe, I could do what you want with my version of Python.

Skip





More information about the Python-list mailing list