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

Re: configure fails to find Berkeley DB (subversion 1.0.0)

From: <terry_at_eatoni.com>
Date: 2004-02-29 21:27:57 CET

Thanks for the replies trying to help me get subversion to see
Berkeley DB 4.2. A couple of the things I tried failed, but the last
succeeded. Below is what I did to make it work.

[I don't know if this is related, but after several failures today, I
wound up:

  # echo /usr/local/BerkeleyDB.4.2/lib >> /etc/ld.so.conf
  # ldconfig

I'm not sure if this was important at any later point. Certainly my
earlier problems were unrelated, as configure just plain wasn't yet
equipped to detect db42.]

As far as concrete changes to the FAQ go, someone should probably
confirm that the db42 patch does not work against the 2.0.48 httpd and
I guess update the FAQ.

Thanks again.

--- Attempt 1 ---

The FAQ Eric pointed me to seems to be just what I need. It has a
couple of suggested approaches. Let's take it from the top:

| In the short term, the best thing to do is apply this patch to your
| apr-util's ./configure script -- either to the apr-util in your apache
| tree (if you're building Apache before Subversion), or to the apr-util
| in your Subversion tarball (if you're not building Apache at all.)
| This patch is the new DB 4.2 detection code already in the latest
| apr-util CVS.
| If you've building Apache first, apply the patch to httpd-2.0.48's
| apr-util's configure script, and then build with these options:
| $ configure \
| --enable-dav \
| --enable-so \
| --with-berkeley-db=/usr/local/BerkeleyDB.4.2
| --with-dbm=db42
| You can confirm that Apache is built with the proper BDB libraries
| with the following command:
| $ ldd /usr/local/apache2/bin/httpd | fgrep libdb
| libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so

So let's build apache first. I download httpd-2.0.48.tar.gz and unpack
it. Then I try to apply the patch:

  $ cd httpd-2.0.48
  $ patch < db42-support-patch.txt
  patching file configure
  Hunk #1 FAILED at 13386.
  Hunk #2 FAILED at 27186.
  2 out of 2 hunks FAILED -- saving rejects to file configure.rej

Oops. The patch doesn't work on httpd-2.0.48. I've not dug into this
but I note that the patch file is trying to insert a db42 case into
srclib/apr-util/configure and that grep db42 srclib/apr-util/configure
returns nothing, so the patch is clearly not already in there (as
patch probably would have told me).

--- Attempt 2 ---

David says 1) install Berkeley DB (done), and 2) to install 2.0.48 and
use the following configure line:

  ./configure --prefix=/usr/local/lib/httpd \
  --enable-shared \
  --enable-mods-shared=all \

and make && make install.

Note that this is similar to the above, without using the patch. I
follow the above (though with my own --prefix). The configure run
prints out stuff showing me it hasn't found db42, but I let it go and
do the make && make install. Afterwards, ldd httpd shows me

  libdb.so.2 => /usr/lib/libdb.so.2 (0x2aae7000)

So that hasn't worked either. Nevertheless I do David's step 3 and the
configure of subversion tells me:

  configure: error: APR-UTIL was installed independently, it won't be
  possible to use the specified Berkeley DB: /usr/local/share/BerkeleyDB.4.2

No [Mm]akefile has been produced, so I can't do a make.

--- Attempt 3 ---

The FAQ has another approach.

| If you're not building Apache, apply the patch to the apr-util
| ./configure script in your Subversion tree, and use similar build
| options:
| $ configure \
| --with-berkeley-db=/usr/local/BerkeleyDB.4.2
| --with-dbm=db42
| Again, you can confirm that Subversion was built against the proper
| BDB library with the following:
| $ ldd /usr/local/bin/svn | fgrep libdb
| libdb-4.2.so => /usr/local/BerkeleyDB.4.2/lib/libdb-4.2.so

I unpack the subversion tarball again (btw, I do a fresh unpack of
subversion, httpd etc whenever starting out again). Applying the patch
works fine:

  $ patch -p1 < ../db42-support-patch.txt
  patching file apr-util/configure
  Hunk #1 succeeded at 13688 (offset 302 lines).
  Hunk #2 succeeded at 27788 (offset 602 lines).

I do the configure and it finds db42. The make works, ldd shows me
that db42 is found for both svn and svnserve.

So I think I'm done.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Feb 29 21:27:09 2004

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

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