Package: rdiff-backup-fs Version: 1.0.0-3 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://launchpadlibrarian.net/71072701/buildlog_ubuntu-oneiric-i386.rdiff-backup-fs_1.0.0-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/rdiff-backup-fs/1.0.0-3ubuntu1 -- 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: Place libraries in LIBS variable. This ensures correct order of parameters for ld, allowing to link with --as-needed option. Author: Ilya Barygin <[email protected]> Bug-Ubuntu: https://launchpad.net/bugs/803192 --- rdiff-backup-fs-1.0.0.orig/configure.ac +++ rdiff-backup-fs-1.0.0/configure.ac @@ -47,11 +47,11 @@ dnl checking type of system to provide p case ${host} in *-*-linux-*|*-*-k*bsd*-*) AC_SUBST(CFLAGS, ["-Wall -O3 `pkg-config --cflags fuse`"]) - AC_SUBST(LDFLAGS, ["`pkg-config --cflags --libs fuse` -lz"]);; + AC_SUBST(LIBS, ["$LIBS `pkg-config --cflags --libs fuse` -lz"]);; *-*-bsd-*) AC_SUBST(CFLAGS, ["-Wall -O3 `pkg-config --cflags fuse`"]) - AC_SUBST(LDFLAGS, ["`pkg-config --cflags --libs fuse` -lz"]);; + AC_SUBST(LIBS, ["$LIBS `pkg-config --cflags --libs fuse` -lz"]);; *-*-darwin*) AC_SUBST(CFLAGS, ["-Wall -O3 `pkg-config --cflags fuse`"]) - AC_SUBST(LDFLAGS, ["`pkg-config --cflags --libs fuse` -lz"]);; + AC_SUBST(LIBS, ["$LIBS `pkg-config --cflags --libs fuse` -lz"]);; *) AC_MSG_WARN(No automatic flags for this host system; set compile/linking flags manually);; esac

