Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 6.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
PackageVersionSupposed error messageFull log Bug report
adplug 2.2.1+dfsg3-0.4../src/.libs/libadplug.so: undefined reference to `set_mul' Log
afterstep 2.2.12-11.1./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:299: undefined reference to `vector_move_data_up' Log
alliance 5.1.1-3AAstar.cpp:871: undefined reference to `TMatrix::operator[](int)' Log
apt 1.6.1./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
bandwidthd 2.0.1+cvs20090917-11bandwidthd.c:696: undefined reference to `Credit' Log 757040
condor 8.6.8~dfsg.1-2ld: CMakeFiles/ec2_gahp.dir/io_loop_pthread.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
deal.ii 8.5.1-3./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
elektra 0.8.14-5.1./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
eterm 0.9.6-5./.libs/libEterm.so: undefined reference to `posix_get_pty' Log
freecdb 0.75cdbmake.c:59: undefined reference to `getch' Log 757409
gcc-7 7.3.0-17conftest.c:142: undefined reference to `setproctitle' Log
gcc-7-cross 20conftest.c:142: undefined reference to `setproctitle' Log
gcc-7-cross-ports 16conftest.c:142: undefined reference to `setproctitle' Log
gcc-8 8-20180425-1conftest.c:142: undefined reference to `setproctitle' Log
gcc-8-cross-ports 8conftest.c:142: undefined reference to `setproctitle' Log
gerbera 1.1.0+dfsg-2./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
gravit 0.5.1+dfsg-2ld: frame.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
gringo 5.2.2-5./build/hardening_mt/CMakeFiles/CMakeTmp/./build/hardening_mt/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
kbdd 0.6-4libkbdd.c:162: undefined reference to `_init_windows' Log
krita 1:4.0.1+dfsg-1atomic:220: undefined reference to `__atomic_is_lock_free' Log
latrace 0.5.11-1:1481: undefined reference to `lt_config_wrap' Log
libguestfs 1:1.38.0-4./debian/build-3/conftest.c:128: undefined reference to `_set_invalid_parameter_handler' Log
libnetfilter-acct 1.0.3-1./examples/nfacct-del.c:22: undefined reference to `nfacct_alloc' Log
libnetfilter-cthelper 1.0.0-1./examples/nfct-helper-get.c:47: undefined reference to `nfct_helper_nlmsg_build_hdr' Log
libnetfilter-cttimeout 1.0.0-2./examples/nfct-timeout-add.c:35: undefined reference to `nfct_timeout_alloc' Log
librsl 1.43-1.2libfl.so: undefined reference to `yylex' Log 742219
librsync 0.9.7-10./.libs/librsync.so: undefined reference to `rs_appendflush' Log
m4 1.4.18-1./src/../lib/xalloc.h:107: undefined reference to `__muloti4' Log
madness 0.10.1~gite4aa500e-10CheckFunctionExists.c:17: undefined reference to `pow' Log
make-dfsg 4.2.1-1./debian/build-make-guile/glob/../../../glob/glob.c:581: undefined reference to `__alloca' Log
mandos 1.7.19-1./plugins.d/askpass-fifo.c:67: undefined reference to `__ubsan_handle_type_mismatch_v1' Log 750516
mia 2.4.6-2./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-2./MLV/input_box.c:313: undefined reference to `change_position_input_box_NTS' Log
mpqc3 0.0~git20170114-4CheckSymbolExists.c:(.text+0x19): undefined reference to `pthread_create' Log
opensips 2.2.2-3: undefined reference to `mhomed' Log
php7.0 7.0.29-1./ext-build/./main/main.c:1586: undefined reference to `DTRACE_REQUEST_STARTUP' Log
php7.1 7.1.16-1./ext-build/./main/main.c:1634: undefined reference to `DTRACE_REQUEST_STARTUP' Log
php7.2 7.2.4-1./ext-build/./main/main.c:1630: undefined reference to `DTRACE_REQUEST_STARTUP' Log
ptouch-driver 1.4.2-3./rastertoptch.c:966: undefined reference to `emit_feed_cut_mirror' Log
rarcrack 0.2-1rarcrack.c:(.text+0x31c): undefined reference to `savestatus' Log
recode 3.6-23./.libs/librecode.so: undefined reference to `aliases_lookup' Log
roboptim-core 2.0-7.1./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
ruby-curses 1.2.4-1conftest.c:14: undefined reference to `init' Log
ruby-rjb 1.5.5-2conftest.c:16: undefined reference to `locale_charset' Log
ruby2.5 2.5.1-1./array.c:478: undefined reference to `RUBY_DTRACE_ARRAY_CREATE_ENABLED' Log
sagan 1.1.8-1./conftest.c:120: undefined reference to `strlcat' Log
sfcgal 1.3.5-1./obj-x86_64-linux-gnu/test/regress/convex_hull/./test/regress/convex_hull/main.cpp:63: undefined reference to `boost::program_options::options_description::m_default_line_length' Log
slic3r-prusa 1.39.1+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
soapyremote 0.4.3-1ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
sopt 2.0.0-4ld: CMakeFiles/common_catch_main_object.dir/common_catch_main.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
suitesparse 1:5.2.0+dfsg-1libgraphblas.so.2.0.1: undefined reference to `__fpclassify' Log
teeworlds 0.6.4+dfsg-1./src/engine/shared/netban.h:181: undefined reference to `CNetBan::CBanPool::Reset()' Log
ucommon 7.0.0-12../corelib/.libs/libucommon.so: undefined reference to `__atomic_is_lock_free' Log
usermode 1.109-1./userhelper.c:236: undefined reference to `powl' Log
wmfire 1.2.4-2./src/wmfire.c:263: undefined reference to `draw_fire' Log
xdms 1.3.2-6./src/u_heavy.c:62: undefined reference to `decode_c' Log
xmltooling 1.6.4-1./xmltooling/util/PThreads.cpp:194: undefined reference to `pthread_attr_setstacksize' Log
58 errors
Return to the list