tdb 1.4.10 undefined symbol in version script

kocelfc at tutanota.com kocelfc at tutanota.com
Sun May 5 18:48:58 UTC 2024


tdb 1.4.10 fails to build with clang/lld 17 or newer because it errors out on undefined symbols in version scripts by default due to it using LDFLAGS="-Wl,--no-undefined-version". The same issue can be reproduced by applying the same linker flag when building with GCC and the ld linker.

```
[ 52/118] Compiling test/run-rdlock-upgrade.c 
21:08:41 runner ['clang', '-O3', '-pipe', '-Werror=strict-aliasing', '-MMD', '-D_GNU_SOURCE=1', '-D_XOPEN_SOURCE_EXTENDED=1', '-fPIC', '-D__STDC_WANT_LIB_EXT1__=1', '-D_REENTRANT', '-fstack-protector-strong', '-fstack-clash-protection', 
'-DSTATIC_tdb1_run_rdlock_upgrade_MODULES=NULL', '-DSTATIC_tdb1_run_rdlock_upgrade_MODULES_PROTO=extern void __tdb1_run_rdlock_upgrade_dummy_module_proto(void)', '-I.', '-I../..', '-Iinclude', '-I../../include', '-I.', '-I../..', '-Ilib/
replace', '-I../../lib/replace', '../../test/run-rdlock-upgrade.c', '-c', '-o/mnt/portage/portage/sys-libs/tdb-1.4.10/work/tdb-1.4.10-abi_x86_64.amd64/bin/default/test/run-rdlock-upgrade.c.60.o'] 
ld.lld: error: version script assignment of 'TDB_1.2.1' to symbol 'tdb_do_delete' failed: symbol not defined 
ld.lld: error: version script assignment of 'local' to symbol '_end' failed: symbol not defined 
ld.lld: error: version script assignment of 'local' to symbol '__bss_start' failed: symbol not defined 
ld.lld: error: version script assignment of 'local' to symbol '_edata' failed: symbol not defined 
clang: error: linker command failed with exit code 1 (use -v to see invocation)```

Downstream Gentoo bug: https://bugs.gentoo.org/914857


More information about the samba-technical mailing list