Package: freetalk
Version: 3.2-7
Severity: normal
Tags: patch
User: [email protected]
Usertags: ld-as-needed

The package fails to build when --as-needed linker option is enabled,
because of incorrect order of parameters passed to ld. Here's a log of
failed build in Ubuntu:
https://launchpad.net/ubuntu/+source/freetalk/3.2-7/+build/2543800/+files/buildlog_ubuntu-oneiric-i386.freetalk_3.2-7_FAILEDTOBUILD.txt.gz

See also
http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries

The attached patch was used in Ubuntu to fix the problem.
https://launchpad.net/ubuntu/+source/freetalk/3.2-7ubuntu1

-- System Information:
Debian Release: wheezy/sid
  APT prefers oneiric
  APT policy: (500, 'oneiric')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-10-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Description: Fix linking FTBFS by moving libraries to LDADD variable.
Author: Ilya Barygin <[email protected]>
Bug-Ubuntu: https://launchpad.net/bugs/770954
--- freetalk-3.2.orig/src/Makefile.am
+++ freetalk-3.2/src/Makefile.am
@@ -9,6 +9,6 @@ freetalk_SOURCES=freetalk.cc util.cc com
        roster.h interpreter.h extensions.h primitives.h presence.h \
        file_transfer.h register.h compat.h
 
-freetalk_LDFLAGS=$(LOUDMOUTH_LIBS) $(GLIB_LIBS) $(GUILE_LDFLAGS)
+freetalk_LDADD=$(LOUDMOUTH_LIBS) $(GLIB_LIBS) $(GUILE_LDFLAGS)
 
 CLEANFILES = *~

Reply via email to