New submission from Bryan Henderson:

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.

----------
components: Build
files: problem_description.txt
messages: 56093
nosy: giraffedata
severity: normal
status: open
title: Berkeley DB prerequisite inconsistent
type: compile error
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1191>
__________________________________
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.
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to