Summary: | net-nds/openldap-2.4.28 build fails with ./.libs/libldap.so: undefined reference to `gcry_control' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marco Napetti <marco.napetti> |
Component: | [OLD] Server | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | dirk |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Marco Napetti
2012-02-10 18:13:10 UTC
Created attachment 301491 [details]
build.log
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] Disabling the nettle use flag pulls in libgcrypt again, so it should work this way too. 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). *** This bug has been marked as a duplicate of bug 337504 *** |