Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 938553 - net-nds/openldap-2.6.8 - [ncurses-6.5] [llvm] ld.lld: error: version script assignment of OPENLDAP_2.200 to symbol ldap_dump_connection failed: symbol not defined
Summary: net-nds/openldap-2.6.8 - [ncurses-6.5] [llvm] ld.lld: error: version script a...
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-08-27 11:31 UTC by Toralf Förster
Modified: 2024-12-28 18:03 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.55 KB, text/plain)
2024-08-27 11:31 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,90.18 KB, text/plain)
2024-08-27 11:31 UTC, Toralf Förster
Details
environment (environment,163.98 KB, text/plain)
2024-08-27 11:31 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.21 KB, application/x-xz)
2024-08-27 11:32 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,42.38 KB, application/x-xz)
2024-08-27 11:32 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,24.71 KB, application/x-xz)
2024-08-27 11:32 UTC, Toralf Förster
Details
net-nds:openldap-2.6.8:20240827-093554.log (net-nds:openldap-2.6.8:20240827-093554.log,165.56 KB, text/plain)
2024-08-27 11:32 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,176.72 KB, text/plain)
2024-08-27 11:32 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,381.22 KB, application/x-xz)
2024-08-27 11:32 UTC, Toralf Förster
Details
var.tmp.clang.tar.xz (var.tmp.clang.tar.xz,4.25 KB, application/x-xz)
2024-08-27 11:32 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-08-27 11:31:55 UTC
too long lines were shrinked:

clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DLDAP_CONNECTIONLESS -DOPENSSL_NO_MD2 -I../../include        -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8/include       -c -o urltest.o
clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DLDAP_CONNECTIONLESS -DOPENSSL_NO_MD2 -I../../include        -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8/include       -c -o testavl.o
/bin/sh ../../libtool  --mode=compile clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DLDAP_CONNECTIONLESS -DOPENSSL_NO_MD2 -I../../include        -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_E
libtool: compile:  clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DLDAP_CONNECTIONLESS -DOPENSSL_NO_MD2 -I../../include -I/var/tmp/portage/net-nds/openldap-2.6.8/work/openldap-OPENLDAP_REL_ENG_2_6_8/include -DLDAP_LI
/bin/sh ../../libtool  --mode=link clang -m32 -mfpmath=sse -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -DLDAP_CONNECTIONLESS -DOPENSSL_NO_MD2  -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--defsym=__gentoo_check
libtool: link: clang -m32 -mfpmath=sse -shared  -fPIC -DPIC  .libs/bind.o .libs/open.o .libs/result.o .libs/error.o .libs/compare.o .libs/search.o .libs/controls.o .libs/messages.o .libs/references.o .libs/extended.o .libs/cyrus.o .libs/modify.o .libs/add.o .libs/modrdn.o .libs/delete.o .libs/abando
ld.lld: error: version script assignment of 'OPENLDAP_2.200' to symbol 'ldap_dump_connection' failed: symbol not defined
ld.lld: error: version script assignment of 'OPENLDAP_2.200' to symbol 'ldap_dump_requests_and_responses' failed: symbol not defined
ld.lld: error: version script assignment of 'OPENLDAP_2.200' to symbol 'ldap_host_connected_to' failed: symbol not defined

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_llvm-20240825-084454

  UNMASKED:
    Requested by sam
  /etc/portage/package.unmask/50unstable:>=sys-libs/ncurses-6.5

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 18.1.8+libcxx
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/18
18.1.8+libcxx
Python 3.12.5
Available Rust versions:
  [1]   rust-bin-1.80.1
  [2]   rust-1.80.1 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
go version go1.23.0 linux/amd64

  HEAD of ::gentoo
commit ede4a92ff51682d3078acf734a6fa9e0117b1c09
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Aug 27 08:34:06 2024 +0000

    2024-08-27 08:34:05 UTC

emerge -qpvO =net-nds/openldap-2.6.8
[ebuild  N    ] net-nds/openldap-2.6.8  USE="argon2 autoca cleartext crypt cxx experimental pbkdf2 sasl smbkrb5passwd ssl syslog -debug -gnutls -iodbc -kerberos -kinit -minimal -odbc -overlays -perl -samba (-selinux) -sha2 -static-libs -systemd -tcpd -test" ABI_X86="32 (64) (-x32)"
Comment 1 Toralf Förster gentoo-dev 2024-08-27 11:31:56 UTC
Created attachment 901314 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-08-27 11:31:57 UTC
Created attachment 901315 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2024-08-27 11:31:59 UTC
Created attachment 901316 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-08-27 11:32:00 UTC
Created attachment 901317 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-08-27 11:32:01 UTC
Created attachment 901318 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-08-27 11:32:02 UTC
Created attachment 901319 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-08-27 11:32:03 UTC
Created attachment 901320 [details]
net-nds:openldap-2.6.8:20240827-093554.log
Comment 8 Toralf Förster gentoo-dev 2024-08-27 11:32:04 UTC
Created attachment 901321 [details]
qlist-info.txt
Comment 9 Toralf Förster gentoo-dev 2024-08-27 11:32:06 UTC
Created attachment 901322 [details]
temp.tar.xz
Comment 10 Toralf Förster gentoo-dev 2024-08-27 11:32:07 UTC
Created attachment 901323 [details]
var.tmp.clang.tar.xz
Comment 11 Petr Šabata 2024-08-30 12:08:03 UTC
Related: https://bugs.gentoo.org/923334
Comment 12 Larry the Git Cow gentoo-dev 2024-12-28 18:03:08 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(-)