It never fails (bsddb retirement in 2.3)

Skip Montanaro skip at pobox.com
Mon May 5 13:46:30 EDT 2003


    Nick> I'm trying to get what I can working, between your suggestion to
    Nick> modify Modules/Setup to enable bsd185 and Skip's recent patch to
    Nick> anydbm (as found on sf.net under the bug I filed).

Note that with my patch modifying Modules/Setup directly won't be necessary.
The bsddb185 module will be built automatically under restricted conditions
(/usr/include/db.h is present and defines HASHVERSION to be 2).  You should
*only* use this setup indirectly via the anydbm.open() function.  Don't use
bsddb185 directly.

    Nick> I am actively looking into adding "install the Sleepycat bsddb
    Nick> libraries", but the documentation is not completely clear. Where
    Nick> should I install these libraries so that they (1) do not interfere
    Nick> with /lib/libdb.a and (2) are automatically found by Python's
    Nick> configure script?

Sleepycat's default installation directory is /usr/local/BerkeleyDB.X.Y
where X and Y are the current major and minor version numbers.  For example,
the current stable version is 4.1.25, so you'd wind up with a populated
/usr/local/BerkeleyDB.4.1 directory.  Python's setup.py is smart enough to
look there and in a number of other places for libraries to link with.  It
also starts its search with the most recent version numbers (4, then 3).

One thing I just realized is that a couple intermediate library versions are
now orphans of sorts.  The new bsddb code will link against DB 3 or 4 (they
export the necessary API), and with my patch the bsddb185 code will link
against DB 1.85.  That leaves DB 1.86 and 2.x, neither of which will be
linked into either module.

Skip





More information about the Python-list mailing list