Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946816 - net-nds/openldap-2.6.8 - [llvm] ld.lld: error: version script assignment of OPENLDAP_2.200 to symbol ber_sockbuf_io_udp failed: symbol not defined
Summary: net-nds/openldap-2.6.8 - [llvm] ld.lld: error: version script assignment of O...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-12-22 10:55 UTC by Toralf Förster
Modified: 2024-12-28 18:03 UTC (History)
0 users

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


Attachments
emerge-info.txt (emerge-info.txt,18.56 KB, text/plain)
2024-12-22 10:55 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,133.59 KB, text/plain)
2024-12-22 10:55 UTC, Toralf Förster
Details
environment (environment,153.40 KB, text/plain)
2024-12-22 10:55 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.21 KB, application/x-xz)
2024-12-22 10:55 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,17.61 KB, application/x-xz)
2024-12-22 10:55 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,662.98 KB, application/x-xz)
2024-12-22 10:55 UTC, Toralf Förster
Details
net-nds:openldap-2.6.8:20241222-104302.log (net-nds:openldap-2.6.8:20241222-104302.log,109.88 KB, text/plain)
2024-12-22 10:55 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,36.47 KB, application/x-xz)
2024-12-22 10:55 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,44.89 KB, application/x-xz)
2024-12-22 10:55 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-12-22 10:55:00 UTC
too long lines were shrinked:

/bin/sh ../../libtool  --mode=compile clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -DOPENSSL_NO_MD2 -I../../include -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8/include     -DLBER_LIBRARY -c version.c
libtool: compile:  clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -DOPENSSL_NO_MD2 -I../../include -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8/include -DLBER_LIBRARY -c version.c  -fPIC -DPIC -o .libs/version.o
make[2]: Leaving directory '/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8-abi_x86_32.x86/libraries/liblber'
make[2]: Entering directory '/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8-abi_x86_32.x86/libraries/liblber'
/bin/sh ../../libtool  --mode=link clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -DOPENSSL_NO_MD2  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0  -version-info 2:200:0 -rpath /usr/lib -Wl,--version-script=/var/tmp
libtool: link: clang -m32 -mfpmath=sse -shared  -fPIC -DPIC  .libs/assert.o .libs/decode.o .libs/encode.o .libs/io.o .libs/bprint.o .libs/debug.o .libs/memory.o .libs/options.o .libs/sockbuf.o .libs/stdio.o .libs/version.o    -m32 -mfpmath=sse -O2 -march=native -Wl,-O1 -Wl,--as-needed -Wl,-z -Wl,pac
ld.lld: error: version script assignment of 'OPENLDAP_2.200' to symbol 'ber_sockbuf_io_udp' failed: symbol not defined
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Makefile:393: liblber.la] Error 1

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_llvm_systemd-20241220-181511

  The attached etc.portage.tar.xz has all details.
  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-14 *
clang version 19.1.6+libcxx
llvm-config: 19.1.6+libcxx
Python 3.12.8
go version go1.23.4 linux/amd64
Available Ruby profiles:
  [1]   ruby32 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.81.0
  [2]   rust-bin-1.83.0 *

  HEAD of ::gentoo
commit 3c5151eec0e6995daf4f3b5fe579a9c44501f928
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Dec 22 10:03:38 2024 +0000

    2024-12-22 10:03:38 UTC

emerge -qpvO =net-nds/openldap-2.6.8
[ebuild  N    ] net-nds/openldap-2.6.8  USE="argon2 cleartext crypt ssl syslog systemd -autoca -cxx -debug -experimental -gnutls -iodbc -kerberos -kinit -minimal -odbc -overlays -pbkdf2 -perl -samba -sasl (-selinux) -sha2 -smbkrb5passwd -static-libs -tcpd -test" ABI_X86="32 (64) (-x32)"
Comment 1 Toralf Förster gentoo-dev 2024-12-22 10:55:01 UTC
Created attachment 914686 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-12-22 10:55:03 UTC
Created attachment 914687 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2024-12-22 10:55:04 UTC
Created attachment 914688 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-12-22 10:55:05 UTC
Created attachment 914689 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-12-22 10:55:05 UTC
Created attachment 914690 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-12-22 10:55:07 UTC
Created attachment 914691 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-12-22 10:55:09 UTC
Created attachment 914692 [details]
net-nds:openldap-2.6.8:20241222-104302.log
Comment 8 Toralf Förster gentoo-dev 2024-12-22 10:55:09 UTC
Created attachment 914693 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2024-12-22 10:55:10 UTC
Created attachment 914694 [details]
temp.tar.xz
Comment 10 Larry the Git Cow gentoo-dev 2024-12-28 18:03:09 UTC
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(-)