Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 12.0.1
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_reduce_nowait' Log
cppcheck 2.6-1./build/CMakeFiles/CMakeTmp/./build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' 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
eterm 0.9.6-6.1ld: ./.libs/libEterm.so: undefined reference to `posix_get_pty' 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
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-get.c:13: undefined reference to `nfacct_alloc' Log
libnetfilter-cthelper 1.0.0-3./examples/nfct-helper-get.c:13: undefined reference to `nfct_helper_alloc' Log
libnetfilter-cttimeout 1.0.0-4: ./examples/nfct-timeout-add.c:/usr/bin/ld45: : undefined reference to `nfct_timeout_policy_attr_set_u32./examples/nfct-timeout-get.c:' 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
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
plast 2.3.2+dfsg-7./obj-sse3/./src/index/impl/retrievall.c:1106: undefined reference to `get_packed_value' Log
postgresql-14 14.0-1./build/src/backend/utils/sort/./build/../src/backend/utils/sort/tuplesort.c:1427: undefined reference to `TRACE_POSTGRESQL_SORT_DONE' Log
python3.10 3.10.0-3./build-static/../Programs/python.c:15: undefined reference to `Py_BytesMain' Log
python3.9 3.9.7-4./build-static/../Programs/python.c:15: undefined reference to `Py_BytesMain' Log
rarcrack 0.2-1rarcrack.c:(.text+0x541): 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
ruby2.7 2.7.4-1./vm.c:1764: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED' 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
wxhexeditor 0.24+repack-1./src/HexDialogs.cpp:2316: undefined reference to `__kmpc_for_static_fini' Log
xjokes 1.0-17./blackhole.c:154: undefined reference to `isqr' Log
xmltooling 3.2.0-3./xmltooling/util/PThreads.cpp:177: undefined reference to `pthread_getspecific' Log
48 errors
Return to the list