After performing an emerge sync, then an emerge -uD world, openldap is trying to build but fails to identify berkeley db as a dependency and can't find bdb on the system. The update fails during the configure process. Reproducible: Always Steps to Reproduce: 1. emerge sync 2. emerge openldap 3. profit! Actual Results: root # emerge openldap Calculating dependencies ...done! >>> emerge (1 of 1) net-nds/openldap-2.1.26 to / >>> md5 src_uri ;-) openldap-2.1.26.tgz >>> Unpacking source... >>> Unpacking openldap-2.1.26.tgz to /var/tmp/portage/openldap-2.1.26/work >>> Source unpacked. berkdb * Using Berkeley DB for local backend Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved. Restrictions apply, see COPYRIGHT and LICENSE files. Configuring OpenLDAP 2.1.25-Release ... checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for a BSD compatible install... /bin/install -c checking whether build environment is sane... yes checking for mawk... no checking for gawk... gawk checking whether make sets ${MAKE}... yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... found checking for gnutar... no checking for gtar... no checking for tar... tar checking configure arguments... done checking for a BSD compatible install... /bin/install -c checking for ar... ar checking for Cygwin environment... no checking for mingw32 environment... no checking for EMX OS/2 environment... no checking how to run the C preprocessor... gcc -E checking for gcc... gcc checking whether the C compiler (gcc -mcpu=i686 -O3 -pipe ) works... yes checking whether the C compiler (gcc -mcpu=i686 -O3 -pipe ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for ld used by GCC... /usr/i686-pc-linux-gnu/bin/ld checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r checking for BSD-compatible nm... /usr/bin/nm -B checking for a sed that does not truncate output... /bin/sed checking whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking for object suffix... o checking for executable suffix... no checking command to parse /usr/bin/nm -B output... ok checking for dlfcn.h... yes checking for ranlib... ranlib checking for strip... strip checking for objdir... .libs checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions... yes checking whether the linker (/usr/i686-pc-linux-gnu/bin/ld) supports shared libraries... yes checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking dynamic linker characteristics... GNU/Linux ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for shl_load... no checking for shl_load in -ldld... no checking for dlopen... no checking for dlopen in -ldl... yes checking whether a program can dlopen itself... yes checking whether a statically linked program can dlopen itself... no checking whether -lc should be explicitly linked in... no creating libtool checking whether ln works... yes checking whether ln -s works... (cached) yes checking for perl... /usr/bin/perl checking how to run the C preprocessor... gcc -E checking for Cygwin environment... (cached) no checking for mingw32 environment... (cached) no checking for executable suffix... (cached) no checking for object suffix... (cached) o checking for be_app in -lbe... no checking for gcc option to accept ANSI C... none needed checking for gcc depend flag... -M checking for afopen in -ls... no checking for ltdl.h... yes checking for lt_dlinit in -lltdl... yes checking for EBCDIC... no checking for ANSI C header files... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking for sys/wait.h that is POSIX.1 compatible... yes checking POSIX termios... yes checking whether use of TIOCGWINSZ requires sys/ioctl.h... yes checking for arpa/inet.h... yes checking for arpa/nameser.h... yes checking for assert.h... yes checking for conio.h... no checking for crypt.h... yes checking for direct.h... no checking for errno.h... yes checking for fcntl.h... yes checking for filio.h... no checking for getopt.h... yes checking for grp.h... yes checking for io.h... no checking for libutil.h... no checking for limits.h... yes checking for locale.h... yes checking for netinet/tcp.h... yes checking for malloc.h... yes checking for memory.h... yes checking for psap.h... no checking for pwd.h... yes checking for process.h... no checking for resolv.h... yes checking for sgtty.h... yes checking for shadow.h... yes checking for stddef.h... yes checking for string.h... yes checking for strings.h... yes checking for sysexits.h... yes checking for sys/file.h... yes checking for sys/filio.h... no checking for sys/errno.h... yes checking for sys/ioctl.h... yes checking for sys/param.h... yes checking for sys/resource.h... yes checking for sys/select.h... yes checking for sys/socket.h... yes checking for sys/stat.h... yes checking for sys/syslog.h... yes checking for sys/time.h... yes checking for sys/types.h... yes checking for sys/ucred.h... no checking for sys/uio.h... yes checking for syslog.h... yes checking for termios.h... yes checking for unistd.h... yes checking for winsock.h... no checking for winsock2.h... no checking for dlopen... (cached) no checking for dlopen in -ldl... (cached) yes checking for sigset in -lV3... no checking for winsock... no checking for socket... yes checking for select... yes checking types of arguments for select()... int,fd_set *,struct timeval * checking for regex.h... yes checking for library containing regfree... none required checking for compatible POSIX regex... yes checking for sys/uuid.h... no checking to see if -lrpcrt4 is needed for win32 UUID support... no checking for res_query... no checking for __res_query... no checking for res_query in -lbind... no checking for __res_query in -lbind... no checking for res_query in -lresolv... yes checking for getaddrinfo... yes checking for getnameinfo... yes checking for gai_strerror... yes checking for inet_ntop... yes checking for sys/un.h... yes checking for openssl/ssl.h... yes checking for ssl.h... no checking for SSLeay_add_ssl_algorithms in -lssl... no checking for SSL_library_init in -lssl... yes checking for _beginthread... no checking for pthread.h... yes checking POSIX thread version... 10 checking for LinuxThreads pthread.h... yes checking for GNU Pth pthread.h... no checking for sched.h... yes checking for pthread_create in default libraries... no checking for pthread link with -kthread... no checking for pthread link with -pthread... yes checking for sched_yield... yes checking for pthread_yield... yes checking for thr_yield... no checking for pthread_kill... yes checking for pthread_rwlock_destroy... yes checking for pthread_detach with <pthread.h>... yes checking for pthread_setconcurrency... yes checking for pthread_getconcurrency... yes checking for thr_setconcurrency... no checking for thr_getconcurrency... no checking for pthread_kill_other_threads_np... yes checking for LinuxThreads implementation... yes checking for LinuxThreads consistency... yes checking if pthread_create() works... yes checking if select yields when using pthreads... yes checking for thread specific errno... yes checking for thread specific h_errno... yes checking for ctime_r... yes checking for gethostbyname_r... yes checking for gethostbyaddr_r... yes checking number of arguments of ctime_r... 2 checking number of arguments of gethostbyname_r... 6 checking number of arguments of gethostbyaddr_r... 8 checking for db.h... yes checking for Berkeley DB link (default)... no checking for Berkeley DB link (-ldb42)... no checking for Berkeley DB link (-ldb-42)... no checking for Berkeley DB link (-ldb-4.2)... no checking for Berkeley DB link (-ldb-4-2)... no checking for Berkeley DB link (-ldb41)... no checking for Berkeley DB link (-ldb-41)... no checking for Berkeley DB link (-ldb-4.1)... no checking for Berkeley DB link (-ldb-4-1)... no checking for Berkeley DB link (-ldb-4)... no checking for Berkeley DB link (-ldb4)... no checking for Berkeley DB link (-ldb)... no checking for Berkeley DB link (-ldb3)... no checking for Berkeley DB link (-ldb-3)... no checking for Berkeley DB link (-ldb2)... no checking for Berkeley DB link (-ldb-2)... no checking for Berkeley DB link (-ldb1)... no checking for Berkeley DB link (-ldb-1)... no configure: error: BDB: BerkeleyDB not available !!! ERROR: net-nds/openldap-2.1.26 failed. !!! Function econf, Line 365, Exitcode 1 !!! econf failed Expected Results:
please post your emerge info output.
root # emerge info Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.21) ================================================================= System uname: 2.4.21 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.13 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-mcpu=i686 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/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="-mcpu=i686 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://mirror.tucdemonic.org/gentoo/" MAKEOPTS="-j10" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apache2 apm arts avi berkdb crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde ldap libg++ libwww mad mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline ruby samba sdl slang spell ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib"
hmm, that's really odd. the output of "etcat -v sys-libs/db" please?
There is no such program on my gentoo system.
Additional info: root # emerge -p /usr/portage/sys-libs/db/db-4.1.25_p1-r3.ebuild These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] sys-libs/db-4.1.25_p1-r3 So, db appears to be available.
etcat is part of gentoolkit. emerge that, then run what I said. also, the output of: ls /usr/lib/libdb* please. i'm trying to figure out why openldap isn't finding berkdb.
root # etcat -v sys-libs/db [ Results for search key : sys-libs/db ] [ Candidate applications found : 9 ] Only printing found installed programs. * sys-libs/db : [ I] 1.85-r1 (1) [ ] 3.2.9-r7 (3) [ ] 3.2.9-r9 (3) [M~ ] 3.2.9-r10 (3) [M~ ] 3.3.11 (3) [ I] 4.0.14-r2 (4) [ ] 4.0.14-r3 (4) [ I] 4.1.25_p1-r3 (4.1) [M~ ] 4.2.52_p1 (4.2) root # ls /usr/lib/libdb* /usr/lib/libdb-1.so /usr/lib/libdb-4.1.so /usr/lib/libdb_cxx-3.2.so /usr/lib/libdb_cxx.so /usr/lib/libdb_java.so /usr/lib/libdb-3.2.la /usr/lib/libdb.a /usr/lib/libdb_cxx-3.so /usr/lib/libdb_cxx.so.3 /usr/lib/libdb_tcl-4.0.a /usr/lib/libdb-3.2.so /usr/lib/libdb.so /usr/lib/libdb_cxx-4.0.a /usr/lib/libdb_java-4.0.a /usr/lib/libdb_tcl-4.0.la /usr/lib/libdb-3.so /usr/lib/libdb.so.2 /usr/lib/libdb_cxx-4.0.la /usr/lib/libdb_java-4.0.la /usr/lib/libdb_tcl-4.0.so /usr/lib/libdb-4.0.a /usr/lib/libdb.so.3 /usr/lib/libdb_cxx-4.0.so /usr/lib/libdb_java-4.0.so /usr/lib/libdb_tcl-4.1.a /usr/lib/libdb-4.0.la /usr/lib/libdb1.a /usr/lib/libdb_cxx-4.1.a /usr/lib/libdb_java-4.1.a /usr/lib/libdb_tcl-4.1.la /usr/lib/libdb-4.0.so /usr/lib/libdb1.so /usr/lib/libdb_cxx-4.1.la /usr/lib/libdb_java-4.1.la /usr/lib/libdb_tcl-4.1.so /usr/lib/libdb-4.1.a /usr/lib/libdb1.so.2 /usr/lib/libdb_cxx-4.1.so /usr/lib/libdb_java-4.1.so /usr/lib/libdb_tcl.a /usr/lib/libdb-4.1.la /usr/lib/libdb_cxx-3.2.la /usr/lib/libdb_cxx.a /usr/lib/libdb_java.a /usr/lib/libdb_tcl.so
something is definetly wrong with your sys-libs/db-3.2* as a bunch of the files are missing in your output (but only some of them, the ones the symlinks would point to...), and beyond that, probably the 4.0 as well. please attach /var/tmp/portage/openldap-2.1.26/work/*/config.log then emerge '=sys-libs/db-3.2*' '=sys-libs/db-4.0*' '=sys-libs/db-4.1*' and try the openldap again.
Created attachment 28253 [details] Per request
if re-merging those db packages, then openldap doesn't do it for you, check out openldap-2.1.27-r1 when it hits the rsync tree (in 30-90 minutes)
That did the trick. I'm concerned that 1) the db libraries were not properly installed 2) that the ebuild didn't catch the error It's possible that this is a user-error, though I have tried to take care not to install anything outside of user-space unless it is done using emerge. My own problem has been solved. Thanks for the help!
the problem with the db stuff is that you had mismatched symlinks (from when 3.2 was installed at some point I'm not sure why it got removed), and they didn't get cleaned up properly. your db.h was pointing to db40/db.h but your libdb.so was pointing to libdb-4.1.so since they need to be in sync, it wasn't caught by the configure script before. the stuff I added in openldap-2.1.27-r1 will catch your case now and work thru it.