Package: xbill
Version: 2.1-8
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

the package xbill fails to build when using the linker flag --as-needed
This is caused by the libraries being placed before the objects which
need the symbols on the command line. So the library symbols are not
registered as needed.
See the log ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/xbill/+bug/803215

Attached patch fixes this issue by using ordering the command line
correctly.
Description: fix build with ld --as-needed
 when building with ld --as-needed libraries must be placed
 after object files needing them on the command line so the symbols
 of the libraries are registered as needed.
Author: Julian Taylor <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xbill/+bug/803215

Index: xbill-2.1/Makefile.in
===================================================================
--- xbill-2.1.orig/Makefile.in	2011-07-03 11:37:04.137365185 +0200
+++ xbill-2.1/Makefile.in	2011-07-03 11:41:22.957365347 +0200
@@ -2,7 +2,7 @@
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
-LIBS = @LIBS@ @X_LIBS@ @WIDGET_LIBS@ @X_PRE_LIBS@
+LIBS = @LIBS@ @X_LIBS@ @WIDGET_LIBS@ @X_PRE_LIBS@ -lXpm
 INSTALL=@INSTALL@
 INSTALL_DATA=@INSTALL_DATA@
 MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -21,7 +21,7 @@
 VPATH = @srcdir@
 
 ALL_CFLAGS =	$(CFLAGS) $(CPPFLAGS) -I$(srcdir)
-ALL_LDFLAGS =	$(CFLAGS) $(LDFLAGS) -lXpm
+ALL_LDFLAGS =	$(CFLAGS) $(LDFLAGS)
 IMAGE_DEFINES=-DIMAGES=\"${datadir}/xbill\"
 SCORE_DEFINES=-DSCOREFILE=\"${localstatedir}/xbill.scores\"
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to