Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 403011 - net-nds/openldap-2.4.28 build fails with ./.libs/libldap.so: undefined reference to `gcry_control'
Summary: net-nds/openldap-2.4.28 build fails with ./.libs/libldap.so: undefined refere...
Status: RESOLVED DUPLICATE of bug 337504
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 18:13 UTC by Marco Napetti
Modified: 2012-02-10 21:32 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,112.62 KB, text/plain)
2012-02-10 18:14 UTC, Marco Napetti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Napetti 2012-02-10 18:13:10 UTC
Can't build dev-lang/php-5.4.0_rc7-r1, it fails with /usr/lib64/libldap.so: undefined reference to `gcry_control', so I tryed to rebuild net-nds/openldap, but it fails too with a similar error.

revdep-rebuild tells dynamic linking on my system is consistent.

Reproducible: Always




Portage 2.1.10.45 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.14.1-r2, 3.2.5-gentoo x86_64)
=================================================================
System uname: Linux-3.2.5-gentoo-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Fri, 10 Feb 2012 07:30:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo seden
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA skype-eula dlj-1.1 PUEL AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=generic -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=generic -O2"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=y"
FEATURES="assume-digests binpkg-logs candy distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="it"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/seden"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl addbookmarks alias alsa amd64 amr amuled apache2 audiofile autoreplace avi bash-completion berkdb bluetooth boost branding browserplugin bzip2 cdaudio cdb cdda cddb cdinstall cdio cdparanoia cdr cleartype cli clucene codecs connectionstatus contactnotes cracklib crypt css ctype cups curl custom-optimization cxx dbus decibel dga divx4linux dlloader dri dts dv dvb dvd dvdr dvdread edl emul-linux-x86 encode exif extensions faad fam fame ffmpeg filter firefox flac fontconfig fortran ftp gadu gcj gd gdbm ggi gif gimp gimpprint git glib glitz gnutls gpm groupwise gstreamer highlight history hou iconv idn ieee1394 imagemagick imap imlib inquisitio insecure-drivers ipv6 irc ithreads jack java javascript jingle jpeg jpeg2k kde kdeenablefinal lame lcd lcdfilter libcaca libnotify live lm_sensors lzo mad matroska messenger mikmod mime mjpeg mmx mmxext modules monkey moodbar mozbranding mozdevelop mozilla mp3 mp4 mpeg msn msword mudflap multilib musepack musicbrainz mysql mysqli mythtv ncurses nepomuk netmeeting nls nodrm nowin nowlistening nptl nptlonly nsplugin objc objc++ objc-gc offensive ogg oggvorbis opengl openmp pam pcre pdf phonon php plasma png ppds pppd qt qt-copy qt3support qt4 quicktime rar rdesktop readline remote replytolist samba sametime scanner sdl semantic-desktop sensord session slp smp sms sndfile sou sound speex sqlite sse sse2 ssl startup-notification statistics subversion svg sysfs taglib tcpd telepathy texteffect tga theora threads tidy tiff tokenizer translator truetype truetype-fonts udev unicode upnp usb v4l v4l2 vcd video videos visualization vnc vorbis wavpack webdav webpresence wifi winpopup wlm xanim xattr xcb xcomposite xine xinerama xml xmlpatterns xmlreader xmlwriter xorg xscreensaver xv xvid xvmc yahoo zip zlib" ALSA_CARDS="hda-intel" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby19" SANE_BACKENDS="epson2" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Marco Napetti 2012-02-10 18:14:05 UTC
Created attachment 301491 [details]
build.log
Comment 2 emerald 2012-02-10 19:11:28 UTC
The libldap.so being built seems to need libgcrypt for the missing symbol but is not linked against it. Afterwards anything linking against libldap.so fails.
The error appeared with the upgrade to gnutls-2.12.16, which no longer links against libgcrypt (as the older 2.10 does), so the symbol was 'accidently' provided up to now.
However, openldap uses the gcry_control symbol in its libraries (for tls related stuff), but without reference in the generated Makefile, there for tls only gnutls is necessary.

As temporary workaround downgrade of gnutls to a version <2.12 works but openldap needs to be fixed.

net-nds/openldap-2.4.28

/var/tmp/portage/net-nds/openldap-2.4.28/work # grep -RIn 'gcry_control' *
openldap-2.4.28/libraries/libldap_r/tls_g.c:161:        gcry_control (GCRYCTL_SET_THREAD_CBS, &tlsg_thread_cbs);
openldap-2.4.28/libraries/libldap_r/tls_g.c:174:                gcry_control( GCRYCTL_SET_RNDEGD_SOCKET, lo->ldo_tls_randfile )) {
openldap-2.4.28/libraries/libldap_r/tls_g.c:176:                "TLS: gcry_control GCRYCTL_SET_RNDEGD_SOCKET failed\n",
openldap-2.4.28/libraries/libldap/tls_g.c:161:  gcry_control (GCRYCTL_SET_THREAD_CBS, &tlsg_thread_cbs);
openldap-2.4.28/libraries/libldap/tls_g.c:174:          gcry_control( GCRYCTL_SET_RNDEGD_SOCKET, lo->ldo_tls_randfile )) {
openldap-2.4.28/libraries/libldap/tls_g.c:176:          "TLS: gcry_control GCRYCTL_SET_RNDEGD_SOCKET failed\n",


nm ./openldap-2.4.28/work/openldap-2.4.28/libraries/libldap/.libs/libldap.so | grep gcry_control
                 U gcry_control


# readelf -d ./openldap-2.4.28/work/openldap-2.4.28/libraries/libldap/.libs/libldap.so

Dynamic section at offset 0x45fc8 contains 32 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [liblber-2.4.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libresolv.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libsasl2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libgnutls.so.26]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libldap-2.4.so.2]
 0x000000000000000f (RPATH)              Library rpath: [/var/tmp/portage/net-nds/openldap-2.4.28/work/openldap-2.4.28/libraries/liblber/.libs]
 0x000000000000001d (RUNPATH)            Library runpath: [/var/tmp/portage/net-nds/openldap-2.4.28/work/openldap-2.4.28/libraries/liblber/.libs]
 0x000000000000000c (INIT)               0xd2b0
[...]


# readelf -s /usr/lib64/libgcrypt.so | grep gcry_control
   260: 0000000000008ea0   148 FUNC    GLOBAL DEFAULT   12 gcry_control@@GCRYPT_1.2



net-libs/gnutls-2.10.5:

# readelf -d /usr/lib64/libgnutls.so

Dynamic section at offset 0xaa088 contains 30 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libtasn1.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgcrypt.so.11]
 0x0000000000000001 (NEEDED)             Shared library: [libgpg-error.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libgnutls.so.26]

net-libs/gnutls-2.12.16:

# readelf -d /usr/lib64/libgnutls.so

Dynamic section at offset 0xc0bc8 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libtasn1.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libnettle.so.4]
 0x0000000000000001 (NEEDED)             Shared library: [libgmp.so.10]
 0x0000000000000001 (NEEDED)             Shared library: [libhogweed.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libp11-kit.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libgnutls.so.26]
Comment 3 emerald 2012-02-10 19:27:53 UTC
Disabling the nettle use flag pulls in libgcrypt again, so it should work this way too.
Comment 4 Maks Verver 2012-02-10 21:02:01 UTC
Another simple work-around is to re-compile openldap with:

  # LIBS=-lgcrypt emerge -1 openldap

That should fix the problem for now (of course, the ebuild should still be updated to add -lgcrypt to the linker flags at some point).
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-02-10 21:32:20 UTC

*** This bug has been marked as a duplicate of bug 337504 ***