Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 7.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 - 7.0.1 - 8svn
PackageVersionSupposed error messageFull log Bug report
389-ds-base 1.4.0.19-3./build/../src/nunc-stans/test/test_nuncstans_stress_core.c:374: undefined reference to `__atomic_add_fetch_8' Log
adplug 2.2.1+dfsg3-1ld: ../src/.libs/libadplug.so: undefined reference to `set_mul' Log
afterstep 2.2.12-12./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:316: undefined reference to `vector_move_data_up' Log
alliance 5.1.1-3AAstar.cpp:871: undefined reference to `TMatrix::operator[](int)' Log
apophenia 1.0+ds-7ld: ../.libs/libapophenia.so: undefined reference to `__atomic_compare_exchange' Log
atomix 3.30.0.1-1ld: src/libatomix.a(canvas_helper.c.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' Log
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-1././src/system/build.cc:167: undefined reference to `__kmpc_for_static_init_8u' Log
cpl-plugin-hawki 2.4.3+dfsg-1ld: ../../hawki/.libs/libhawki.so: undefined reference to `__kmpc_for_static_fini' Log
digikam 4:5.9.0-1./obj-x86_64-linux-gnu/core/libs/rawengine/libraw/./core/libs/rawengine/libraw/demosaic-pack-GPL3/green_equi.c:90: undefined reference to `__kmpc_dispatch_init_4' Log
eccodes 2.10.0-3ld: ../lib/libeccodes.so.0: undefined reference to `omp_init_nest_lock' Log
eterm 0.9.6-5ld: ./.libs/libEterm.so: undefined reference to `posix_get_pty' Log
freecdb 0.75cdbmake.c:59: undefined reference to `getch' Log 757409
gabedit 2.4.8-3./src/Spectrum/NMRSpectrum.c:725: undefined reference to `__kmpc_for_static_init_4' Log
gerbera 1.1.0+dfsg-3./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
goo 0.155-15./c/g2c/../grt.c:1047: undefined reference to `_CALL0' Log
grib-api 1.28.0-2./debian/build-py2/src/./src/grib_parse_utils.c:551: undefined reference to `omp_unset_nest_lock' Log
ifrit 4.1.2-6./obj-x86_64-linux-gnu/./build/../shells/generic/iggwidgettext.h:188: undefined reference to `iArray::~iArray()' Log
kbdd 0.6-4libkbdd.c:210: undefined reference to `_kbdd_proceed_event' Log
kopanocore 8.6.91-1./debian/build/conftest.cpp:64: undefined reference to `getpeereid' Log
lagan 2.0-3./src/fchaos.c:532: undefined reference to `findPrev' 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-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
libraw 0.19.2-1./src/libraw_cxx.cpp:3424: undefined reference to `__kmpc_for_static_init_4' Log
librsync 0.9.7-10ld: ./.libs/librsync.so: undefined reference to `rs_appendflush' Log
limereg 1.4.1-4ld: ../lib/.libs/liblimereg.so: undefined reference to `__kmpc_for_static_fini' Log
limesuite 18.06.0+dfsg-1ld: CMakeFiles/LimeQuickTest.dir/LimeSDRTest.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
m4 1.4.18-2./lib/./xalloc.h:120: undefined reference to `__muloti4' Log
mia 2.4.6-3./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
mlv 3.1.0-3./MLV/input_box.c:883: undefined reference to `goUpInHistory_NTS' Log
msxpertsuite 5.7.1-1./debian/build/libmass/./libmass/Trace.cpp:1534: undefined reference to `__kmpc_global_thread_num' Log
nfft 3.3.2-2ld: ../.libs/libnfft3l_threads.so: undefined reference to `__atomic_compare_exchange' Log
odb-api 0.18.1-3CheckFunctionExists.c:17: undefined reference to `sgemm_' Log
pajeng 1.3.4-3./obj-x86_64-linux-gnu/src/tools/./src/tools/pj_equals.cc:250: undefined reference to `__kmpc_for_static_init_4' Log
php7.3 7.3.0-2./ext-build/./Zend/zend_vm_execute.h:2927: undefined reference to `DTRACE_EXCEPTION_CAUGHT_ENABLED' 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-23ld: ./.libs/librecode.so: undefined reference to `aliases_lookup' Log
rocksdb 5.17.2-3atomic_base.h:354: undefined reference to `__atomic_is_lock_free' Log
ruby-curses 1.2.4-1conftest.c:14: undefined reference to `init' Log
slic3r-prusa 1.39.2+dfsg-1./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
soapyremote 0.4.3-1ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
spring 104.0+dfsg-3atomic_base.h:354: undefined reference to `__atomic_is_lock_free' Log
tesseract 4.0.0-1./src/lstm/weightmatrix.cpp:272: undefined reference to `__kmpc_for_static_init_4' Log
usermode 1.109-3./userhelper.c:236: undefined reference to `powl' Log
wmfire 1.2.4-2./src/wmfire.c:263: undefined reference to `draw_fire' Log
wxhexeditor 0.23+repack-3./src/HexDialogs.cpp:2700: undefined reference to `__kmpc_dispatch_init_4u' Log
xmltooling 3.0.3-1./xmltooling/util/PThreads.cpp:177: undefined reference to `pthread_getspecific' Log
51 errors
Return to the list