When trying to compile BerkeleyDb, since the most recent version of amavisd-new depends on it I'm getting a lot of errors. It starts with this: >>> Source unpacked. Parsing config.in... Looks Good. Checking if your kit is complete... Looks good Writing Makefile for BerkeleyDB cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB) cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm /usr/bin/perl5.8.5 /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -noprototypes -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap BerkeleyDB.xs > BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c gcc -c -I/usr/include -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=athlon -O2 -fomit-frame-pointer -pipe -DVERSION=\"0.25\" -DXS_VERSION=\"0.25\" -fPIC "-I/usr/lib/perl5/5.8.5/i686-linux/CORE" BerkeleyDB.c BerkeleyDB.xs:68:16: db.h: No such file or directory BerkeleyDB.xs:76:2: #error db.h is not for Berkeley DB at all. BerkeleyDB.xs:203: error: syntax error before "DB_ENV" BerkeleyDB.xs:203: warning: no semicolon at end of struct or union If you want the complete list of errors, please ask for it. Though I think the problem is that it can't find db.h. Reproducible: Always Steps to Reproduce: 1. emerge BerkeleyDB Actual Results: Compile errors Expected Results: Compile smoothly.. Portage 2.0.51-r3 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.4.27 i686) ================================================================= System uname: 2.4.27 i686 AMD Duron(tm) Processor Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage" USE="x86 3dnow acpi apache2 berkdb bzlib curl ftp gif imap ipv6 jpeg libwww mbox mmx ncurses nls pam pcre php png posix readline session ssltcpd xml2 zlib"
I think I figured it out. The file "config.in" only searches for "db.h" in "/usr/include" while Gentoo places the files from the db-4.x version in "/usr/include/db4.1/" Modifying "config.in" to search in this directory should do the trick.
The same problem exists for dynamic linking. "DBNAME" in "config.in" should be set to "-ldb-4.1" So the line should look like this: "DBNAME = -ldb-4.1" To be honest, it really surprises me that this hasn't been tested before it was flagged "stable". Especially since amavisd-new depends on it and this is widely used software among servers.
Created attachment 47370 [details] modified config.in This one works for me. Though it should be changed of course when there's a new version of sys-libs/db available.
It's fixed anyway. I re-emerged db and it also created a symbolic link from /usr/include/db.h to the correct file. I guess I emerged it some time ago when this functionality wasn't yet available in the eclass. But it's solved now.