Monday, August 24, 2009

Problems with Berkeley DB, Apache apr-util, and Subversion

I'm trying to build a recent version of subversion on my server, and ran into the following problem:

I installed Berkeley db-4.7.25, using only --prefix=/usr as a configure parameter, built and installed. No problem.

I then built and installed apache's apr-util, version 1.3.7. I used 'configure --prefix=/usr --with-apr=/usr --with-berkeley-db=/usr as parameters.

Then I tried to configure subversion, version 1.6.3, with configure parameters'--prefix=/usr' '--with-ssl' '--with-apxs=/usr/apache2/bin/apxs' '--enable-shared' '--with-apr-util=/usr/bin/apu-1-config'.

However, I go the following error, despite trying various changes:

configure: WARNING: we have configured without BDB filesystem support

You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL. We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end. You can find the latest version of
Berkeley DB here:
The problem seems to stem from the fact that apu-1-config --libs doesn't list "-ldb-4.7" as a library to be linked with. I did a manual hack in the configure file of subversion to add this. At around line 23435:

LIBS="`$apu_config --ldflags --link-ld` $SVN_DB_LIBS $LIBS -ldb-4.7"

Posting this in case it helps anybody else. By the way, I think the --link-ld flag above is something I added, but that probably wasn't neccessary in the end.

Sigh. Configuring worked, building now, hope it works.