« Return to Thread: g_hash_table_get_keys

Re: g_hash_table_get_keys

by Graham Cobb-4 :: Rate this Message:

Reply to Author | View in Thread

On Friday 02 May 2008 23:56:02 Daniel Gollub wrote:
> It's quite easy. Make sure you have enabled OPENSYNC_UNITTESTS and the
> tests get build. I use "ccmake" for this, you can also do this
> with -DOPENSYNC_UNITTESTS=ON

The tests won't build (let alone run!) for me:

[100%] Building C object
tests/mock-plugin/CMakeFiles/mock-sync.dir/mock_sync.o
Linking C shared module mock-sync.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libcheck.a(check.o):
relocation R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/libcheck.a: could not
read symbols: Bad value

There seem to be two check libraries on my /usr/lib (same as /usr/lib64 on a
debian lenny system): libcheck.a and libcheck_pic.a.  The build works if I
add the line:

SET( CHECK_LIBRARIES "-lcheck_pic" )
 
to the top level CMakeLists.txt just after the FIND_PACKAGE( Check ).

Presumably there is some way in CMake to tell FIND_PACKAGE to look for
libcheck_pic.a and only if it is not found, to look for libcheck.a.

Graham

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Opensync-devel mailing list
Opensync-devel@...
https://lists.sourceforge.net/lists/listinfo/opensync-devel

 « Return to Thread: g_hash_table_get_keys