Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 4.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
adplug 2.2.1+dfsg3-0.4../src/.libs/libadplug.so: undefined reference to `set_mul' Log
afterstep 2.2.12-10./DEB-build-tree/build-dynamic/libAfterBase/asvector.c:299: undefined reference to `vector_move_data_up' Log
alliance 5.1.1-1.1AAstar.cpp:871: undefined reference to `TMatrix::operator[](int)' 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
arc-gui-clients 0.4.6-3./obj-x86_64-linux-gnu/src/arcproxy-ui/./src/common/arcproxy-utils.cpp:1564: undefined reference to `Arc::XMLNode::operator std::__cxx11::basic_string, std::allocator >() const' Log
btfs 2.12-1./src/btfs.cc:373: undefined reference to `libtorrent::session_handle::wait_for_alert(boost::chrono::duration >)' Log
busybox 1:1.22.0-19./build/udeb/archival/tar.c:1180: undefined reference to `unpack_Z_stream' Log
bwm-ng 0.6.1-2./src/output.c:387: undefined reference to `dyn_bit_value2str' Log 757167
coinor-cbc 2.8.12-1./.libs/libCbcSolver.so: undefined reference to `virtual thunk to OsiClpSolverInterface::getColName[abi:cxx11](int, unsigned int) const' Log
condor 8.4.11~dfsg.1-1ld: CMakeFiles/ec2_gahp.dir/io_loop_pthread.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' 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
einspline 0.9.2-2./src/time_multi.c:1021: undefined reference to `eval_UBspline_2d_c_vg' Log
ember 0.7.2+dfsg-1./src/services/config/ConfigService.cpp:314: undefined reference to `varconf::ParseError::operator std::__cxx11::basic_string, std::allocator >()' Log
entropybroker 2.8-3stl_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
funguloids 1.06-12./src/menu.cpp:294: undefined reference to `Ogre::UTFString::operator std::__cxx11::basic_string, std::allocator >() const' Log
gcc-6 6.4.0-1conftest.c:142: undefined reference to `setproctitle' Log
gcc-6-cross 24conftest.c:142: undefined reference to `setproctitle' Log
gcc-6-cross-ports 22conftest.c:142: undefined reference to `setproctitle' Log
gcc-7 7.1.0-9conftest.c:142: undefined reference to `setproctitle' Log
gcc-h8300-hms 1:3.4.6+dfsg2-4../../gcc/cp/except.c:(.text+0xf64): undefined reference to `libc_name_p' 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
gtkmathview 0.8.0-14./auto/dumpEntitiesTable.cc:43: undefined reference to `GdomeSmartDOM::GdomeString::operator std::__cxx11::basic_string, std::allocator >() const' Log
kbdd 0.6-4libkbdd.c:162: undefined reference to `_init_windows' Log
kwave 0.9.2-1-2./obj-x86_64-linux-gnu/libgui/./libgui/OverViewCache.cpp:310: undefined reference to `Kwave::MultiTrackSource::operator[](unsigned int)' Log
le 1.16.3-1./src/user.cc:1630: undefined reference to `operator new(unsigned long)' Log
libbpp-phyl 2.3.1-5../src/libbpp-phyl.so.11.0.0: undefined reference to `virtual thunk to bpp::AbstractParameterAliasable::getAliases[abi:cxx11]() const' Log
libnetfilter-acct 1.0.2-1.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
marsshooter 0.7.6-1./obj-x86_64-linux-gnu/src/./src/Locales/locales.cpp:156: undefined reference to `sf::String::operator std::__cxx11::basic_string, std::allocator >() const' Log
mathic 1.0~git20160320-4gtest.h:277: undefined reference to `mathic::PairQueue<(anonymous namespace)::PQConDeconCounterConf>::SupportRetirement' Log
mgetty 1.1.36-3pbm2g3.c:(.text+0x2e8): undefined reference to `putwhitespan' 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
mkvtoolnix 13.0.0-2./src/propedit/attachment_target.cpp:253: undefined reference to `libebml::EbmlString::operator std::__cxx11::basic_string, std::allocator > const&() const' 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+0x9ae1): undefined reference to `llvm_gcda_start_file' Log
mpqc3 0.0~git20170114-4CheckSymbolExists.c:(.text+0x19): undefined reference to `pthread_create' 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
opennebula 4.12.3+dfsg-3.1.xmlrpc_test/xmlrpc_test.d1fe1a.cc:(.text+0x411): undefined reference to `xmlrpc_c::value_string::operator std::__cxx11::basic_string, std::allocator >() const' Log
opensips 2.2.2-3(.text+0x20): undefined reference to `main' Log
pfstools 2.0.5-2ld: CMakeFiles/pfsglview.dir/pfsglview.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
php7.0 7.0.20-2./ext-build/./main/main.c:1563: undefined reference to `DTRACE_REQUEST_STARTUP' Log
php7.1 7.1.6-2./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.7.1+dfsg-4dlopen.cpp:(.text+0x6): undefined reference to `dlopen' 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
ruby2.3 2.3.3-1./array.c:472: undefined reference to `RUBY_DTRACE_ARRAY_CREATE_ENABLED' 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
solarpowerlog 0.24-6./src/configuration/Registry.cpp:90: undefined reference to `libconfig::Setting::operator std::__cxx11::basic_string, std::allocator >() const' 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
supercollider 1:3.7.0~repack-4./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/./obj-x86_64-linux-gnu/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: undefined reference to `pthread_create' 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-2./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
undertaker 1.6.1-4src/traceutil-native.c:(.text+0x4df): undefined reference to `addAddr' 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
wmgtemp 1.1-3./src/wmgeneral/misc.c:122: undefined reference to `list_cons' Log
wxhexeditor 0.23+repack-2./src/HexDialogs.cpp:990: undefined reference to `__kmpc_fork_call' Log
xmltooling 1.6.0-4./xmltooling/util/PThreads.cpp:194: undefined reference to `pthread_attr_setstacksize' Log
zoom-player 1.1.5~dfsg-3./src/tokenise.c:290: undefined reference to `lookup_word' Log
76 errors
Return to the list