Package: libpam-unix2 Version: 1:2.4.1-4 Severity: important Tags: patch User: [email protected] Usertags: origin-ubuntu ubuntu-patch oneiric
libpam-unix2 fails to build with a linker that defaults to --as-needed, as shown in this Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/libpam-unix2/+bug/770754 This is because of incorrect link ordering: it puts a library before the object that uses it rather than after. See: http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries The following patch fixes this. * Fix link order to work with 'ld --as-needed'. --- libpam-unix2-2.4.1.orig/debian/patches/03_link_order.dpatch +++ libpam-unix2-2.4.1/debian/patches/03_link_order.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_link_order.dpatch by Colin Watson <[email protected]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix link order to work with 'ld --as-needed'. + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libpam-unix2-2.4.1~/unix2_chkpwd/Makefile libpam-unix2-2.4.1/unix2_chkpwd/Makefile +--- libpam-unix2-2.4.1~/unix2_chkpwd/Makefile 2011-09-08 18:21:59.000000000 +0100 ++++ libpam-unix2-2.4.1/unix2_chkpwd/Makefile 2011-09-08 18:22:09.000000000 +0100 +@@ -3,7 +3,7 @@ + all: unix2_chkpwd + + unix2_chkpwd: unix2_chkpwd.o +- gcc -lpam -o unix2_chkpwd unix2_chkpwd.o ++ gcc -o unix2_chkpwd unix2_chkpwd.o -lpam + + clean: + rm -f unix2_chkpwd unix2_chkpwd.o Thanks, -- Colin Watson [[email protected]] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

