Package: alliance
Version: 5.0-20110203-3
Severity: normal
Tags: upstream patch
User: debian-...@lists.debian.org
Usertags: ld-as-needed

alliance 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/alliance/5.0-20110203-3/+build/2855770/+files/buildlog_ubuntu-precise-i386.alliance_5.0-20110203-3_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/alliance/5.0-20110203-3ubuntu1


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

Kernel: Linux 3.0.0-13-generic (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Description: fix FTBFS with ld --as-needed option
 Libraries which use symbols from other libraries must be placed before them
 in the argument list.
Author: Ilya Barygin <randomact...@ubuntu.com>

--- alliance-5.0-20110203.orig/asimut/src/Makefile.am
+++ alliance-5.0-20110203/asimut/src/Makefile.am
@@ -25,7 +25,6 @@
 bin_PROGRAMS = asimut
 
 asimut_LDADD = \
--L. libCst.la libSch.la \
 -L$(top_builddir)/mbkvti/src \
 -L$(top_builddir)/mbkedif/src \
 -L$(top_builddir)/mbkhilo/src \
@@ -46,7 +45,8 @@
 -lMlu \
 -lMal \
 -lMcl -lMel -lMhl -lMgl -lMsl \
-      -lMvg -lMlo -lRcn -lBvl -lBhl -lBeh -lPpt -lPhl -lPat -lLog -lMut
+      -lMvg -lMlo -lRcn -lBvl -lBhl -lBeh -lPpt -lPhl -lPat -lLog -lMut \
+-L. libCst.la libSch.la
 
 asimut_SOURCES = \
 beh_delay.h      c_fsyn_sr1k_56.c    vh_debug.c    vh_lspec.c    vh_util.h \
--- alliance-5.0-20110203.orig/lynx/src/Makefile.am
+++ alliance-5.0-20110203/lynx/src/Makefile.am
@@ -38,10 +38,11 @@
 -L$(top_srcdir)/rds/src \
 -L$(top_srcdir)/rdscif/src \
 -L$(top_srcdir)/rdsgds/src \
+ -lRtl -lRut -lRcf -lRfm \
  -lMlu -lMpu -lMap -lMmg -lMcp -lMcl -lMel \
  -lMhl -lMvl -lMlo -lMph -lMut -lMal -lRcn \
  -lMsl -lMgl \
- -lRtl -lRgs -lRcf -lRfm -lRpr -lRwi -lRut -lRds
+ -lRgs -lRpr -lRwi -lRds
 
 flatrds_SOURCES = flatrds.c
 

Reply via email to