You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Gavin Kistner <ga...@refinery.com> on 2004/03/08 18:32:28 UTC

[users@httpd] Building Apache2 with BerkeleyDB 4.2

Summary:
========================================================
I'm trying to install Apache2 built with Berkeley4.2 (to work as a 
server for SVN). In the SVN FAQ there is a patch to apr-util to fix 
this; I've attempted numerous ways to get it to work. No glory. Help? 
Please?


SLIGHTLY MORE INFORMATION
========================================================
System Details:
350MHz PII, 128MB RAM
Slackware 9.0
BerkeleyDB 4.2.52
HTTPd 2.0.48

I built and installed bdb correctly. (I assume...I followed the 
instructions, received no errors, and now see a full 
/usr/local/BerkeleyDB.4.2/ directory, including a 
/usr/local/BerkeleyDB.4.2/include/db.h file .)

I've tried my apache2 ./configure line before and after the patch 
(http://subversion.tigris.org/db42-support-patch.txt), with only 
--with-dbm=42, only --with-berkeley-db=/usr/local/BerkeleyDB.4.2, and 
with both.

In all 6 cases it fails. A summary of the cases follows, and after that 
is more verbose output with the actual errors (and with probably 
irrelevant content snipped).

At the very end is the full output from when apr-util tries to find it.



ERRORS OVERVIEW
========================================================
# PRE-PATCH, WITH BOTH CONFIGURE PARAMS
APR-util configure fails

# PRE-PATCH, WITH DBM PARAM ONLY
APR-util configure fails

# PRE-PATCH, WITH PATH PARAM ONLY
Full configure completes without error. (APR-util configure starts 
looking for 4.1, not 4.2)
'make' and 'make install' complete without error.
But checking the libdb version, it's using v3.


# POST-PATCH, WITH BOTH CONFIGURE PARAMS
APR-util configure fails

# POST-PATCH, WITH DBM PARAM ONLY
Full configure succeeds.
'make' fails ("libaprutil-0.so: undefined reference to `db_open'")

# POST-PATCH, WITH PATH PARAM ONLY
Full configure completes without error. (APR-util configure starts 
looking for 4.1, not 4.2)
'make' and 'make install' complete without error.
But checking the libdb version, it's using v3.



ERRORS DETAIL
========================================================

root@Frump:/usr/local/src# rm -r httpd-2.0.48
root@Frump:/usr/local/src# xzf _archive/httpd-2.0.48.tar.gz; cd 
httpd-2.0.48/
root@Frump:/usr/local/src/httpd-2.0.48# grep 4.2 
srclib/apr-util/configure
(no output...'4.2' doesn't exist in the pre-patch configure file)


# PRE-PATCH, WITH BOTH CONFIGURE PARAMS
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-dbm=db42 --with-berkeley-db=/usr/local/BerkeleyDB.4.2
    [...snip...]
Configuring Apache Portable Runtime Utility library...

checking for APR-util... reconfig
configuring package in srclib/apr-util now
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for working mkdir -p... yes
APR-util Version: 0.9.5
checking for chosen layout... apr-util
Applying apr-util hints file rules for i686-pc-linux-gnu
checking for APR... yes
   setting CC to "gcc"
   setting CPP to "gcc -E"
   setting CFLAGS to " -g -O2 -Wall -Wmissing-prototypes 
-Wstrict-prototypes -Wmissing-declarations -pthread"
   setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE"
checking for gcc... gcc
    [...snip...]
checking for gdbm.h... yes
checking for gdbm_open in -lgdbm... yes
configure: error: Berkeley DB not found.
configure failed for srclib/apr-util


# PRE-PATCH, WITH DBM PARAM ONLY
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-dbm=db42
    [...snip...]
configure: error: --with-dbm= is an unknown DBM type.
         Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4
configure failed for srclib/apr-util


# PRE-PATCH, WITH PATH PARAM ONLY
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-berkeley-db=/usr/local/BerkeleyDB.4.2
    [...snip...] (no errors, but starts looking for 4.1, not 4.2)

root@Frump:/usr/local/src/httpd-2.0.48# make
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# make install
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# ldd 
/usr/local/apache2/bin/httpd | fgrep libdb
         libdb.so.3 => /lib/libdb.so.3 (0x40048000)



# ....PATCHING....
root@Frump:/usr/local/src/httpd-2.0.48# mv ../db42-support-patch.txt .
root@Frump:/usr/local/src/httpd-2.0.48# patch -p0 
<db42-support-patch.txt
patching file srclib/apr-util/configure
root@Frump:/usr/local/src/httpd-2.0.48# grep 4.2 
srclib/apr-util/configure
     places="std /usr/local/BerkeleyDB.4.2"
   bdb_default_search_lib_names="db-4.2 db4 db"


# POST-PATCH, WITH BOTH CONFIGURE PARAMS
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-dbm=db42 --with-berkeley-db=/usr/local/BerkeleyDB.4.2
    [...snip...]
configure: error: Berkeley db4 not found
configure failed for srclib/apr-util


# POST-PATCH, WITH DBM PARAM ONLY
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-dbm=db42
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# make
    [...snip...]
/usr/local/src/httpd-2.0.48/srclib/apr-util/.libs/libaprutil-0.so: 
undefined reference to `db_open'
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.0.48'
make: *** [all-recursive] Error 1



# POST-PATCH, WITH PATH PARAM ONLY
root@Frump:/usr/local/src/httpd-2.0.48# ./configure --enable-dav=shared 
--enable-dav_fs=shared --enable-expires=shared --enable-deflate=shared 
--enable-rewrite=shared --disable-userdir --enable-maintainer-mode 
--with-berkeley-db=/usr/local/BerkeleyDB.4.2
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# make
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# make install
    [...snip...] (completes successfully)

root@Frump:/usr/local/src/httpd-2.0.48# ldd 
/usr/local/apache2/bin/httpd | fgrep libdb
         libdb.so.3 => /lib/libdb.so.3 (0x40048000)



APR-UTIL OUTPUT
========================================================
The following output is using the patch, and "--with-dbm=db42 
--with-berkeley-db" (with no path specified):

    [...snip...]
checking checking for Berkeley DB 4.2 in the standard places...
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-4.2... no
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 db4... no
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... no
checking checking for Berkeley DB 4.2 in /usr/local/BerkeleyDB.4.2...
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-4.2... no
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 db4... no
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... no
configure: error: Berkeley db4 not found
configure failed for srclib/apr-util

root@Frump:/usr/local/BerkeleyDB.4.2# find . -name 'db*.h'
./include/db.h
./include/db_cxx.h

--
(-, /\ \/ / /\/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org