Undefined references can have different reasons. Here are some:
behavior.
clang is following by default the C99 standard while gcc promote GNU89.
will fix the issue.
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)
Package | Version | Supposed error message | Full log |
Bug report |
apophenia | 1.0+ds-8 | ld: ../.libs/libapophenia.so: undefined reference to `__atomic_compare_exchange'
| Log |
|
audacity | 2.3.3-1 | atomic:224: undefined reference to `__atomic_is_lock_free'
| Log |
757531
|
bandwidthd | 2.0.1+cvs20090917-11 | bandwidthd.c:715: undefined reference to `Credit'
| Log |
757040
|
barcode | 0.99-3 | ./code11.c:107: undefined reference to `rpl_calloc'
| Log |
|
beignet | 1.3.2-7 | ld: libgbe.so: undefined reference to `llvm::cfg::Update::dump() const'
| Log |
750380
|
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 |
|
chipmunk | 7.0.3-2 | ./obj-x86_64-linux-gnu/demo/./demo/ContactGraph.c:125: undefined reference to `_Block_object_dispose'
| Log |
|
cpio | 2.13+dfsg-2 | ./obj/gnu/../../gnu/xmalloc.c:100: undefined reference to `__muloti4'
| Log |
|
cpl-plugin-hawki | 2.4.6+dfsg-1 | ld: ../../hawki/.libs/libhawki.so: undefined reference to `__kmpc_for_static_fini'
| Log |
|
eccodes | 2.17.0-2 | ld: ../lib/libeccodes.so.0: undefined reference to `omp_init_nest_lock'
| Log |
|
elektroid | 1.1-1 | ld: connector.o: undefined reference to symbol 'ceil@@GLIBC_2.2.5'
| Log |
|
eterm | 0.9.6-6 | ld: ./.libs/libEterm.so: undefined reference to `posix_get_pty'
| Log |
|
gabedit | 2.5.0-1 | ./src/Spectrum/NMRSpectrum.c:725: undefined reference to `__kmpc_for_static_init_4'
| Log |
|
gcc-10-cross | 7 | conftest.c:(.text.startup+0x7): undefined reference to `getexecname'
| Log |
|
gcc-10-cross-ports | 6 | conftest.c:72: undefined reference to `getexecname'
| Log |
|
gcc-9-cross | 21 | conftest.c:72: undefined reference to `getexecname'
| Log |
|
gcc-9-cross-ports | 18 | conftest.c:72: undefined reference to `getexecname'
| Log |
|
gdbm | 1.18.1-5 | ./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 |
|
goo | 0.155+ds-2 | ./c/g2c/../grt.c:1047: undefined reference to `_CALL0'
| Log |
|
grass | 7.8.2-1 | ld: /<>/dist.x86_64-pc-linux-gnu/lib/libgrass_gmath.7.8.so: undefined reference to `__kmpc_reduce'
| Log |
|
integrit | 4.1-1.1 | cdb.c:(.text+0x261): undefined reference to `bcmp'
| Log |
|
kbdd | 0.6-4 | libkbdd.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-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 |
|
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:3422: undefined reference to `__kmpc_for_static_fini'
| Log |
|
limesuite | 20.01.0+dfsg-2 | ld: 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 |
|
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_for_static_init_4'
| Log |
|
mydumper | 0.9.5-1.1 | ld: CMakeFiles/mydumper.dir/mydumper.c.o: undefined reference to symbol 'ceilf@@GLIBC_2.2.5'
| Log |
|
nfft | 3.3.2-2 | ld: ../.libs/libnfft3l_threads.so: undefined reference to `__atomic_compare_exchange'
| Log |
|
opensta | 0~20191111gitc018cb2+dfsg-1 | ld: ../app/libOpenSTA.a(DispatchQueue.cc.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
| Log |
|
php7.4 | 7.4.5-1 | ./ext-build/./Zend/zend_vm_execute.h:3739: undefined reference to `DTRACE_EXCEPTION_CAUGHT_ENABLED'
| Log |
|
plplot | 5.15.0+dfsg-12 | (.text+0x4a): undefined reference to `caml_data_segments'
| Log |
|
postgresql-12 | 12.2-4 | ./build/src/backend/utils/sort/./build/../src/backend/utils/sort/tuplesort.c:1271: undefined reference to `TRACE_POSTGRESQL_SORT_DONE'
| Log |
|
ptouch-driver | 1.4.2-3 | ./rastertoptch.c:(.text+0x13be): undefined reference to `RLE_store_empty_lines'
| Log |
|
rarcrack | 0.2-1 | rarcrack.c:(.text+0x541): undefined reference to `nextpass'
| Log |
|
recode | 3.6-24 | ld: ./.libs/librecode.so: undefined reference to `aliases_lookup'
| Log |
|
ruby-curses | 1.2.4-1 | conftest.c:15: undefined reference to `init'
| Log |
|
ruby2.7 | 2.7.0-6 | ./vm.c:1764: undefined reference to `RUBY_DTRACE_METHOD_RETURN_ENABLED'
| Log |
|
soapyremote | 0.5.1-2 | ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
| Log |
|
soapysdr | 0.7.2-1 | ld: ../lib/libSoapySDR.so.0.7.2: undefined reference to `pthread_create'
| Log |
|
spring | 104.0+dfsg-6 | atomic_base.h:377: 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-2 | ./userhelper.c:241: 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-7 | ./debian/build/CMakeFiles/CMakeTmp/./debian/build/CMakeFiles/CMakeTmp/src.c:11: undefined reference to `pthread_create'
| Log |
|