Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 8.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-13./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:316: undefined reference to `vector_move_data_up' Log
apophenia 1.0+ds-8ld: ../.libs/libapophenia.so: undefined reference to `__atomic_compare_exchange' Log
atomix 3.34.0-1ld: src/libatomix.a(canvas_helper.c.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' Log
audacity 2.3.3-1atomic:224: undefined reference to `__atomic_is_lock_free' Log 757531
bandwidthd 2.0.1+cvs20090917-11bandwidthd.c:696: undefined reference to `Credit' Log 757040
barcode 0.99-3./code11.c:107: undefined reference to `rpl_calloc' Log
ccbuild 2.0.7+git20160227.c1179286-2./obj-x86_64-linux-gnu/./src/system/build.cc:165: undefined reference to `__kmpc_for_static_fini' Log
cpio 2.13+dfsg-2./obj/gnu/../../gnu/xmalloc.c:100: undefined reference to `__muloti4' Log
cpl-plugin-hawki 2.4.6+dfsg-1ld: ../../hawki/.libs/libhawki.so: undefined reference to `__kmpc_for_static_fini' Log
eccodes 2.16.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
freecdb 0.75cdbmake.c:59: undefined reference to `getch' Log 757409
gabedit 2.5.0-1./src/Spectrum/NMRSpectrum.c:725: undefined reference to `__kmpc_for_static_init_4' Log
gcc-10-cross 4conftest.c:(.text.startup+0x7): undefined reference to `getexecname' Log
gcc-10-cross-ports 3conftest.c:72: undefined reference to `getexecname' Log
gcc-9-cross 19conftest.c:72: undefined reference to `getexecname' Log
gcc-9-cross-ports 16conftest.c:72: 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.2-1ld: /<>/dist.x86_64-pc-linux-gnu/lib/libgrass_gpde.7.8.so: undefined reference to `__kmpc_for_static_fini' Log
kopanocore 8.7.0-6./debian/build/conftest.cpp:64: undefined reference to `getpeereid' Log
lagan 2.0-5./src/multial.c:829: undefined reference to `scoreOpp' Log
le 1.16.5-0.1./src/bm.cc:53: undefined reference to `operator delete(void*)' Log
libnetfilter-acct 1.0.3-2./examples/nfacct-get.c:13: 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.19.5-1./src/libraw_cxx.cpp:3443: undefined reference to `__kmpc_critical' Log
m4 1.4.18-4./lib/./xalloc.h:120: undefined reference to `__muloti4' Log
mlv 3.1.0-3./MLV/input_box.c:883: undefined reference to `goUpInHistory_NTS' Log
msxpertsuite 5.8.6-2./debian/build/libmass/./libmass/Trace.cpp:1535: undefined reference to `__kmpc_global_thread_num' Log
mydumper 0.9.5-1ld: CMakeFiles/mydumper.dir/mydumper.c.o: undefined reference to symbol 'ceilf@@GLIBC_2.2.5' 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
ptouch-driver 1.4.2-3./rastertoptch.c:1649: undefined reference to `RLE_store_empty_lines' Log
rarcrack 0.2-1rarcrack.c:(.text+0x529): 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:14: undefined reference to `init' Log
ruby2.5 2.5.7-1./vm.c:1656: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED' Log
ruby2.7 2.7.0-4./vm.c:1764: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED' Log
soapyremote 0.5.1-2ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
soapysdr 0.7.1-3ld: ../lib/libSoapySDR.so.0.7.1: undefined reference to `pthread_create' Log
tesseract 4.1.1-2./src/lstm/weightmatrix.cpp:296: undefined reference to `__kmpc_for_static_fini' Log
ucommon 7.0.0-16ld: ../corelib/.libs/libucommon.so: undefined reference to `__atomic_is_lock_free' Log
usermode 1.113-1./userhelper.c:243: undefined reference to `powl' Log
wxhexeditor 0.24+repack-1./src/HexDialogs.cpp:2771: undefined reference to `__kmpc_dispatch_next_4u' Log
xdms 1.3.2-6./src/u_deep.c:114: undefined reference to `update' Log
xmltooling 3.0.5-1./xmltooling/util/PThreads.cpp:177: undefined reference to `pthread_getspecific' Log
yade 2020.01a-6./debian/build/CMakeFiles/CMakeTmp/./debian/build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create' Log
48 errors
Return to the list