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

Trouble linking to a local built BerkeleyDB

From: Mukund <mukund_at_tessna.com>
Date: 2003-12-29 23:18:57 CET

Hi all

I have a SMP machine with Red Hat Linux 9, and its system installed
Berkeley DB version db4-4.0.14-20. I had been running Subversion 0.33.1
so far.

I decided to build Subversion 0.35.1 and upgrade to it. Due to a
recommendation by the Subversion team to use a newer version of Berkeley
DB, I built and installed Berkeley DB 4.2.52 in the prefix /usr/local/db4
according to its build instructions. I put /usr/local/db4/lib at the end
of /etc/ld.so.conf and ran ldconfig after the make install.

Subversion's configure wanted Apache httpd's apr-util to use the same BDB
as itself, so I built Apache httpd 2.0.48 and Subversion 0.35.1 with the
following commands:

tar xvfz httpd-2.0.48.tar.gz
cd httpd-2.0.48/
./configure --prefix=/usr/local/apache --enable-so --enable-ssl
    --enable-rewrite --enable-speling --enable-auth-digest --enable-auth-dbm
    --enable-mime --enable-negotiation --enable-usertrack --enable-unique-id
    --with-mpm=prefork --with-berkeley-db=/usr/local/db4 --enable-dav
    --enable-dav-fs --enable-deflate
# Had to patch build/config_vars.mk to add -I/usr/kerberos/include
# for the mod_ssl build
gmake
gmake install
cd ..

tar xvfz subversion-0.35.1.tar.gz
cd subversion-0.35.1/
./configure --with-swig=/usr/local/swig --with-zlib
    --disable-mod-activation --with-apxs=/usr/local/apache/bin/apxs
    --with-apr=/usr/local/apache --with-apr-util=/usr/local/apache --with-ssl
gmake
gmake install
gmake swig-py
gmake install-swig-py

Please ignore the --disable-mod-activation part (I have it already
activated in the httpd.conf file).

Now, Subversion seems to run okay, but it's linking against both
/lib/libdb-4.0.so and /usr/local/db4/lib/libdb-4.2.so.

[root@gateway root]# ldd /usr/local/apache/bin/httpd | grep "libdb"
        libdb-4.2.so => /usr/local/db4/lib/libdb-4.2.so (0x40184000)
[root@gateway root]#

[root@gateway root]# ldd /usr/local/bin/svn | grep "libdb"
        libdb-4.2.so => /usr/local/db4/lib/libdb-4.2.so (0x40104000)
        libdb-4.0.so => /lib/libdb-4.0.so (0x4054b000)
[root@gateway root]#

[root@gateway root]# ldd /usr/local/lib/libsvn_fs-1.so.0.0.0 | grep "libdb"
        libdb-4.0.so => /lib/libdb-4.0.so (0x4007d000)
        libdb-4.2.so => /usr/local/db4/lib/libdb-4.2.so (0x401ed000)
[root@gateway root]#

[root@gateway root]# ldd /usr/local/lib/libsvn_swig_py-1.so.0.0.0 | grep "libdb"
        libdb-4.0.so => /lib/libdb-4.0.so (0x40066000)
        libdb-4.2.so => /usr/local/db4/lib/libdb-4.2.so (0x401d6000)
[root@gateway root]#

---
Creating a repository with svnadmin and using it with mod_dav_svn seems
to work, but I don't know which version of BDB is being used.
ViewCVS 1.0-dev doesn't work. I get the following message:
An Exception Has Occurred
Python Traceback
Traceback (most recent call last):
  File "/usr/local/viewcvs-1.0-dev/lib/viewcvs.py", line 2722, in main
    request.run_viewcvs()
  File "/usr/local/viewcvs-1.0-dev/lib/viewcvs.py", line 257, in
run_viewcvs
    self.rootpath, rev)
  File "/usr/local/viewcvs-1.0-dev/lib/vclib/svn/__init__.py", line 268,
in __init__
    self.repos = repos.svn_repos_open(rootpath, self.pool)
SubversionException: ('bad database version: compiled with 4.2.52,
running against 4.0.14', 160000)
Can anyone tell me how to fix this and verify that Berkeley DB 4.2.52 is
actually being used?
Mukund

  • application/pgp-signature attachment: stored
Received on Mon Dec 29 23:19:32 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.