https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-nds/openldap-2.6.6 fails to compile. Discovered on: amd64 (internal ref: python-3.12_tinderbox) System: CLANG-LLD (https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CLANG-LLD) Info about the issue: https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0014
Created attachment 883719 [details] build.log build log and emerge --info
upstream bug: https://bugs.openldap.org/show_bug.cgi?id=9982
That was wrong upstream bug, sorry. Relevant code from that bug is in. https://bugs.openldap.org/show_bug.cgi?id=9739
Hi, has this been resolved or have you found a way to work around? I have just encountered the same issue and don't know what's to do now. Would you like to kindly share if you made progress?
1. I cannot reproduce this. 2. Please retest with 2.6.8 3. Those upstream bugs are NOT the correct bugs; those deal w/ the LDAP_CONNECTIONLESS code, that is NOT enabled in ago's build.
(In reply to Robin Johnson from comment #5) > 1. I cannot reproduce this. > 2. Please retest with 2.6.8 Odd, as I can reproduce this right away with the following: =net-nds/openldap-2.6.8 + llvm/clang/lld 18.1.8 I'll attach the build.log but it's effectively still the same as the original one. (In reply to Mosaic J from comment #4) > Hi, has this been resolved or have you found a way to work around? I have > just encountered the same issue and don't know what's to do now. Would you > like to kindly share if you made progress? This is a common issue starting with llvm 17; as a workaround you can add "-Wl,--undefined-version" to your LDFLAGS.
Created attachment 901297 [details] build.log (2.6.8)
Just for the record, still reproducible with LLVM 19.1.
Upstream bug: https://bugs.openldap.org/show_bug.cgi?id=9739 But we don't set up experimental and stateless?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74f7ab1af81e3ce05117cd8b801d68c2bac10357 commit 74f7ab1af81e3ce05117cd8b801d68c2bac10357 Author: Z. Liu <zhixu.liu@gmail.com> AuthorDate: 2024-12-26 08:21:25 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-12-28 18:02:24 +0000 net-nds/openldap: fix build issue with llvm profile and a test failure 1. building with llvm profile causes many error messagees like the one bellow: ld.lld: error: version script assignment of OPENLDAP_2.200 to symbol ... failed: symbol not defined This is caused by lld enable option "--no-undefined-version" by default (see 'https://reviews.llvm.org/D135402'). OpenLDAP define all dynamic symbols in libraries/{liblber/lber,libldap/ldap}.map, but some symbols are only available when specific configuration option are enabled. We've identified the options like HAVE_TLS, HAVE_CYRUS_SASL and LDAP_CONNECTIONLESS will cause build failures. There are two workarounds: 1. Remove the symbol from .map file if the corresponding configuration option is not set. 2. Add the linker option "-Wl,--undefined-version" to restore the default behavior that undefined symbols in shared libraries are allowed. Option 1 requires identifying all symbols controlled by different options, and using sed to remove them based on the configuration. Option 2 is much simpler and has no known side effects. We choose option 2. 2. In patch 'openldap-2.6.1-fix-missing-mapping.patch', 'ber_sockbuf_io_udp' was added to lber.map, but it's not completed. This symbol is part an unsupported feature (cldap or ldap over udp) and is only built when the unsupported LDAP_CONNECTIONLESS flag is defined. All the user of 'ber_sockbuf_io_udp' are enclosed by #ifdef guards, it make no sense to not enclose it by #ifdef too. Another patch for ldap.map form Fedora is included too. Patch is updated to v2. 3. USE="debug" is required for USE="test", otherwise "test065-proxyauthz" will failed: must compile with LDAP_DEBUG for debugging unrecognized log level "pcache" (deferred) Upstream Issue: https://bugs.openldap.org/show_bug.cgi?id=9739 FreeBSD Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277585 Closes: https://bugs.gentoo.org/923334 Closes: https://bugs.gentoo.org/938553 Closes: https://bugs.gentoo.org/946816 Closes: https://bugs.gentoo.org/946975 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/39844 Signed-off-by: Sam James <sam@gentoo.org> .../openldap-2.6.1-fix-missing-mapping.v2.patch | 53 ++ net-nds/openldap/openldap-2.6.4-r4.ebuild | 870 ++++++++++++++++++++ net-nds/openldap/openldap-2.6.6-r2.ebuild | 2 +- net-nds/openldap/openldap-2.6.6-r3.ebuild | 877 ++++++++++++++++++++ net-nds/openldap/openldap-2.6.8-r1.ebuild | 898 +++++++++++++++++++++ 5 files changed, 2699 insertions(+), 1 deletion(-)