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

References to old db in shared libs and executables

From: Tobias Ringstrom <tori_at_ringstrom.mine.nu>
Date: 2003-03-10 09:45:36 CET

I'm running subversion on a RedHat 7.3 system with a custom built db4 in
/opt/db4. When building subversion, I added --with-berkeley-db=/opt/db4
to configure. This makes subversion build and install fine, but there are
still references to db3 in the libs. This did not seem to be a problem
when running svn and svnadmin, but it did prevent me from running
cvs2svn.py. I did have the db1-devel, db2-devel and db3-devel rpms
installed.

It looks like this:

> ldd /tmp/svn/lib/libsvn_ra_svn-1.so
        libsvn_subr-1.so.0 => /tmp/svn/lib/libsvn_subr-1.so.0 (0x40008000)
        libaprutil-0.so.0 => /tmp/svn/lib/libaprutil-0.so.0 (0x40025000)
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40050000)
        libdb-3.3.so => /lib/libdb-3.3.so (0x40056000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x400e5000)
        libapr-0.so.0 => /tmp/svn/lib/libapr-0.so.0 (0x40104000)
        libm.so.6 => /lib/i686/libm.so.6 (0x40121000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40144000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40171000)
        libdl.so.2 => /lib/libdl.so.2 (0x40186000)
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        libdb-4.0.so => /opt/db4/lib/libdb-4.0.so (0x40189000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

This is only a problem when using the libs directly (e.g. from SWIG). I
guess svn and svnadmin works because db4 comes before db3 in the ldd list
for them.

I solved the problem by removing the db[123]-devel rpms and rebuilding
svn. In order to make a nice bug report and to solve this properly, I
added db3-devel back in, but unfortunately I cannot reproduce the problem.

However, I think that maybe the real problem is that db3 occurs in the ldd
list at all. I *think* it comes from apr-util. I do not understand the
build system, but in svn-config I can find:

LIBS="$(abs_builddir)/neon/src/libneon.la -L/tmp/svn/lib -lssl -lcrypto
-lz -lxml2 -lz -lm -L/home/tori/src/subversion/subversion-0.18.1/apr-util
-laprutil-0 -lgdbm -ldb -lexpat
-L/home/tori/src/subversion/subversion-0.18.1/apr -lapr-0 -lm -lcrypt
-lnsl -ldl -L/opt/db4/lib -ldb "

Here -ldb comes before -L/opt/db4/lib. Looking at the configure log, it
seems to come from apr-util:

...
APR-util Version: 0.9.2
...
looking for berkeley-db includes with -I/opt/db4/include
looking for berkeley-db libs with -L/opt/db4/lib
checking db4/db.h usability... no
checking db4/db.h presence... no
checking for db4/db.h... no
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for db_create in -ldb... yes
checking for lock_get in -ldb... no
checking for Berkeley DB... found db4
  setting APRUTIL_INCLUDES to "-I/opt/db4/include"
  setting APRUTIL_LDFLAGS to "-L/opt/db4/lib"
checking for default DBM... sdbm (default)
  setting APRUTIL_EXPORT_LIBS to "-lgdbm"
  setting APRUTIL_LIBS to "-lgdbm"
  adding "-ldb" to APRUTIL_EXPORT_LIBS
  adding "-ldb" to APRUTIL_LIBS
checking for Expat in /usr... yes
  adding "-lexpat" to APRUTIL_EXPORT_LIBS
  adding "/usr/lib/libexpat.la" to APRUTIL_LIBS

As mentioned before, I uninstalled the db[123]-devel rpms and the problem
is gone, but perhaps someone who understands the build system can
determine if there is a bug in the build system. My guess is that there
is, and that apr-util is the guilty part.

Please let me know if you want me fo file a bug instead.

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 10 09:46:23 2003

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.