Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 11.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-13./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:316: undefined reference to `vector_move_data_up' Log
barcode 0.99-4ld: ./.libs/libbarcode.so: undefined reference to `rpl_calloc' Log
beignet 1.3.2-7ld: libgbe.so: undefined reference to `llvm::cfg::Update::dump() const' Log 750380
ccbuild 2.0.7+git20160227.c1179286-3./obj-x86_64-linux-gnu/./src/system/build.cc:165: undefined reference to `__kmpc_for_static_fini' Log
chipmunk 7.0.3-3./obj-x86_64-linux-gnu/demo/./demo/ContactGraph.c:125: undefined reference to `_Block_object_dispose' Log
cpio 2.13+dfsg-4./obj/gnu/../../gnu/xmalloc.c:100: undefined reference to `__muloti4' Log
cpl-plugin-hawki 2.4.8+dfsg-1ld: ../../hawki/.libs/libhawki.so: undefined reference to `__kmpc_for_static_fini' Log
cppcheck 2.2-1./build/CMakeFiles/CMakeTmp/./build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' Log
eccodes 2.19.0-1ld: ../lib/libeccodes.so.0: undefined reference to `omp_init_nest_lock' Log
eterm 0.9.6-6ld: ./.libs/libEterm.so: undefined reference to `posix_get_pty' Log
gabedit 2.5.1~20200828-1./spglib/tetrahedron_method.c:413: undefined reference to `__kmpc_for_static_init_4' Log
gcc-10-cross 12conftest.c:(.text.startup+0x7): undefined reference to `getexecname' Log
gcc-10-cross-ports 12conftest.c:72: undefined reference to `getexecname' Log
gcc-9-cross 23conftest.c:72: undefined reference to `getexecname' Log
gcc-9-cross-ports 21conftest.c:72: undefined reference to `getexecname' Log
gdbm 1.18.1-5.1./diet-build/src/../../src/findkey.c:168: 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
gnunet 0.13.1-1ld: /<>/debian/tmp/usr/lib/x86_64-linux-gnu/libgnunetats.so: undefined reference to `GNUNET_HELLO_address_cmp' Log
grass 7.8.4-2ld: /<>/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+0x261): undefined reference to `bcmp' Log
kbdd 0.6-4libkbdd.c:210: undefined reference to `_kbdd_proceed_event' Log
lagan 2.0-6./src/multial.c:829: undefined reference to `scoreOpp' Log
libnetfilter-acct 1.0.3-3./examples/nfacct-del.c:22: undefined reference to `nfacct_alloc' Log
libnetfilter-cthelper 1.0.0-1./examples/nfct-helper-get.c:13: undefined reference to `nfct_helper_alloc' Log
libnetfilter-cttimeout 1.0.0-2./examples/nfct-timeout-add.c:35: undefined reference to `nfct_timeout_alloc' Log
libnetfilter-queue 1.0.3-1./utils/nfqnl_test.c:83: undefined reference to `nfq_set_verdict' Log
libraw 0.20.2-1./src/preprocessing/raw2image.cpp:262: undefined reference to `__kmpc_for_static_fini' Log
librsb 1.2.0.9+real+dfsg-1ld: /<>/.libs/librsb.so: undefined reference to `__kmpc_barrier' Log
limesuite 20.01.0+dfsg-2ld: CMakeFiles/LimeQuickTest.dir/LimeSDRTest.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
m4 1.4.18-4./lib/./xalloc.h:120: undefined reference to `__muloti4' Log
mailfilter 0.8.7-1ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libfl.so: undefined reference to `yylex' Log
mlv 3.1.0-4./MLV/input_box.c:883: undefined reference to `goUpInHistory_NTS' Log
msxpertsuite 5.8.7-1./debian/build/libmass/./libmass/Trace.cpp:1535: 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
otb 7.2.0+dfsg-1./obj-x86_64-linux-gnu/Modules/Wrappers/ApplicationEngine/src/./Modules/Wrappers/ApplicationEngine/src/otbWrapperApplicationRegistry.cxx:302: undefined reference to `itk::Directory::GetNumberOfFiles()' Log
php7.4 7.4.11-1./ext-build/./Zend/zend_vm_execute.h:3754: undefined reference to `DTRACE_EXCEPTION_CAUGHT_ENABLED' Log
plplot 5.15.0+dfsg-15(.text.caml_startup_common+0x52): undefined reference to `caml_data_segments' Log
postgresql-12 12.4-3./build/src/backend/utils/sort/./build/../src/backend/utils/sort/tuplesort.c:1271: undefined reference to `TRACE_POSTGRESQL_SORT_DONE' Log
postgresql-13 13.0-6./build/src/backend/utils/sort/./build/../src/backend/utils/sort/tuplesort.c:1351: undefined reference to `TRACE_POSTGRESQL_SORT_DONE' 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.2-2./vm.c:1764: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED' Log
soapyremote 0.5.2-1ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
soapysdr 0.7.2-1ld: ../lib/libSoapySDR.so.0.7.2: undefined reference to `pthread_create' Log
spring 104.0+dfsg-7atomic_base.h:384: undefined reference to `__atomic_is_lock_free' Log
tesseract 4.1.1-2./src/lstm/weightmatrix.cpp:296: undefined reference to `__kmpc_for_static_fini' Log
usermode 1.113-4./userhelper.c:241: undefined reference to `powl' Log
vte2.91 0.62.0-3./build-udeb/meson-private/tmpuf6cylq1/./build-udeb/meson-private/tmpuf6cylq1/testfile.cpp:17: undefined reference to `fdwalk' Log
wxhexeditor 0.24+repack-1./src/HexDialogs.cpp:2771: undefined reference to `__kmpc_dispatch_next_4u' Log
yade 2020.01a-10./debian/build/CMakeFiles/CMakeTmp/./debian/build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' Log
52 errors
Return to the list