[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#733383: re xastir: FTBFS: collect2: error: ld returned 1 exit status



Tags 733383 +patch
Thanks

After reproducing this failure locally and doing some digging in the configure script I found that this FTBFS was caused by a change in behaviour in GraphicsMagick-config.

On wheezy:
root@debian:/# /usr/bin/GraphicsMagick-config --ldflags
-L${exec_prefix}/lib
root@debian:/#

On sid
root@debian:/xastir-2.0.0# /usr/bin/GraphicsMagick-config --ldflags
-L/usr/lib -fPIE -pie -Wl,-z,relro -Wl,-z,now -L/usr/lib/X11 -L/usr/lib -L/usr/lib
root@debian:/xastir-2.0.0#

Further investigation shows that xastir fails because it uses the ldflags but not the cflags from GraphicsMagick-config. I added a quick hack to debian/rules to fix that (I previously tried to edit configure,ac and regenerate the autohell stuff but I got errors when doing so). Debdiff attached no intent to NMU.

Having said that I wonder if *-config programs should really be trying to push things like PIE on downstream applications, ccing the graphicsmagick maintainer to see if they want to voice an opinion on that.
diff -Nru xastir-2.0.0/debian/changelog xastir-2.0.0/debian/changelog
--- xastir-2.0.0/debian/changelog	2013-09-14 16:45:38.000000000 +0000
+++ xastir-2.0.0/debian/changelog	2014-03-07 04:06:33.000000000 +0000
@@ -1,3 +1,11 @@
+xastir (2.0.0-2.2) UNRELEASED; urgency=medium
+
+  * Patch proposed to BTS, no intent to NMU
+  * Use cflags from GraphicsMagick-config to avoid link errors
+    related to pie.
+
+ -- Peter Michael Green <plugwash@debian.org>  Fri, 07 Mar 2014 04:05:28 +0000
+
 xastir (2.0.0-2.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru xastir-2.0.0/debian/rules xastir-2.0.0/debian/rules
--- xastir-2.0.0/debian/rules	2011-04-26 19:43:37.000000000 +0000
+++ xastir-2.0.0/debian/rules	2014-03-07 04:05:18.000000000 +0000
@@ -6,7 +6,7 @@
 	touch Makefile.in */Makefile.in */*/Makefile.in
 	touch config.h.in
 	touch configure
-	CFLAGS=-I/usr/include/geotiff ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
+	CFLAGS="-I/usr/include/geotiff $(shell GraphicsMagick-config --cflags)" ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
 	$(MAKE)
 	touch build
 

Reply to: