Package: check
Version: 0.9.8-1
Followup-For: Bug #605207

If the package maintainer does not have time for a proper fix which 
adds a .so, we can just make pkg-config return -lcheck_pic, see the 
attached patch.

'check' is needed by the next BlueZ version, which fails to 
build with the current 'check' Debian package with this error:

CCLD   unit/test-eir
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libcheck.a 
(check.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be
used when making a shared object; recompile with -fPIC 
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libcheck.a:
could not read symbols: Bad value collect2: ld returned 1 exit status
make[1]: *** [unit/test-eir] Error 1 make: *** [all] Error 2

Linking to libcheck_pic.a makes the compilation work again.

See http://thread.gmane.org/gmane.linux.bluez.kernel/18403

Regards,
   Antonio Ospite
   http://ao2.it

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (600, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-rc2-ao2 (SMP w/1 CPU core)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages check depends on:
ii  dpkg          1.16.1.1      
ii  install-info  4.13a.dfsg.1-8

check recommends no packages.

check suggests no packages.

-- no debconf information
On Debian systems a libcheck_pic.a is generated for dynamic linking, expose 
that in the .pc file, to avoid errors like the following from BlueZ:

CCLD   unit/test-eir
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libcheck.a (check.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be
used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib/libcheck.a:
could not read symbols: Bad value collect2: ld returned 1 exit status
make[1]: *** [unit/test-eir] Error 1 make: *** [all] Error 2

See http://thread.gmane.org/gmane.linux.bluez.kernel/18403

Signed-off-by: Antonio Ospite <osp...@studenti.unina.it>

---
 check.pc.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: check-0.9.8/check.pc.in
===================================================================
--- check-0.9.8.orig/check.pc.in
+++ check-0.9.8/check.pc.in
@@ -7,5 +7,5 @@
 Description: A unit test framework for C
 URL: http://check.sourceforge.net
 Version: @VERSION@
-Libs: -L${libdir} -lcheck
+Libs: -L${libdir} -lcheck_pic
 Cflags: -I${includedir}

Reply via email to