Package: away
Version: 0.9.5-3
Severity: minor
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



*** /tmp/tmpo5919X
In Ubuntu, the attached patch was applied to achieve the following:

  * $LIBS need to come after $SRC while linking to fix building with
    ld --as-needed (LP: #766025)

Ubuntu passes ld --as-needed per default to the linker, away FTBFS with:

gcc -O2 -g -Wall -D_REENTRANT -lpthread -lpam -lpam_misc away.c -o away
/tmp/ccDubW35.o: In function `authenticate':
/build/buildd/away-0.9.5/build-tree/away-0.9.5/away.c:157: undefined reference 
to `pam_start'
/build/buildd/away-0.9.5/build-tree/away-0.9.5/away.c:163: undefined reference 
to `pam_end'
/build/buildd/away-0.9.5/build-tree/away-0.9.5/away.c:160: undefined reference 
to `pam_authenticate'
/tmp/ccDubW35.o: In function `master':
/build/buildd/away-0.9.5/build-tree/away-0.9.5/away.c:122: undefined reference 
to `pthread_create'
/tmp/ccDubW35.o:(.data+0xe0): undefined reference to `misc_conv'
collect2: ld returned 1 exit status

The libraries are clearly in the wrong place on the link line for
- - --as-needed (http://wiki.debian.org/ToolChain/DSOLinking).  This
probably doesn't affect Debian right now because --as-needed is a
positional option and only affects those libraries listed after it, but
Ubuntu's linker defaults to --as-needed right out of the gate.
Nevertheless, I believe that the debian-gcc team is tracking these
problems and wants to make Debian packages work cleanly with such a
linker.

Thanks for considering the patch.


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

Kernel: Linux 3.0.0-999-generic (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJOJFzdAAoJEGHzRCZ03mYkuNkQALgnTzc4v0xpWMp3RB/+m4LA
P2r3gywGivXHPKFVOQRT/Ona+o0MPBen26pyVqAVaC2kgazQ7SmnWeNgH7gdnkEx
mV8229GALWSjvaIJXYrSsoW3op9eJ1xT+3VpzTkwxXvxErmYHUHjuR1b3qXbUsIp
/Uc3fNipe2R3umXVU/rrwSZDsFETXGvlIAZFQNgnPL9VooC1uv8MlHKND3/2soSe
uQfS+62M56owWdDcPtrEFIzDLj/t01JcIDmO/WXd27nagkkmZTKWo+9AoHEpck+z
lfnfF8pQxX3YAZhkZwWu37URVmFsLdB+Bh9pD+WnH0gFHM8+5LyURp94PZOlj83o
WpJSNYjQfGZQMenwosj/7UcqmJj9hPDHo9aZgAy6bF1vaZbMeS0lbfe89+gnxLhC
fmaDQadhDYocZCA3C2GgvBnt6uPgs7xOJzFjsSsDoJfdWKtpo795d1FkD7tVdpHR
oKSV+oXkZmTa3xuNYOrMiiseJDiUL/o3IMnsCP3zk8A2uPi1snftFGf9DSGuVT7T
gbUJYaZ9JFowljUxQ37y+k6E8nkHcJtsD9IUfrMB+rRfQhnLcSp0PG6BPbIQax70
CqcLwdoG/1i/nioD6k+0j2BErCkJgP5s/O4vQjsgHI1hwpgLWdqAZxYSk09NxCU9
EIqEyVW8u5EKKpUwnkM4
=uS8L
-----END PGP SIGNATURE-----
=== modified file 'debian/patches/01_fix_makefile'
--- debian/patches/01_fix_makefile      2002-10-08 16:12:46 +0000
+++ debian/patches/01_fix_makefile      2011-07-18 16:12:23 +0000
@@ -1,6 +1,5 @@
-diff -ruN away-0.9.5-old/Makefile away-0.9.5/Makefile
---- away-0.9.5-old/Makefile    2002-08-11 06:56:15.000000000 +0200
-+++ away-0.9.5/Makefile        2002-09-02 03:59:21.000000000 +0200
+--- away-0.9.5-old/Makefile.orig       2002-08-11 04:56:15.000000000 +0000
++++ away-0.9.5/Makefile        2011-07-18 16:10:15.175714349 +0000
 @@ -2,13 +2,14 @@
  
  # files and paths
@@ -18,7 +17,13 @@
  LIBS   = -lpthread -lpam -lpam_misc
  
  # alias away
-@@ -21,10 +22,13 @@
+@@ -16,15 +17,18 @@
+ 
+ # away
+ $(BINARY): $(SRC)
+-      $(CC) $(CFLAGS) $(LIBS) $(SRC) -o $(BINARY)
++      $(CC) $(CFLAGS) $(SRC) $(LIBS) -o $(BINARY)
+ #     @strip $(BINARY)
  
  # make install
  install: $(BINARY)

Reply via email to