Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408077 - net-nds/openldap-2.4.30 USE=overlays -ld: cannot find -lldap_r/-llber
Summary: net-nds/openldap-2.4.30 USE=overlays -ld: cannot find -lldap_r/-llber
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
: 444896 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-13 20:30 UTC by Alexander Tsoy
Modified: 2014-10-11 23:49 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,403.17 KB, text/plain)
2012-03-14 01:26 UTC, Alexander Tsoy
Details
openldap-2.4.30-contrib-samba4.patch (openldap-2.4.30-contrib-samba4.patch,379 bytes, patch)
2012-05-13 09:25 UTC, Alexander Tsoy
Details | Diff
openldap-2.4.30.ebuild.patch (openldap-2.4.30.ebuild.patch,427 bytes, patch)
2012-05-13 09:26 UTC, Alexander Tsoy
Details | Diff
openldap-2.4.30-contrib-samba4.patch (openldap-2.4.30-contrib-samba4.patch,1.60 KB, patch)
2012-05-13 14:38 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2012-03-13 20:30:28 UTC
I can build net-nds/openldap-2.4.30 with "overlays" USE flag only if I had previously build it without this USE flag. So on the fresh install its necessary to build it twice.

Reproducible: Always

Steps to Reproduce:
1. Remove openldap
2. Try to emerge it with overlays USE flag enabled
Actual Results:  
It won't build with this error:

 * Building contrib-module: samba4
make -j1 CC=x86_64-pc-linux-gnu-gcc libexecdir=/usr/lib64/openldap
../../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -g -O2 -DSLAPD_OVER_RDNVAL=2 -DSLAPD_OVER_PGUID=2 -DSLAPD_OVER_VERNUM=2 -I../../../include -I../../../servers/slapd -I../../../include -c pguid.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -g -O2 -DSLAPD_OVER_RDNVAL=2 -DSLAPD_OVER_PGUID=2 -DSLAPD_OVER_VERNUM=2 -I../../../include -I../../../servers/slapd -I../../../include -c pguid.c  -fPIC -DPIC -o .libs/pguid.o
libtool: compile:  x86_64-pc-linux-gnu-gcc -g -O2 -DSLAPD_OVER_RDNVAL=2 -DSLAPD_OVER_PGUID=2 -DSLAPD_OVER_VERNUM=2 -I../../../include -I../../../servers/slapd -I../../../include -c pguid.c -o pguid.o >/dev/null 2>&1
../../../libtool --mode=link x86_64-pc-linux-gnu-gcc -g -O2 -version-info 0:0:0 \
-rpath /usr/lib64/openldap/openldap -module -o pguid.la pguid.lo -lldap_r -llber
libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/pguid.o   -lldap_r -llber  -O2   -Wl,-soname -Wl,pguid.so.0 -o .libs/pguid.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lldap_r
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -llber
collect2: ld returned 1 exit status
make: *** [pguid.la] Ошибка 1
emake failed
 * ERROR: net-nds/openldap-2.4.30 failed (compile phase):
 *   emake samba4 failed
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 3389:  Called die
 * The specific snippet of code:
 *               emake CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap" || die "emake samba4 failed";
 * 
 * If you need support, post the output of 'emerge --info =net-nds/openldap-2.4.30',
 * the complete build log and the output of 'emerge -pqv =net-nds/openldap-2.4.30'.
 * The complete build log is located at '/var/tmp/portage/net-nds/openldap-2.4.30/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.30/temp/environment'.
 * S: '/var/tmp/portage/net-nds/openldap-2.4.30/work/openldap-2.4.30'

>>> Failed to emerge net-nds/openldap-2.4.30, Log file:

>>>  '/var/tmp/portage/net-nds/openldap-2.4.30/temp/build.log'

 * Messages for package net-nds/openldap-2.4.30:

 * ERROR: net-nds/openldap-2.4.30 failed (compile phase):
 *   emake samba4 failed
 * 
 * Call stack:
 *     ebuild.sh, line  85:  Called src_compile
 *   environment, line 3389:  Called die
 * The specific snippet of code:
 *               emake CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap" || die "emake samba4 failed";
 * 
 * If you need support, post the output of 'emerge --info =net-nds/openldap-2.4.30',
 * the complete build log and the output of 'emerge -pqv =net-nds/openldap-2.4.30'.
 * The complete build log is located at '/var/tmp/portage/net-nds/openldap-2.4.30/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.30/temp/environment'.
 * S: '/var/tmp/portage/net-nds/openldap-2.4.30/work/openldap-2.4.30'


emerge --info output:

Portage 2.1.10.44 (hardened/linux/amd64, gcc-4.6.2, glibc-2.13-r4, 3.2.2-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.2.2-hardened-r1-x86_64-QEMU_Virtual_CPU_version_0.12.3-with-gentoo-2.0.3
Timestamp of tree: Tue, 13 Mar 2012 17:45:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ ftp://de-mirror.org/gentoo/ "
LANG="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl aio amd64 bash-completion berkdb bzip2 cli cracklib crypt cups cxx device-mapper dri gdbm gnutls gpm hardened iconv icu idn ipv6 justify maildir mmx modules mudflap multilib ncurses nls nptl nptlonly openmp pam pax_kernel pcre perl pppd python readline session sse sse2 ssl sysfs tcpd tls unicode urandom xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-13 21:10:10 UTC
1) Please attach the entire build log to this bug report.
2) Please attach your `emerge -vpq net-nds/openldap' output to this bug report.
Comment 2 Alexander Tsoy 2012-03-14 01:22:48 UTC
$ emerge -vpq net-nds/openldap 
[ebuild  N    ] net-nds/openldap-2.4.30  USE="berkdb crypt gnutls icu ipv6 overlays perl ssl syslog tcpd -cxx -debug -experimental -iodbc -kerberos -minimal -odbc -samba -sasl (-selinux) -slp -smbkrb5passwd"
Comment 3 Alexander Tsoy 2012-03-14 01:26:47 UTC
Created attachment 305269 [details]
build.log
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2012-03-14 05:16:42 UTC
I see. Also, why is stuff installed in /usr/$(get_libdir)/openldap/openldap
Comment 5 darren 2012-04-01 17:10:16 UTC
I can confirm this bug, it breaks exactly as stated below.  It also occurs in the previous openldap release .28-r1

Either these libraries haven't been built by the time the contribs are compiled or they are not referenced correctly during the build.  Obviously if you have an existing openldap installation, you link against the installed libs (which in itself has potential to cause nasty side affects)

I am working around this by emerging this twice, once with '-overlays' and a binary package with 'overlays'
Comment 6 Mars Liu 2012-05-02 02:19:53 UTC
I can confirm this bug too. 
I also confirm that installing twice workaround works.
Comment 7 Alexander Tsoy 2012-05-13 09:25:40 UTC
Created attachment 311599 [details, diff]
openldap-2.4.30-contrib-samba4.patch
Comment 8 Alexander Tsoy 2012-05-13 09:26:02 UTC
Created attachment 311601 [details, diff]
openldap-2.4.30.ebuild.patch
Comment 9 Alexander Tsoy 2012-05-13 09:29:19 UTC
(In reply to comment #4)
> I see. Also, why is stuff installed in /usr/$(get_libdir)/openldap/openldap

Also the slapd executable is installed in /usr/$(get_libdir)/openldap instead of something like /usr/libexec/... I think it's not good.
Comment 10 Alexander Tsoy 2012-05-13 14:38:05 UTC
Created attachment 311627 [details, diff]
openldap-2.4.30-contrib-samba4.patch

I've looked at openldap-2.4.28-contrib-smbk5pwd.patch and replaced hardcoded ${OPT} with ${CFLAGS}
Comment 11 Hans 2012-05-24 11:17:45 UTC
I can confirm this, too.
The workaround (uninstalling, then installing twice, first without, then with overlays) worked, as well.
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-05-25 22:23:02 UTC
in 2.4.31
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-10-11 23:49:17 UTC
*** Bug 444896 has been marked as a duplicate of this bug. ***