Skip to content

Please link tests with all libraries #94

@GoogleCodeExporter

Description

@GoogleCodeExporter
When building on Debian or Ubuntu, the build will fail with:

> /usr/bin/cc   -Wall -W -Wno-pointer-sign -Wmissing-declarations 
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wbad-function-cast -Wcast-qual 
-Wno-pointer-sign -fprofile-arcs -ftest-coverage -O2 -g -DNDEBUG    
CMakeFiles/testgcal.dir/utest.c.o CMakeFiles/testgcal.dir/utest_contact.c.o 
CMakeFiles/testgcal.dir/utest_debug.c.o CMakeFiles/testgcal.dir/utest_edit.c.o 
CMakeFiles/testgcal.dir/utest_gcal.c.o CMakeFiles/testgcal.dir/utest_query.c.o 
CMakeFiles/testgcal.dir/utest_screw.c.o 
CMakeFiles/testgcal.dir/utest_userapi.c.o 
CMakeFiles/testgcal.dir/utest_xmlmode.c.o 
CMakeFiles/testgcal.dir/utest_xpath.c.o CMakeFiles/testgcal.dir/utils.c.o  -o 
testgcal -rdynamic ../src/libgcal.so.0.9.6 -lcheck_pic -lrt -lm -lcurl -lxml2 
-Wl,-rpath,/«PKGBUILDDIR»/obj-x86_64-linux-gnu/src 
> /usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libcheck_pic.a(check
_pack.o): undefined reference to symbol 
'__pthread_unregister_cancel@@GLIBC_2.3.3'
> /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from 
command line
> collect2: error: ld returned 1 exit status

The tests use symbols from libthread, but don't include it on the linker 
command line. Attached patch fixes the build.

Original issue reported on code.google.com by andreas....@gmail.com on 25 Oct 2013 at 5:57

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions