Package: gnubik
Version: 2.3-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

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.
If they are placed before the symbols are dropped.
So automake uses the right ordering the libraries must be added to LDADD
or LIBS and not to LDFLAGS

See the log in the ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/gnubik/+bug/771114

Attached patch fixes this issue by patching the Makefile.in
If the packaging changes to regenerate the autotools files the patch
should be applied in the same way to src/automake.mk
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.
 To get automake to emit the right order the libraries must be placed in
 LDADD and not LDFLAGS.
Author: Julian Taylor <[email protected]>
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnubik/+bug/771114
diff -Nur -x '*.orig' -x '*~' gnubik-2.3//Makefile.in gnubik-2.3.new//Makefile.in
--- gnubik-2.3//Makefile.in	2009-01-06 04:02:34.000000000 +0100
+++ gnubik-2.3.new//Makefile.in	2011-07-08 11:52:12.745774746 +0200
@@ -278,7 +278,7 @@
 AM_CFLAGS = $(am__append_1)
 src_gnubik_CPPFLAGS = $(AM_CPPFLAGS)
 src_gnubik_CFLAGS = $(AM_CFLAGS) $(GTK_CFLAGS) $(GDK_GL_EXT_CFLAGS) $(GTK_GL_EXT_CFLAGS)
-src_gnubik_LDFLAGS = $(GTK_LIBS) $(GDK_GL_EXT_LIBS) $(GTK_GL_EXT_LIBS)
+src_gnubik_LDADD = $(GTK_LIBS) $(GDK_GL_EXT_LIBS) $(GTK_GL_EXT_LIBS)
 src_gnubik_SOURCES = \
 	src/colour-sel.c  \
 	src/colour-sel.h \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to