Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 13.0.0
Return to the list
Undefined references can have different reasons. Here are some:
1) The most common issue is about the the inline behavior. clang is following by default the C99 standard while gcc promote GNU89.
The following code will build with gcc but fails with:
main.c:(.text+0x12): undefined reference to `xrealloc'
// the right declaration in C99 is:
// static inline void xrealloc() 
inline void xrealloc() { }

int main(){
    xrealloc();
    return 1;
}
besides the static, the command:
clang -std=gnu89 -o plop.exe main.c
will fix the issue.
See the clang website for more information.

2) An other issue is that gcc is that gcc optimizes the call to some functions at -O0 (causing -lm to be not necessary)
#include <math.h>
// Works: gcc -O0 -o plop plop.c 
// Fails:  clang -O0 -o plop plop.c
// Works: clang -lm -O0 -o plop plop.c
int main() {
    double plop = fabs(2.0);
    return 1;
}
3) There are also some rare issues with the --relocatable/-r linker flag.
Versions: 2.9 - 3.0 - 3.1 - 3.2 - 3.3 - 3.4 - 3.4.2 - 3.5.0 - 3.6.0 - 3.8.1 - 3.9.1 - 4.0.1 - 5.0 - 6.0 - 8.0.1 - 9.0.1 - 10.0.0 - 11.0.0 - 12.0.1 - 13.0.0
PackageVersionSupposed error messageFull log Bug report
afterstep 2.2.12-15ld: ../../libAfterBase/libAfterBase.so: undefined reference to `vector_move_data_up' Log
apophenia 1.0+ds-8ld: ../.libs/libapophenia.so: undefined reference to `__atomic_compare_exchange' Log
barcode 0.99-4ld: ./.libs/libbarcode.so: undefined reference to `rpl_calloc' Log
beignet 1.3.2-9ld: libgbe.so: undefined reference to `llvm::cfg::Update::dump() const' Log 750380
ccbuild 2.0.9-1./obj-x86_64-linux-gnu/./src/system/build.cc:165: undefined reference to `__kmpc_for_static_fini' Log
chipmunk 7.0.3-4./obj-x86_64-linux-gnu/demo/./demo/ContactGraph.c:(.text.__destroy_helper_block_8_32r40r[__destroy_helper_block_8_32r40r]+0xe): undefined reference to `_Block_object_dispose' Log
cpl-plugin-hawki 2.4.8+dfsg-4ld: ../../hawki/.libs/libhawki.so: undefined reference to `__kmpc_for_static_fini' Log
cppcheck 2.6-1./build/CMakeFiles/CMakeTmp/./build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' Log
crawl 2:0.27.1-1crt1.o:function _start: error: undefined reference to 'main' Log
dnsjit 1.2.1-3./src/output/dnscli.c:563: undefined reference to `_send_tcp' Log
dune-functions 2.8.0-2ld: /usr/lib/x86_64-linux-gnu/libdunealbertagrid3d.so.2.8.0: undefined reference to `alloc_macro_data' Log
dune-grid-glue 2.8.0-2ld: /usr/lib/x86_64-linux-gnu/libdunealbertagrid3d.so.2.8.0: undefined reference to `alloc_macro_data' Log
eccodes 2.23.0-2ld: ../lib/libeccodes.so.0: undefined reference to `omp_init_nest_lock' Log
ffe 0.3.9-1./src/endian.c:159: undefined reference to `letobe_64' Log
gabedit 2.5.1+ds-1./src/Display/VibrationLocal.c:82: undefined reference to `__kmpc_for_static_init_4' Log
gcc-10-cross 18conftest.c:72: undefined reference to `getexecname' Log
gcc-10-cross-mipsen 3+c5conftest.c:72: undefined reference to `getexecname' Log
gcc-10-cross-ports 19conftest.c:72: undefined reference to `getexecname' Log
gcc-11-cross 9conftest.c:73: undefined reference to `getexecname' Log
gcc-11-cross-mipsen 2+c2conftest.c:73: undefined reference to `getexecname' Log
gcc-11-cross-ports 7conftest.c:73: undefined reference to `getexecname' Log
gdbm 1.22-1./diet-build/src/../../src/findkey.c:186: undefined reference to `bcmp' Log
gerbera 1.1.0+dfsg-3./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' Log
grass 7.8.6-1ld: /<>/dist.x86_64-pc-linux-gnu/lib/libgrass_gpde.7.8.so: undefined reference to `__kmpc_for_static_fini' Log
integrit 4.1-1.1cdb.c:(.text+0x259): undefined reference to `bcmp' Log
kbdd 0.6-4libkbdd.c:186: undefined reference to `_kbdd_inner_iter' Log
lagan 2.0-6./src/multial.c:829: undefined reference to `scoreOpp' Log
libkf5incidenceeditor 21.08.1-1./obj-x86_64-linux-gnu/src/./src/resourceitem.cpp:22: undefined reference to `KLDAP::LdapServer::setScope(KLDAP::LdapUrl::Scope)' Log
libnetfilter-acct 1.0.3-3./examples/nfacct-add.c:22: undefined reference to `nfacct_alloc' Log
libnetfilter-cthelper 1.0.0-3./examples/nfct-helper-add.c:24: undefined reference to `nfct_helper_alloc' Log
libnetfilter-cttimeout 1.0.0-4./examples/nfct-timeout-add.c:35: undefined reference to `nfct_timeout_alloc' Log
librsb 1.2.0.10+dfsg-1ld: /<>/.libs/librsb.so: undefined reference to `__kmpc_reduce_nowait' Log
mapsembler2 2.2.4+dfsg1-4./src/kissReads.c:427: undefined reference to `__kmpc_for_static_init_4' Log
mlv 3.1.0-6./MLV/input_box.c:883: undefined reference to `goUpInHistory_NTS' Log
msxpertsuite 5.8.9-1./debian/build/libmass/./libmass/Trace.cpp:1534: undefined reference to `__kmpc_for_static_init_4' Log
nfft 3.3.2-2ld: ../.libs/libnfft3l_threads.so: undefined reference to `__atomic_compare_exchange' Log
opa-fm 10.10.3.0.11-1sm_dor.c:(.text+0x1edf): undefined reference to `port_pair_needs_warning' Log
opensta 0~20191111gitc018cb2+dfsg-1ld: ../app/libOpenSTA.a(DispatchQueue.cc.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
php7.4 7.4.21-1+deb11u1./ext-build/./Zend/zend_vm_execute.h:3754: undefined reference to `DTRACE_EXCEPTION_CAUGHT_ENABLED' Log
rarcrack 0.2-1rarcrack.c:(.text+0x561): undefined reference to `nextpass' Log
recode 3.6-24ld: ./.libs/librecode.so: undefined reference to `aliases_lookup' Log
ruby-curses 1.2.4-1conftest.c:15: undefined reference to `init' Log
ruby3.0 3.0.2-5./vm.c:2007: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED' Log
tesseract 4.1.1-2.1./src/lstm/weightmatrix.cpp:296: undefined reference to `__kmpc_for_static_fini' Log
vtun 3.0.4-2./auth.c:409: undefined reference to `nonssl_decrypt_chal' Log
wxhexeditor 0.24+repack-1./src/HexDialogs.cpp:2771: undefined reference to `__kmpc_dispatch_next_4u' Log
46 errors
Return to the list