[mod_python] mod_python-3.2.8 vs python2.4 _bsddb problems

Graham Dumpleton grahamd at dscpl.com.au
Sun Mar 12 01:17:02 EST 2006

On 12/03/2006, at 6:35 AM, Emlyn Jones wrote:

> Hello,
> I'm trying to upgrade mod_python to version 3.2.8 using Python2.4.
> The first attempt failed with "no module _bsddb", which I solved by
> downloading the bsddb libraries and rebuilding python (had to modify
> Modules/Setup manually, is that correct?).
> Anyway, now I can import _bsddb from the Python interpreter but I get a
> segmentation fault when using mod_python.
> The only funny when building mod_python was that first off it 
> complained about
> not finding db- (note the -). I had to manually add DBLIBVER to 
> src/Makefile,
> which must mean something else went wrong but I can't work out what.
> My question is (are):
> i)Can I run mod_pythons without the bsddb dependency? (Surely if it's 
> not built
> be default it must be possible to use mod_python without it?)
> ii)If not, what magic am I missing to make it play nice with bsddb 
> enabled? I
> sure something should of made that Makefile correctly.
> Any pointers greatfully received.

What you are describing doesn't quite make any sense. The mod_python C
source code itself doesn't use Berkley database so there shouldn't be 
mention of 'db-' in src/Makefile. The only possibility is that you have
a strange Apache or Python installation where the library is mentioned
in the flags for building them and mod_python has included the bogus
flags in its build.

One thing to look at is the contents of:


I haven't specified the full path as it will depend on your Python
installation. The "config" directory is a subdirectory of your
"site-packages" directory though.

The mod_python installation will grab from that file flags which it 
in its own build. If the flags in that makefile references "db-" and
"DBLIBVER" that at least means you know where it came from.

The problem is that unless Python was built in a strange way with 
statically linked when they would normally be dynamically loaded, those
flags shouldn't be there.

Anyway, that is one avenue to investigate. I can't suggest much else
without seeing where in the build process for mod_python you were 
errors, what the errors were exactly and that section of src/Makefile
you had to modify which mentioned "db-" in the first place.


More information about the Mod_python mailing list