This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: bsddb does not build with bsddb lib v3.1.
Type: compile error Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: giraffedata, gregory.p.smith, jafo
Priority: low Keywords:

Created on 2007-09-22 23:28 by giraffedata, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
problem_description.txt giraffedata, 2007-09-22 23:28
Messages (3)
msg56093 - (view) Author: Bryan Henderson (giraffedata) Date: 2007-09-22 23:28
There's some inconsistency among the code and documentation as to the 
required level of Berkeley DB.  I don't know what the proper 
resolution, but I'm sure someone familiar with the history of this code 
does.  Something needs to be done to reduce the amount of time it takes 
someone (as it did me) to deal with not having the expected level of 
Berkeley DB installed.

I attached a file with a detailed explanation of my observations.
msg56094 - (view) Author: Sean Reifschneider (jafo) * (Python committer) Date: 2007-09-23 03:54
Bringing attachment inline here:

The Python manual for module 'bsddb'says it requires a Berkeley DB
library 3.3 - 4.4.  But the build tools do not check this.  If that's
the requirement, they should.

Instead, I see in _bsddb.c lots of code explicitly intended for
Berkeley DB < 3.3.  If this code is dead, it probably should be
cleaned out, and whether it is cleaned out or not, comments in
_bsddb.c should indicate what its Berkeley DB level requirement is
(and why).

Indeed, _bsddb.c does not compile for Berkeley DB 3.1 (at least as
installed on my system).  That's because it refers to macro
DB_FAST_STAT even though it does not exist in Berkeley DB before
Release 3.3.  However, other parts of the code are designed to handle
the absence of DB_FAST_STAT in older Berkeley DB, so I just put the
appropriate "if (DBVER >= 33)" in and it compiled.

The next inconsistency is that the 'dbhash' module insists, at run
time, on Berkeley DB version 3.2 or better.  If 'bsddb' must have at
least 3.3, then this check is superfluous.

A bigger problem is that the error message it gives when you don't
have 3.2 or better is the misleading, "correct BerkeleyDB symbols not
found."  What would be better is, "You have Berkeley DB 3.1.  You need
at least 3.2."

FWIW, I removed the check and 'dbhash' worked for my purposes with
Berkeley DB 3.1.

Maybe the documented 3.3 prerequisite is too strong, and it should be
more specific about what doesn't work with older versions.

This all comes from Python 2.5.
msg61565 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-01-23 08:01
BerkeleyDB 3.3 through 4.5 are supported.  4.6 support has been checked
in and 4.7 (not yet released) support is supposedly on its way from
someone at oracle.

Versions older than 3.3 are too difficult (and too buggy) to support. 
You're on your own if you want to use them.

Yes there are many lines of legacy code in _bsddb.c that have the old
3.1 and 3.2 feature ifdefs.  Cleaning them up is very low priority and
would just interfere with other peoples patches.  They will be cleaned
up out of the _bsddb.c module in the python 3000 branch.
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45532
2008-01-23 08:01:52gregory.p.smithsetstatus: open -> closed
assignee: gregory.p.smith
resolution: wont fix
messages: + msg61565
nosy: + gregory.p.smith
2007-09-23 03:54:51jafosetseverity: normal -> minor
title: Berkeley DB prerequisite inconsistent -> bsddb does not build with bsddb lib v3.1.
nosy: + jafo
messages: + msg56094
priority: low
components: + Library (Lib), - Build
2007-09-22 23:28:42giraffedatacreate