[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

swiggy bdb problems.

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-02-26 23:42:12 CET

I'm trying to get python and perl swig bindings built on my stock rh9
system, but encountering some terrible BDB linking confusion.

RH9 comes with db4.0 preinstalled as /lib/libdb-4.0.so. I ignore this,
and hand-compile db4.2 and install into /usr/local/BerkeleyDB.4.2/.
I've adjusted my /etc/ld.so.conf to contain
/usr/local/BerkeleyDB.4.2/lib, just as I recommend to everyone else.
When I compile apache, apr-util finds 4.2 and links to it. When I build
svn's trunk, it gets the BDB4.2 flags from the installed apu-config just

In other words, everything has been just great up till now. Perfect.

After compiling and installing swig-1.3.21, I followed our instructions
to build python and perl swig bindings. I have zero problems building
these things.

But whenever I try to *use* the bindings (either loading the svn modules
into python, or running 'make test' on the perl bindings), I get errors
about conflicts between db4.0 and 4.2.

Here's the python example:

$ ./tools/examples/svnshell.py /usr/local/svn/testrepo
  File "./tools/examples/svnshell.py", line 36, in __init__
    self.fs_ptr = repos.svn_repos_fs(repos.svn_repos_open(path, pool))
libsvn._core.SubversionException: ('Bad database version: compiled with
running against 4.0.14', 160000)

And here's the perl example:

$ make test
t/1repos.....General filesystem error: Bad database version: compiled
with 4.2.52, running against 4.0.14 at t/1repos.t line 18

Using my trusty 'ldd' tool, I see this:

$ ldd /usr/local/lib/svn-python/libsvn/_core.so | grep db
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4010a000)
        libdb-4.0.so => /lib/libdb-4.0.so (0x40111000)
        libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so

...what the? It depends on *both*?? Who on earth is explicitly linking
libdb-4.0? Swig?

I even see the same thing on my installed libsvn_swig_py.so:

$ ldd /usr/local/lib/libsvn_swig_py-1.so | grep db
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40055000)
        libdb-4.0.so => /lib/libdb-4.0.so (0x4005c000)
        libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so

But I *don't* see it on my not-yet-install libsvn_swig_perl.so:

$ ldd subversion/bindings/swig/.libs/libsvn_swig_perl-1.so | grep db
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4002f000)
        libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so

Any clues from build gurus? Swig gurus?

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 26 23:46:18 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.