Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72186 - net-nds/openldap-2.1.30-r2: slapd link fails
Summary: net-nds/openldap-2.1.30-r2: slapd link fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-22 20:46 UTC by Yaakov S
Modified: 2005-02-19 23:06 UTC (History)
0 users

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


Attachments
config.log (config.log,79.98 KB, text/plain)
2004-11-24 21:46 UTC, Yaakov S
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaakov S 2004-11-22 20:46:13 UTC
While emerging openldap (on x86 currently defaults to 2.1.30-r2), configure and make proceed until servers/slapd.  Linking slapd exits with error:

gcc -O2 -pipe -mcpu=i686 -fomit-frame-pointer .libs/slapdS.o -o .libs/slapd main.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o config.o backend.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o repl.o lock.o controls.o extended.o kerberos.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o limits.o backglue.o operational.o matchedValues.o cancel.o version.o -rdynamic -pthread -Wl,--export-dynamic  libbackends.a ../../libraries/libavl/libavl.a ../../libraries/libldbm/libldbm.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/libldif/libldif.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.so /var/tmp/portage/openldap-2.1.30-r2/work/openldap-2.1.30/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so /usr/lib/libdb-4.1.so -L/usr/local/lib /usr/lib/perl5/5.8.4/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.4/i386-linux/CORE -lperl -lnsl -lm -lutil /usr/lib/libodbc.so -lpthread -lcrypt -lssl -lcrypto -lresolv /usr/lib/libltdl.so -ldl -lwrap
daemon.o(.text+0x1081): In function `slap_open_listener':
: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
daemon.o(.text+0x1078): In function `slap_open_listener':
: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
backend.o(.data+0x4): undefined reference to `bdb_initialize'
backend.o(.data+0xa8): undefined reference to `dnssrv_back_initialize'
backend.o(.data+0x14c): undefined reference to `ldap_back_initialize'
backend.o(.data+0x1f0): undefined reference to `ldbm_back_initialize'
backend.o(.data+0x294): undefined reference to `meta_back_initialize'
backend.o(.data+0x338): undefined reference to `monitor_back_initialize'
backend.o(.data+0x3dc): undefined reference to `null_back_initialize'
backend.o(.data+0x480): undefined reference to `passwd_back_initialize'
backend.o(.data+0x524): undefined reference to `perl_back_initialize'
backend.o(.data+0x5c8): undefined reference to `shell_back_initialize'
backend.o(.data+0x66c): undefined reference to `sql_back_initialize'
collect2: ld returned 1 exit status
make[2]: *** [slapd] Error 1

Not sure what's missing here, but something's wrong.

Reproducible: Always
Steps to Reproduce:
1. just emerge openldap


Actual Results:  
see above


Emerge info output:

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1,
2.4.26-gentoo-r11 i686)
=================================================================
System uname: 2.4.26-gentoo-r11 i686 AMD Athlon(TM)
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
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="-O2 -pipe -mcpu=i686 -fomit-frame-pointer"
CHOST="i386-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -mcpu=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X accessibility aim alsa apm arts audiofile avi berkdb bitmap-fonts bonobo
cdr crypt cups curl emacs encode esd exif f77 fam flac foomaticdb fortran ftp gd
gdbm gif gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile icq imagemagick imlib
java jpeg junit kde lcms libg++ libgda libwww mad mikmod mime ming mmap motif
mozilla mpeg ncurses nls odbc oggvorbis opengl oscar oss pam pcre pda pdflib
perl ping png postgres ppds python qt quicktime readline ruby sdl shared sndfile
spell sqlite ssl svg svga tcltk tcpd tetex tidy tiff truetype usb wmf wxwindows
x86 xml xml2 xmms xpm xv yahoo zlib"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-24 21:11:02 UTC
please attach the config.log file.
Comment 2 Yaakov S 2004-11-24 21:46:26 UTC
Created attachment 44694 [details]
config.log

Attaching config.log per request.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-25 00:11:43 UTC
can you try -r3 and see if that solves your problems?
Comment 4 Yaakov S 2004-11-25 14:46:36 UTC
Tried -r3 with the same results.

The problem appears to be with how it deals with static and shared libraries.  I have EXTRA_ECONF="--disable-static" set in /etc/make.conf, which generally doesn't cause any problems, since this is used almost exclusively by libtooled packages which can deal with this properly, and non-libtooled packages just ignore the flag.  It appears as openldap is an exception; it's not libtooled, but it accepts --disable-static, it seems that it doesn't know how to handle it properly.

In the meantime I called EXTRA_ECONF="" emerge openldap and it worked; but its still a bug in openldap's build system.  I suppose if it can't be fixed easily than the workaround would be to filter out the --disable-static flag.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-11-30 16:17:03 UTC
I spoke to other developers, and the general consensus is that ebuilds should NOT touch the value EXTRA_ECONF whatsoever. So I'd say either write up a patch for openldap to build correctly with --disable-static, or just stop using EXTRA_ECONF with openldap.
Comment 6 Yaakov S 2005-02-16 13:49:45 UTC
OK, after having more experience with portage, I see the solution is simpler; just add --enable-static to myconf.  Since arguments to econf are appended to EXTRA_ECONF (see ebuild(5)), then configure will see "--disable-static ... --enable-static ..." and follow the latter.  I tested this on my system and it works, w/o "messing" with EXTRA_ECONF.

FWIW, there is precedence for this, among others:

app-crypt/mhash
dev-db/mysql
media-libs/alsa-lib
net-fs/samba

Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-17 09:47:54 UTC
I've put a fix in 2.1.30-r4, if you'd like to try it and report back.
Comment 8 Yaakov S 2005-02-19 22:14:31 UTC
2.1.30-r4 WFM.  Thanks!
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-19 23:06:13 UTC
ok, closing thanks.