Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52201 - can't compile apache 1.3.31. complains about db
Summary: can't compile apache 1.3.31. complains about db
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Highest major (vote)
Assignee: Chuck Short (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-27 10:16 UTC by Rob
Modified: 2004-09-25 16:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2004-05-27 10:16:38 UTC
I'm trying to compile apache 1.3.31 and I'm getting the following error:

In file included from mod_rewrite.c:50:
mod_rewrite.h:90:18: ndbm.h: No such file or directory
gcc -shared  -o mod_access.so mod_access.lo -L/usr/lib -lm -lcrypt -ldb-4.0 -lmm -lexpat -lpthread
gcc -c  -I../../os/unix -I../../include  -mcpu=i686 -O3 -pipe -mmmx -DHARD_SERVER_LIMIT=512             -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET=\"apache\" -DHAVE_SET_DUMPABLE -I/usr/include/db4 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI -DEAPI_MM `../../apaci` -fpic -DSHARED_MODULE mod_auth.c && mv mod_auth.o mod_auth.lo
gcc -shared  -o mod_auth.so mod_auth.lo -L/usr/lib -lm -lcrypt -ldb-4.0 -lmm -lexpat -lpthread
gcc -c  -I../../os/unix -I../../include  -mcpu=i686 -O3 -pipe -mmmx -DHARD_SERVER_LIMIT=512             -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET=\"apache\" -DHAVE_SET_DUMPABLE -I/usr/include/db4 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI -DEAPI_MM `../../apaci` -fpic -DSHARED_MODULE mod_auth_anon.c && mv mod_auth_anon.o mod_auth_anon.lo
gcc -shared  -o mod_auth_anon.so mod_auth_anon.lo -L/usr/lib -lm -lcrypt -ldb-4.0 -lmm -lexpat -lpthread
gcc -c  -I../../os/unix -I../../include  -mcpu=i686 -O3 -pipe -mmmx -DHARD_SERVER_LIMIT=512             -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET=\"apache\" -DHAVE_SET_DUMPABLE -I/usr/include/db4 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI -DEAPI_MM `../../apaci` -fpic -DSHARED_MODULE mod_auth_dbm.c && mv mod_auth_dbm.o mod_auth_dbm.lo
mod_rewrite.c: In function `lookup_map_dbmfile':
mod_rewrite.c:3024: error: `DBM' undeclared (first use in this function)
mod_rewrite.c:3024: error: (Each undeclared identifier is reported only once
mod_rewrite.c:3024: error: for each function it appears in.)
mod_rewrite.c:3024: error: `dbmfp' undeclared (first use in this function)
mod_rewrite.c:3025: error: `datum' undeclared (first use in this function)
mod_rewrite.c:3025: error: parse error before "dbmkey"
mod_rewrite.c:3030: error: `dbmkey' undeclared (first use in this function)
mod_rewrite.c:3033: error: `dbmval' undeclared (first use in this function)
make[4]: *** [mod_rewrite.so] Error 1
make[4]: *** Waiting for unfinished jobs....
gcc -shared  -o mod_auth_dbm.so mod_auth_dbm.lo -L/usr/lib -lm -lcrypt -ldb-4.0 -lmm -lexpat -lpthread
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/var/tmp/portage/apache-1.3.31/work/apache_1.3.31/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/var/tmp/portage/apache-1.3.31/work/apache_1.3.31'
make: *** [build] Error 2

!!! ERROR: net-www/apache-1.3.31 failed.
!!! Function src_compile, Line 109, Exitcode 2
!!! compile problem


------------------------------------------------------------------------------
I tried recompiling db-4.0 and gdbm-1.8 but still doesn't work.  Any ideas?

Reproducible: Always
Steps to Reproduce:
1. emerge -vu apache
2.
3.

Actual Results:  
compile error.

Expected Results:  
compile succesfully.
Comment 1 Rob 2004-05-27 10:18:43 UTC
BTW, ndbm.h exists in /usr/include/gdbm/
Comment 2 Minati jean michel 2004-05-27 14:10:14 UTC
I can't reproduce the problem.
can you please give more infos ? like emerge info's output,and version of db and gdbm.
Comment 3 Minati jean michel 2004-05-27 14:11:07 UTC
oops I didn t saw that you gave gdbm and db version, sorry :)
Comment 4 Rob 2004-05-27 16:21:33 UTC
Does ndbm.h exist in the same directory as I have it?  I think if it can find ndbm.h then the compile will work.  Note that i'm not sure if the problem is with db or with gdbm, but I'm leaning towards the latter.
Comment 5 Chuck Short (RETIRED) gentoo-dev 2004-05-28 02:41:19 UTC
Try upgrading to gdbm-1.8.3.
Comment 6 Rob 2004-05-28 11:09:51 UTC
I can't emerge gdbm-1.8.3 because it's been masked in /usr/portage/profiles/package.mask.  Please advise.
Comment 7 Chuck Short (RETIRED) gentoo-dev 2004-05-29 11:16:12 UTC
cd /usr/portage/sys-libs/gdbm
emerge gdbm-1.8.3.ebuild
Comment 8 Rob 2004-05-29 12:57:46 UTC
Ok, I emerged gdbm-1.8.3 and then apache-1.3.31.  That works.  Thanks!  So if apache-1.3.31 is to be marked stable so should gdbm-1.8.3.  Also apache-1.3.31 should have a requirement in the ebuild for >=gdbm-1.8.3.
Comment 9 Rob 2004-05-30 12:15:48 UTC
Alright this is getting serious.  I now can't emerge mod_ssl-2.8.17.  Here's the log:

Calculating dependencies ...done!
>>> emerge (1 of 1) net-www/mod_ssl-2.8.17 to /
>>> md5 src_uri ;-) mod_ssl-2.8.17-1.3.31.tar.gz
>>> Unpacking source...
>>> Unpacking mod_ssl-2.8.17-1.3.31.tar.gz to /var/tmp/portage/mod_ssl-2.8.17/work
>>> Source unpacked.
Configuring mod_ssl/2.8.17 for Apache/1.3.31
 + Apache location: /usr (Version 1.3.31)
 + Configuring SSL module inside pkg.sslmod
      + SSL interface: mod_ssl/2.8.17
      + SSL interface build type: DSO
      + SSL interface compatibility: disabled
      + SSL interface experimental code: disabled
      + SSL interface conservative code: disabled
      + SSL interface vendor extensions: disabled
      + SSL library path: [SYSTEM]
      + SSL library version: OpenSSL 0.9.7d 17 Mar 2004
      + SSL library type: installed package (system-wide)
 + Creating Makefile in pkg.sslmod
make[1]: Entering directory `/var/tmp/portage/mod_ssl-2.8.17/work/mod_ssl-2.8.17-1.3.31/pkg.sslmod'
gcc -c  -I/usr/include/apache -mcpu=i686 -O3 -pipe -mmmx -DHARD_SERVER_LIMIT=512                -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET="apache" -DHAVE_SET_DUMPABLE -DNO_DBM_REWRITEMAP -I/usr/include/db4 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI -DEAPI_MM -fpic -DSHARED_MODULE -DSSL_ENGINE -DMOD_SSL_VERSION=\"2.8.17\" mod_ssl.c && mv mod_ssl.o mod_ssl.lo
In file included from mod_ssl.c:65:
mod_ssl.h:349:18: ndbm.h: No such file or directory
make[1]: *** [mod_ssl.lo] Error 1
make[1]: Leaving directory `/var/tmp/portage/mod_ssl-2.8.17/work/mod_ssl-2.8.17-1.3.31/pkg.sslmod'
make: [all] Error 2 (ignored)

>>> Install mod_ssl-2.8.17 into /var/tmp/portage/mod_ssl-2.8.17/image/ category net-www
install: cannot stat `pkg.sslmod/libssl.so': No such file or directory
man:
prepallstrip:
strip: 
strip: 
>>> Completed installing into /var/tmp/portage/mod_ssl-2.8.17/image/

>>> Merging net-www/mod_ssl-2.8.17 to /
--- /usr/
--- /usr/lib/
--- /usr/lib/apache-extramodules/
--- /usr/lib/ssl/
--- /usr/lib/ssl/mod_ssl/
>>> /usr/lib/ssl/mod_ssl/cca.sh
>>> /usr/lib/ssl/mod_ssl/gid-mkcert.sh
>>> /usr/lib/ssl/mod_ssl/sign.sh
...



Says can't find ndbm.h.  So mod_ssl-2.8.17 is incompatible with gdbm-1.8.3 but apache-1.3.31 is incompatible with gdbm-1.8.0?  The worst part about this one is the ebuild of mod_ssl continues and thinks it's completed successfully.  There is a real bad dependancy problem here.  Upgrading priority of bug.
Comment 10 Tom P. 2004-06-03 10:50:53 UTC
I have a box that was able to duplicate the original bug and another box that the compile worked fine.  I did some digging and searching and noticed bug 48456 and that said "The apache modules have compiled against db4.x header files, but have linked with the db1.x shared library". This got me thinking and noticed that sys-libs/db 1.85-r1 was not installed on the box with the failed compile, and was installed on the sucessful compile....

It turns out the use flag berkdb was removed for `some reason` on the broken compile box.  Reset the berkdb use flag, emerged the stable gdbm which pulled in db 1.85, and now apache compiled!

rwchin - do you have the berkdb use flag set?  Does your system have sys-libs/db1.85-r1 installed? 
Comment 11 Rob 2004-06-03 14:30:05 UTC
No, I do not have db-1.85-r1 installed or do I have the berkdb use flag set.  I should not need to have this set if the apache or mod_ssl ebuilds don't explicitely depend on them.  If there is an explicit dependency it should be put in the ebuild.
Comment 12 Chuck Short (RETIRED) gentoo-dev 2004-06-03 18:36:39 UTC
Please post emerge --info

Thanks
Comment 13 Rob 2004-06-03 23:43:24 UTC
sure. here's my emerge info

Portage 2.0.50-r7 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-gentoo)
=================================================================
System uname: 2.6.5-gentoo i686 Celeron (Mendocino)
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-mcpu=i686 -O3 -pipe -mmmx"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu/ http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X apm crypt cups foomaticdb gdbm gif gpm imap imlib innodb jpeg kde ldap libwww mad maildir mysql ncurses pam pdflib pic png qt readline samba ssl svga tcpd truetype x86 xml xml2 zlib"

Comment 14 Rob 2004-06-04 12:20:33 UTC
I rebuilt gdbm-1.8.3 but also enabling berkdb this time and I was successful in building mod_ssl.  However it still doesn't work because I get the following error:

rae conf.d # /etc/init.d/apache start
 * Starting apache...
Syntax error on line 63 of /etc/apache/conf/apache.conf:
Cannot load /etc/apache/extramodules/libssl.so into server: /etc/apache/extramodules/libssl.so: undefined symbol: dbm_firstkey                            [ !! ]


gdbm-1.8.3 required db-1.85-r1 which I think is the problem.  Either the wrong headers were used or libssl.so linked to the wrong version of db.  I have db-1.85, db-4.0, and db-4.1 on my machine.

Here's a file listing:
rae lib # ls -al libdb*
-r--r--r--  1 root root  944362 May 25 15:57 libdb-4.0.a
-r--r--r--  1 root root     703 May 25 15:57 libdb-4.0.la
-r-xr-xr-x  1 root root  759295 May 25 15:57 libdb-4.0.so
-rw-r--r--  1 root root 1089172 May 25 15:34 libdb-4.1.a
-rw-r--r--  1 root root     703 May 25 15:34 libdb-4.1.la
-rwxr-xr-x  1 root root  797776 May 25 15:34 libdb-4.1.so
lrwxr-xr-x  1 root root      11 May 25 15:57 libdb.a -> libdb-4.1.a
lrwxr-xr-x  1 root root      12 May 25 15:57 libdb.so -> libdb-4.1.so
lrwxrwxrwx  1 root root      11 Jun  4 12:02 libdb.so.2 -> libdb1.so.2
-rw-r--r--  1 root root  895834 Jun  4 12:02 libdb1.a
lrwxrwxrwx  1 root root      11 Jun  4 12:02 libdb1.so -> libdb1.so.2
-rwxr-xr-x  1 root root   58080 Jun  4 12:02 libdb1.so.2
-r--r--r--  1 root root 1023918 May 25 15:57 libdb_cxx-4.0.a
-r--r--r--  1 root root     731 May 25 15:57 libdb_cxx-4.0.la
-r-xr-xr-x  1 root root  827278 May 25 15:57 libdb_cxx-4.0.so
-rw-r--r--  1 root root 1187518 May 25 15:34 libdb_cxx-4.1.a
-rw-r--r--  1 root root     731 May 25 15:34 libdb_cxx-4.1.la
-rwxr-xr-x  1 root root  864844 May 25 15:34 libdb_cxx-4.1.so
lrwxr-xr-x  1 root root      15 May 25 15:57 libdb_cxx.a -> libdb_cxx-4.1.a
lrwxr-xr-x  1 root root      16 May 25 15:57 libdb_cxx.so -> libdb_cxx-4.1.so

Comment 15 Rob 2004-06-04 12:21:10 UTC
I rebuilt gdbm-1.8.3 but also enabling berkdb this time and I was successful in building mod_ssl.  However it still doesn't work because I get the following error:

rae conf.d # /etc/init.d/apache start
 * Starting apache...
Syntax error on line 63 of /etc/apache/conf/apache.conf:
Cannot load /etc/apache/extramodules/libssl.so into server: /etc/apache/extramodules/libssl.so: undefined symbol: dbm_firstkey                            [ !! ]


gdbm-1.8.3 required db-1.85-r1 which I think is the problem.  Either the wrong headers were used or libssl.so linked to the wrong version of db.  I have db-1.85, db-4.0, and db-4.1 on my machine.

Here's a file listing:
rae lib # ls -al libdb*
-r--r--r--  1 root root  944362 May 25 15:57 libdb-4.0.a
-r--r--r--  1 root root     703 May 25 15:57 libdb-4.0.la
-r-xr-xr-x  1 root root  759295 May 25 15:57 libdb-4.0.so
-rw-r--r--  1 root root 1089172 May 25 15:34 libdb-4.1.a
-rw-r--r--  1 root root     703 May 25 15:34 libdb-4.1.la
-rwxr-xr-x  1 root root  797776 May 25 15:34 libdb-4.1.so
lrwxr-xr-x  1 root root      11 May 25 15:57 libdb.a -> libdb-4.1.a
lrwxr-xr-x  1 root root      12 May 25 15:57 libdb.so -> libdb-4.1.so
lrwxrwxrwx  1 root root      11 Jun  4 12:02 libdb.so.2 -> libdb1.so.2
-rw-r--r--  1 root root  895834 Jun  4 12:02 libdb1.a
lrwxrwxrwx  1 root root      11 Jun  4 12:02 libdb1.so -> libdb1.so.2
-rwxr-xr-x  1 root root   58080 Jun  4 12:02 libdb1.so.2
-r--r--r--  1 root root 1023918 May 25 15:57 libdb_cxx-4.0.a
-r--r--r--  1 root root     731 May 25 15:57 libdb_cxx-4.0.la
-r-xr-xr-x  1 root root  827278 May 25 15:57 libdb_cxx-4.0.so
-rw-r--r--  1 root root 1187518 May 25 15:34 libdb_cxx-4.1.a
-rw-r--r--  1 root root     731 May 25 15:34 libdb_cxx-4.1.la
-rwxr-xr-x  1 root root  864844 May 25 15:34 libdb_cxx-4.1.so
lrwxr-xr-x  1 root root      15 May 25 15:57 libdb_cxx.a -> libdb_cxx-4.1.a
lrwxr-xr-x  1 root root      16 May 25 15:57 libdb_cxx.so -> libdb_cxx-4.1.so

Comment 16 Tom P. 2004-06-04 20:13:44 UTC
Sorry, I don't have mod_ssl for now.  If I were you I might try going back to stable gdbm 1.8.0-r5, and unmerging the unstable 1.8.5, seems to me upgrading was for debugging mostly.  Staying with the stable series might help since we found the original apache compile bug.
Comment 17 Chuck Short (RETIRED) gentoo-dev 2004-06-06 10:16:36 UTC
Can you do a ls of /usr/include/db1 please?

Thanks
Comment 18 Chuck Short (RETIRED) gentoo-dev 2004-06-06 19:34:41 UTC
Fixed in cvs. I was able to reproduce the error. You need to install db-1.85-r1. I have updated the dependencies in the apache ebuilds. Thanks for the bug report.
Comment 19 Rob 2004-06-07 10:03:51 UTC
ok, but does this fix the problem I'm having with mod_ssl?  Thanks.
Comment 20 Rob 2004-06-09 10:19:09 UTC
I emerged back the stable gdbm-1.8.0 and was able to get mod_ssl working again.  And the apache compile bug is also fixed too.  Thanks to everybody's hard work in solving this problem!
Comment 21 Mikael Magnusson 2004-09-25 16:09:29 UTC
maybe the depend should be for =sys-libs/db-1.85* instead of specifically -r1 now that -r2 is out, portage keeps switching between those two versions now.