Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 95140 - apache-1.3.33 db/gdbm issues
Summary: apache-1.3.33 db/gdbm issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
: 43558 103739 107316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-05 11:07 UTC by Paul de Vrieze (RETIRED)
Modified: 2005-12-04 00:19 UTC (History)
6 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 Paul de Vrieze (RETIRED) gentoo-dev 2005-06-05 11:07:21 UTC
I've tried to install apache-1.3.33 on a fresh 2005.0 stage3. This failed as apache failed to locate ndbm.h. This file is either provided by gdbm (in /usr/include/gdbm/) or by db-1.* in /usr/include/ndbm.h. Patching my CFLAGS fixed the problem, but this should probably be done automatically by the ebuild.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-06-05 11:53:46 UTC
(In reply to comment #0)
> Patching my CFLAGS fixed the problem, but this should probably be done
automatically by the ebuild.

What do you mean? Post emerge --info output, please.
Comment 2 Paul de Vrieze (RETIRED) gentoo-dev 2005-06-05 12:26:58 UTC
What I mean is changing CFLAGS to be CFLAGS="-march=athlon64 -O2
-I/usr/include/gdbm". Other emerge info output is not relevant
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-06-05 12:37:13 UTC
(In reply to comment #2)
> What I mean is changing CFLAGS to be CFLAGS="-march=athlon64 -O2
> -I/usr/include/gdbm". 

Hmm, weird... :/
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2005-06-05 13:21:08 UTC
The problem is that the configure script does not check where to find ndbm.h,
and that db-1.85.h that normally provides /usr/include/ndbm.h is installed
allmost always, but not in a regular stage3 and it does not get pulled in
either. As apache-1 does depend on gdbm (and any db version) it should be
changed to look in /usr/include/gdbm for ndbm.h as that is the correct location
for the header that is intended (linking happens against gdbm)
Comment 5 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-17 18:20:58 UTC
Looking at the DEPEND for apache-1.3.33, I see that we have db in there twice,
as well as gdbm I recall something on one of the lists about a db mess, and
perhaps it being fixed by an eclass somewhere. We should look into this.
Comment 6 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-17 18:21:09 UTC
*** Bug 43558 has been marked as a duplicate of this bug. ***
Comment 7 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-09-17 19:52:11 UTC
*** Bug 103739 has been marked as a duplicate of this bug. ***
Comment 8 gentoo 2005-09-23 15:41:23 UTC
I have run into the same problem - this is a fresh install of 2005.1 on a new server. I have db and gdbm 
installed already but mod_rewrite always fails to build:

gcc -c  -I../../os/unix -I../../include  -O2 -march=pentium4 -pipe -DHARD_SERVER_LIMIT=512              
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET=\"apache\" 
-DHAVE_SET_DUMPABLE -I/usr/include/db4.2 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI 
-DEAPI_MM `../../apaci` -fpic -DSHARED_MODULE mod_alias.c && mv mod_alias.o mod_alias.lo
gcc -shared  -o mod_alias.so mod_alias.lo -L/usr/lib -lm -lcrypt -ldb-4.2 -lmm -lexpat -lgdbm 
-lgdbm_compat -lpthread
gcc -c  -I../../os/unix -I../../include  -O2 -march=pentium4 -pipe -DHARD_SERVER_LIMIT=512              
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLINUX=22 -DTARGET=\"apache\" 
-DHAVE_SET_DUMPABLE -I/usr/include/db4.2 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -DEAPI 
-DEAPI_MM `../../apaci` -fpic -DSHARED_MODULE mod_rewrite.c && mv mod_rewrite.o mod_rewrite.lo
In file included from mod_rewrite.c:50:
mod_rewrite.h:90:18: ndbm.h: No such file or directory
mod_rewrite.c: In function `lookup_map_dbmfile':
mod_rewrite.c:3037: error: `DBM' undeclared (first use in this function)
mod_rewrite.c:3037: error: (Each undeclared identifier is reported only once
mod_rewrite.c:3037: error: for each function it appears in.)
mod_rewrite.c:3037: error: `dbmfp' undeclared (first use in this function)
mod_rewrite.c:3038: error: `datum' undeclared (first use in this function)
mod_rewrite.c:3038: error: syntax error before "dbmkey"
mod_rewrite.c:3046: error: `dbmkey' undeclared (first use in this function)
mod_rewrite.c:3049: error: `dbmval' undeclared (first use in this function)
make[4]: *** [mod_rewrite.so] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/var/tmp/portage/apache-1.3.33-r12/work/apache_1.3.33/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/var/tmp/portage/apache-1.3.33-r12/work/apache_1.3.33'
make: *** [build] Error 2

!!! ERROR: net-www/apache-1.3.33-r12 failed.
!!! Function src_compile, Line 129, Exitcode 2
!!! problem compiling apache
!!! If you need support, post the topmost build error, NOT this status message.


Since Im building a web server, this is a show-stopper for me!

Here is the emerge info:

# emerge --info
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1, 2.6.12-gentoo-r10 i686)
===============================================================
==
System uname: 2.6.12-gentoo-r10 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/
gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://portage.bway.net/gentoo-portage"
USE="x86 apm arts avi berkdb bitmap-fonts crypt eds emboss encode foomaticdb gd gdbm gif 
gstreamer gtk2 imlib ipv6 ithreads jpeg libg++ libwww mad mikmod mmx motif mp3 mpeg mysql 
ncurses nls nptl nptlonly ogg oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl 
spell ssl tcpd threads truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib userland_GNU 
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 9 Paul de Vrieze (RETIRED) gentoo-dev 2005-09-26 02:32:07 UTC
gentoo@bitblit.net: You could try my workaround, or alternatively merge db-1 for
a workaround
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-09-26 15:12:25 UTC
*** Bug 107316 has been marked as a duplicate of this bug. ***
Comment 11 Whit Blauvelt 2005-09-26 15:58:23 UTC
(In reply to comment #9)
> or alternatively merge db-1 

Well, 

 # emerge -p db-1

These are the packages that I would merge, in order:

Calculating dependencies   

!!! Problem in sys-libs/db-1 dependencies.
!!! "Specific key requires an operator (sys-libs/db-1) (try adding an '=')"
exceptions
Comment 12 Whit Blauvelt 2005-09-26 16:08:51 UTC
(In reply to comment #9)
> gentoo@bitblit.net: You could try my workaround

The workaround does the trick.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2005-09-27 02:11:29 UTC
(In reply to comment #11)
>  # emerge -p db-1
> 
> These are the packages that I would merge, in order:
> 
> Calculating dependencies   
> 
> !!! Problem in sys-libs/db-1 dependencies.
> !!! "Specific key requires an operator (sys-libs/db-1) (try adding an '=')"
> exceptions


Your syntax is incorrect, as the error message says. It needs to be

emerge -p db-1*
Comment 14 KARASZI Istvan 2005-09-27 06:08:05 UTC
hello Jakub,

(In reply to comment #13)
> emerge -p db-1*
I had same problem here. and emerge =db-1.85-r2 helped me out. thanks!
Comment 15 Paul de Vrieze (RETIRED) gentoo-dev 2005-09-27 08:53:28 UTC
Of course version numbers can only be used with a comparison operator (=, <, <=,
>, >=), so:
emerge -p =db-1*
Comment 16 gentoo 2005-09-27 15:11:42 UTC
(In reply to comment #9)

> gentoo@bitblit.net: You could try my workaround, or alternatively merge db-1 for
> a workaround

Its a horrible kludge but I figured it is the lesser of two evils! (the other being slotting several versions 
of db - would rather try and keep the slotting down to a minimum).

Still this ought to be fixed :-(
Comment 17 Chris Gianelloni (RETIRED) gentoo-dev 2005-10-17 19:16:28 UTC
I just hit this when trying to install otrs.  At any rate, changing the
>=sys-libs/db-1.85-r1 to ~sys-libs/db-1.85 in the apache ebuild resolved the
issue.  Apache then installed the proper db version, rather than the highest
version for the highest slotted db package, and my build continued.
Comment 18 Paul de Vrieze (RETIRED) gentoo-dev 2005-10-18 04:08:23 UTC
The dependency change by wolf31o2 is not the proper fix as apache can and will
use both if given the opportunity.
Comment 19 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-12-04 00:19:57 UTC
After spending several hours digging into this, I have found the problem to be a
false-positive in the helper script find-dbm-lib. I commented out the false
positive test, and now the script correctly finds the correct include path for
ndbm.h.

These fixes are in apache-1.3.33-r13.