Ticket #833 (closed defect: fixed)
[PATCH] mock-plugin must not be linked with libcheck
| Reported by: | mbanck | Owned by: | bricks |
|---|---|---|---|
| Priority: | high | Milestone: | OpenSync 0.40 |
| Component: | OpenSync: Build Environment | Version: | 0.39 |
| Severity: | major | Keywords: | |
| Cc: |
Description
The tests/mock-plugin/mock_* files do not #include <check.h> and do not seem to otherwise need it. It would be therefore best to not link them with libcheck, as this can have issues on some architectures, see e.g.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465048
/usr/bin/cc -fPIC -g -Wall -O2 -O2 -g -shared -Wl,-soname,mock-sync.so -o mock-sync.so "CMakeFiles/mock-sync.dir/mock_sync.o" -L/build/buildd/opensync-0.36/debian/build-python2.4/opensync -lopensync -lcheck -lglib-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lxml2 -lsqlite3 /usr/bin/ld: /usr/lib/gcc/hppa-linux-gnu/4.2.3/../../../libcheck.a(check.o): relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/hppa-linux-gnu/4.2.3/../../../libcheck.a: could not read symbols: Bad value collect2: ld returned 1 exit status
Attachments
Change History
Changed 3 years ago by mbanck
-
attachment
mock_plugin_no_libcheck_link.fix.patch
added
comment:1 Changed 3 years ago by felixmoeller
- Summary changed from mock-plugin must not be linked with libcheck to [PATCH] mock-plugin must not be linked with libcheck
comment:2 Changed 3 years ago by dgollub
- Status changed from new to closed
- Resolution set to fixed
Patch commited with r3605. Thanks for the patch!
comment:3 Changed 2 years ago by ChrisH
- Priority changed from normal to high
- Status changed from closed to reopened
- Version changed from 0.37 to 0.39
- Resolution fixed deleted
- Severity changed from normal to major
I reopen as this happened again on hppa Linux using r5835
The change commited with r3605 is no longer complete in place. After manually adding the fix it works, see http://opensync.org/testing/index.php?project=OpenSync&date=2009-09-24#Experimental
svn diff
Index: tests/mock-plugin/CMakeLists.txt
===================================================================
--- tests/mock-plugin/CMakeLists.txt (revision 5835)
+++ tests/mock-plugin/CMakeLists.txt (working copy)
@@ -3,7 +3,7 @@
OPENSYNC_PLUGIN_ADD( mock-sync mock_sync.c )
OPENSYNC_FORMAT_ADD( mock-format mock_format.c )
-TARGET_LINK_LIBRARIES( mock-sync opensync ${CHECK_LIBRARIES} )
+TARGET_LINK_LIBRARIES( mock-sync opensync )
TARGET_LINK_LIBRARIES( mock-format opensync )
###### INSTALL ###################
comment:4 Changed 2 years ago by ChrisH
from snv log:
r4484 | bricks | 2008-12-29 16:30:35 +0100 (Mon, 29 Dec 2008) | 1 line
mock-sync requires libcheck therefore it should be linked to the target
comment:5 Changed 2 years ago by dgollub
- Owner changed from dgollub to bricks
- Status changed from reopened to new
- Component changed from OpenSync to OpenSync: Build Environment
Björn, could you have a look on that?
I could imagine we dropped all fail_unless() calls inside mock-sync - so there is no need to do so.

mock_plugin_no_libcheck_link.fix.patch