Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 5.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
adplug 2.2.1+dfsg3-0.4../src/.libs/libadplug.so: undefined reference to `set_mul' Log
afterstep 2.2.12-11./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:299: undefined reference to `vector_move_data_up' Log
aqsis 1.8.2-8cpp_iterator.hpp:1357: undefined reference to `boost::wave::grammars::cpp_grammar_gen, std::allocator, boost::wave::util::CowString >, char*> > > > >, std::__cxx11::list, std::allocator, boost::wave::util::CowString >, char*> > > >, boost::fast_pool_allocator, std::allocator, boost::wave::util::CowString >, char*> > > >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> > >::parse_cpp_grammar(boost::wave::cpplexer::lex_iterator, std::allocator, boost::wave::util::CowString >, char*> > > > > const&, boost::wave::cpplexer::lex_iterator, std::allocator, boost::wave::util::CowString >, char*> > > > > const&, boost::wave::util::file_position, std::allocator, boost::wave::util::CowString >, char*> > > const&, bool&, boost::wave::cpplexer::lex_token, std::allocator, boost::wave::util::CowString >, char*> > > >&, std::__cxx11::list, std::allocator, boost::wave::util::CowString >, char*> > > >, boost::fast_pool_allocator, std::allocator, boost::wave::util::CowString >, char*> > > >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >&)' Log
bandwidthd 2.0.1+cvs20090917-10bandwidthd.c:696: undefined reference to `Credit' Log 757040
busybox 1:1.22.0-19./build/udeb/archival/tar.c:1180: undefined reference to `unpack_Z_stream' Log
cpl-plugin-visir 4.3.3+dfsg-1ld: ../../recipes/.libs/visir_util_run_swarp.o: undefined reference to symbol 'sem_close@@GLIBC_2.2.5' Log
crimson 0.5.2-1.1./src/cf/./path.h:76: undefined reference to `vtable for Path' Log
ddccontrol 0.4.2-11./src/ddcpci/i2c-algo-bit.c:507: undefined reference to `readbytes' Log 757268
deal.ii 8.4.2-2./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' Log
entropybroker 2.9-1stl_algobase.h:200: undefined reference to `CryptoPP::VariableKeyLength<16u, 16u, 32u, 8u, 4u, 0u>::DEFAULT_KEYLENGTH' Log
eterm 0.9.6-5./.libs/libEterm.so: undefined reference to `posix_get_pty' Log
freecdb 0.75cdbmake.c:97: undefined reference to `getch' Log 757409
gcc-7 7.2.0-1conftest.c:142: undefined reference to `setproctitle' Log
gcc-7-cross 6conftest.c:142: undefined reference to `setproctitle' Log
gcc-7-cross-ports 4conftest.c:142: undefined reference to `setproctitle' 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
ifrit 4.1.2-5./obj-x86_64-linux-gnu/./build/../core/ishelleventobservers.h:44: undefined reference to `iArray::~iArray()' Log
kbdd 0.6-4libkbdd.c:162: undefined reference to `_init_windows' Log
libnetfilter-acct 1.0.3-1./examples/nfacct-get.c:52: undefined reference to `nfacct_nlmsg_build_hdr' 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
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
mathic 1.0~git20170606-1gtest.h:277: undefined reference to `mathic::PairQueue<(anonymous namespace)::PQConDeconCounterConf>::SupportRetirement' Log
mia 2.4.4-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-1./MLV/input_box.c:313: undefined reference to `change_position_input_box_NTS' Log
mm3d 1.3.7-2keycfg.cc:(.text+0x9411): undefined reference to `llvm_gcda_start_file' Log
ncmpcpp 0.7.4-1./src/browser.cpp:702: undefined reference to `std::__cxx11::basic_string, std::allocator > Format::stringify(Format::List<(Format::ListType)2, char> const&, MPD::Song const*)' Log
octave 4.2.1-2libinterp/.libs/liboctinterp.so: undefined reference to `octave::sys::file_stat::~file_stat()' Log
opensips 2.2.2-3./modules/textops/./../../mem/../dprint.h:162: undefined reference to `ctime_buf' Log
pfstools 2.0.6-2ld: CMakeFiles/pfsglview.dir/pfsglview.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
php7.0 7.0.22-2./ext-build/./main/main.c:1563: undefined reference to `DTRACE_REQUEST_STARTUP' Log
php7.1 7.1.8-1./ext-build/./main/main.c:1611: undefined reference to `DTRACE_REQUEST_STARTUP' Log
pprepair 0.0~20170614-dd91a21-1tss.hpp:84: undefined reference to `boost::detail::get_tss_data(void const*)' Log
prepair 0.7+20160519-417f1bc-1tss.hpp:84: undefined reference to `boost::detail::get_tss_data(void const*)' Log
ptouch-driver 1.4.2-2./rastertoptch.c:966: undefined reference to `emit_feed_cut_mirror' Log
qtbase-opensource-src 5.9.1+dfsg-8> dlopen.cpp:44: error: undefined reference to 'dlopen' Log
qtwebengine-opensource-src 5.9.1+dfsg-3atomic_base.h:362: undefined reference to `__atomic_is_lock_free' 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
sdlbasic 0.0.20070714-5SDLengine.c:267: undefined reference to `Mix_OpenAudio' Log
soapyremote 0.3.2-1ld: CMakeFiles/SoapySDRServer.dir/ServerListener.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
sopt 2.0.0-2ld: CMakeFiles/common_catch_main_object.dir/common_catch_main.cc.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
spring 103.0+dfsg2-1atomic_base.h:354: undefined reference to `__atomic_is_lock_free' Log
stacks 1.46-1ld: ./htslib/libhts.a(thread_pool.o): undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5' Log
teeworlds 0.6.4+dfsg-1./src/engine/shared/netban.h:181: undefined reference to `CNetBan::CBanPool::Reset()' Log
tophat 2.1.1+dfsg-3./src/samtools-0.1.18/bam_sort.c:53: undefined reference to `__ks_insertsort_heap' Log
tpm2-tools 1.1-1./src/tpm2_rc_decode.c:86: undefined reference to `showVersion' 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.0-4./xmltooling/util/PThreads.cpp:194: undefined reference to `pthread_attr_setstacksize' Log
53 errors
Return to the list