Bug#647047: drc: FTBFS with ld --as-needed

Ilya Barygin randomaction at ubuntu.com
Sat Oct 29 20:52:45 UTC 2011


Package: drc
Version: 3.1.1~dfsg0-1
Severity: normal
Tags: upstream patch
User: debian-gcc at lists.debian.org
Usertags: ld-as-needed

drc 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/drc/3.1.1~dfsg0-1/+build/2862778/+files/buildlog_ubuntu-precise-i386.drc_3.1.1%7Edfsg0-1_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/drc/3.1.1~dfsg0-1ubuntu1

-- 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
-------------- next part --------------
Description: fix FTBFS with ld --as-needed
 Place libraries after source files in gcc invocations.
Author: Ilya Barygin <randomaction at ubuntu.com>
--- drc-3.1.1~dfsg0.orig/source/makefile
+++ drc-3.1.1~dfsg0/source/makefile
@@ -73,13 +73,13 @@ BIN_TARGETS=drc lsconv glsweep
 ALL: drc glsweep lsconv
 
 drc: $(DRCSRC)
-	$(CC) $(CFLAGS) -lm -lstdc++ -o drc $(DRCSRC)
+	$(CC) $(CFLAGS) -o drc $(DRCSRC) -lm -lstdc++
 
 glsweep: $(GLSWEEPSRC)
-	$(CC) $(GLSCFLAGS) -lm -o glsweep $(GLSWEEPSRC)
+	$(CC) $(GLSCFLAGS) -o glsweep $(GLSWEEPSRC) -lm
 	
 lsconv: $(LSCONVSRC)
-	$(CC) $(CFLAGS) -lm -o lsconv $(LSCONVSRC)
+	$(CC) $(CFLAGS) -o lsconv $(LSCONVSRC) -lm
 	
 clean:
 	rm -f $(OBJS)


More information about the pkg-multimedia-maintainers mailing list