Source: alpine
Version: 2.02-1
Tags: patch

We encounter this link failure:

libtool: link: x86_64-linux-gnu-gcc -std=gnu99 -g -pthread -g -O2 -g -Wall -O2 
-Wl,-z -Wl,defs -Wl,--as-needed -Wl,-z -Wl,defs -Wl,--as-needed -o alpine 
addrbook.o adrbkcmd.o after.o alpine.o arg.o busy.o colorconf.o confscroll.o 
context.o dispfilt.o flagmaint.o folder.o help.o imap.o init.o kblock.o 
keymenu.o ldapconf.o listsel.o mailcmd.o mailindx.o mailpart.o mailview.o 
newuser.o pattern.o pipe.o print.o radio.o remote.o reply.o roleconf.o send.o 
setup.o signal.o status.o takeaddr.o titlebar.o smime.o newmail.o date.o -ldl 
-L/usr/lib -lkrb5 -lcom_err -lcrypto ../pico/libpico.a 
../pico/osdep/libpicoosd.a ../pith/libpith.a ../pith/osdep/libpithosd.a 
../pith/charconv/libpithcc.a osdep/libpineosd.a ../c-client/c-client.a 
-lgssapi_krb5 -lldap -lncurses -llber -lssl -lpam -pthread
../c-client/c-client.a(osdep.o): In function `ssl_onceonlyinit':
/build/buildd/alpine-2.02/imap/c-client/osdep.c:339: warning: the use of 
`tmpnam' is dangerous, better use `mkstemp'
/usr/bin/ld: ../c-client/c-client.a(osdep.o): undefined reference to symbol 
'krb5_kt_start_seq_get@@krb5_3_MIT'
/usr/bin/ld: note: 'krb5_kt_start_seq_get@@krb5_3_MIT' is defined in DSO 
/usr/lib/libkrb5.so so try adding it to the linker command line
/usr/lib/libkrb5.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

It occurs for two reasons:

1) an updated toolchain no longer allows indirect linking.
Although this failure was first detected in Ubuntu Natty, the
same change is planned for Debian Wheezy:
        http://wiki.debian.org/ToolChain/DSOLinking

2) the osdep.o object in the c-client.a library references a
symbol in libkrb5.so. You can actually see that we pass -lkrb5
but since it's passed *before* c-client.a, the optimizer will
optimize that symbol out of the library, thus causing the undef
error.

The fix is to pass -lkrb5 to the *right* of c-client.a, so the
optimizer doesn't strip it out.

Patch follows.
---
diff -u alpine-2.02/debian/patches/10_alpine_1.10_patches.patch 
alpine-2.02/debian/patches/10_alpine_1.10_patches.patch
--- alpine-2.02/debian/patches/10_alpine_1.10_patches.patch
+++ alpine-2.02/debian/patches/10_alpine_1.10_patches.patch
@@ -1,5 +1,6 @@
-This patch fixes the issue that -lpam is mentioned at the wrong position in
-the makefile.  Attaching it to the end of all libs fixes the problem.
+This patch fixes the issue that -lpam, -lkrb5, and -lcrypto are mentioned at
+the wrong position in the makefile.  Attaching it to the end of all libs
+fixes the problem.
 --- alpine-2.00.orig/configure.ac
 +++ alpine-2.00/configure.ac
 @@ -597,7 +597,7 @@
@@ -18,7 +19,7 @@
  LIBINTL = @LIBINTL@
  LIBOBJS = @LIBOBJS@
 -LIBS = @LIBS@
-+LIBS = @LIBS@ -lpam
++LIBS = @LIBS@ -lpam -lkrb5 -lcrypto
  LIBTOOL = @LIBTOOL@
  LN = @LN@
  LN_S = @LN_S@



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to