Package: eurephia
Version: 1.0.1-2
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch

Hi,

When build with binutils-gold, the package FTBFS:
...
Linking C executable eurephiadm
/usr/bin/ld: ../common/libeurephiacommon.a(eurephiadb.c.o): undefined reference 
to symbol 'dlopen@@GLIBC_2.1'
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO 
/usr/lib/gcc/i686-linux-gnu/4.5.2/../../../../lib/libdl.so so try adding it to 
the linker command line
collect2: ld returned 1 exit status
make[3]: *** [eurephiadm/eurephiadm] Error 1

The following patch fixes this FTBFS by putting dl as the last library of the
list for the 2 link that fails (tested in Ubuntu):

*** /tmp/tmpPqp1W4

Thanks,
Fabrice

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 
'maverick-proposed'), (500, 'maverick')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-24-generic (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru eurephia-1.0.1/debian/patches/ubuntu-binutils-gold.patch eurephia-1.0.1/debian/patches/ubuntu-binutils-gold.patch
--- eurephia-1.0.1/debian/patches/ubuntu-binutils-gold.patch	1970-01-01 01:00:00.000000000 +0100
+++ eurephia-1.0.1/debian/patches/ubuntu-binutils-gold.patch	2010-12-16 07:05:55.000000000 +0100
@@ -0,0 +1,26 @@
+Description: Fix FTBFS with binutils-gold because of --as-needed. The fix only
+ consists in moving ld lib at the end of the linked libraries.
+Author: Fabrice Coutadeur <fabric...@ubuntu.com>
+
+--- eurephia-1.0.1.orig/eurephiadm/CMakeLists.txt
++++ eurephia-1.0.1/eurephiadm/CMakeLists.txt
+@@ -69,7 +69,7 @@ SET(MAN_PAGES
+ 
+ # Link in the following dynamic libraries with eurephiadm.
+ # ${EXTRA_LIBS} contains libxml2, libxslt and openssl library names
+-TARGET_LINK_LIBRARIES(eurephiadm dl crypto common ${EXTRA_LIBS})
++TARGET_LINK_LIBRARIES(eurephiadm crypto common ${EXTRA_LIBS} dl)
+ 
+ # Install rules for eurephiadm
+ INSTALL(TARGETS eurephiadm RUNTIME DESTINATION ${BINDIR})
+--- eurephia-1.0.1.orig/utils/CMakeLists.txt
++++ eurephia-1.0.1/utils/CMakeLists.txt
+@@ -41,7 +41,7 @@ IF(EUREPHIADM)
+                  ../eurephiadm/argparser.c
+                  ../eurephiadm/client_context.c
+ 		)
+-  TARGET_LINK_LIBRARIES(eurephia_init dl crypto common ${EXTRA_LIBS})
++  TARGET_LINK_LIBRARIES(eurephia_init crypto common ${EXTRA_LIBS} dl)
+ 
+   # Define the saltdecode build
+   ADD_EXECUTABLE(eurephia_saltdecode

Reply via email to