On Sat, May 03, 2008 at 01:21:46PM +0100, Graham Cobb wrote:
> 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.
Alternatively, we could just link libcheck in statically (it's just for
the test suite, it's not getting shipped AFAICT), I think this is what I
did for the Debian/Ubuntu packages; I am not sure libcheck_pic.a is
provided by all distributions anyway.
Michael
-------------------------------------------------------------------------
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