Debian Package rebuild

Rebuild of the Debian archive with clang

"Missing symbols at link time" build failure(s)
clang 3.8.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
PackageVersionSupposed error messageFull log Bug report
adplug 2.2.1+dfsg3-0.3../src/.libs/libadplug.so: undefined reference to `set_mul' Log
afterstep 2.2.12-8./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-4cpp_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
busybox 1:1.22.0-19./build/udeb/archival/tar.c:1180: undefined reference to `unpack_Z_stream' Log
clfft 2.12.1-1../library/libclFFT.so.2.12.1: undefined reference to `pthread_mutexattr_destroy' Log
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.8~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.0+dfsg1-1ld: ../../recipes/.libs/visir_util_run_swarp.o: undefined reference to symbol 'sem_close@@GLIBC_2.2.5' Log
cppformat 1.1.0+ds-3gtest-port.h:1521: undefined reference to `pthread_getspecific' 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
einspline 0.9.2-2./src/time_multi.c:1021: undefined reference to `eval_UBspline_2d_c_vg' Log
eterm 0.9.6-4./.libs/libEterm.so: undefined reference to `posix_get_pty' Log
freecdb 0.75cdbmake.c:59: undefined reference to `getch' Log 757409
gcc-4.9 4.9.4-2conftest.c:60: undefined reference to `shl_load' Log
gcc-h8300-hms 1:3.4.6+dfsg2-4../../gcc/cp/except.c:(.text+0xf68): undefined reference to `libc_name_p' Log
gngb 20060309-3.1./src/cpu.c:2860: undefined reference to `gbcpu_exec_one' Log 757486
gravit 0.5.1+dfsg-2ld: frame.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
icedove 1:45.2.0-4./obj-icedove/mfbt/./mozilla/mfbt/double-conversion/bignum-dtoa.cc:410: undefined reference to `ceil' 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
le 1.14.9-2./src/user.cc:1630: undefined reference to `operator new(unsigned long)' Log
libbpp-seq-omics 2.2.0-1../src/libbpp-seq-omics.so: undefined reference to `virtual thunk to bpp::EdSymbolList::toString[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
lirc 0.9.0~pre1-1.2transmit.c:389: undefined reference to `send_code' Log
maq 0.7.1-7./get_pos.c:33: undefined reference to `assemble_fill_buffer' Log
mate-applets 1.14.1-1./cpufreq/src/cpufreq-monitor-libcpufreq.c:118: undefined reference to `cpupower_is_cpu_online' Log
mgetty 1.1.36-3pbm2g3.c:(.text+0x349): undefined reference to `putwhitespan' Log
mm3d 1.3.7-2keycfg.cc:(.text+0x8ed1): 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
opensaml2 2.5.5-1../saml/.libs/libsaml.so: undefined reference to `virtual thunk to xmltooling::AbstractComplexElement::getOrderedChildren[abi:cxx11]() const' Log
pfstools 2.0.5-2ld: CMakeFiles/pfsglview.dir/pfsglview.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' Log
php5 5.6.24+dfsg-1./apache2-build/./main/main.c:1621: undefined reference to `DTRACE_REQUEST_STARTUP' Log
php7.0 7.0.10-1./ext-build/./main/main.c:1565: undefined reference to `DTRACE_REQUEST_STARTUP' Log
ptouch-driver 1.4.2-1./rastertoptch.c:965: undefined reference to `emit_feed_cut_mirror' Log
qt4-x11 4:4.8.7+dfsg-8.obj/release-shared/window.o:(.rodata._ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE[_ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE]+0x10): undefined reference to `Phonon::ObjectDescriptionModel<(Phonon::ObjectDescriptionType)0>::metaObject() const' Log
rarcrack 0.2-1rarcrack.c:(.text+0x329): undefined reference to `savestatus' Log
recode 3.6-22./.libs/librecode.so: undefined reference to `aliases_lookup' Log
ruby2.3 2.3.1-5./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
shibboleth-sp2 2.5.6+dfsg1-2../shibsp/.libs/libshibsp.so: undefined reference to `virtual thunk to xmltooling::AbstractComplexElement::getOrderedChildren[abi:cxx11]() const' Log
stacks 1.42-1ld: ./htslib/libhts.a(thread_pool.o): undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5' Log
teeworlds 0.6.3+dfsg-3./src/engine/shared/netban.h:181: undefined reference to `CNetBan::CBanPool::Reset()' 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
xdms 1.3.2-6./src/u_heavy.c:62: undefined reference to `decode_c' Log
xl2tpd 1.3.6+dfsg-4./control.c:1741: undefined reference to `check_control' Log
zoom-player 1.1.5~dfsg-3./src/tokenise.c:290: undefined reference to `lookup_word' Log
54 errors
Return to the list