From 7242e25ae28da95b11b98e1353333b0ca70dc6d5 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 23 Jul 2013 17:11:24 -0400 Subject: [PATCH] aklog: Put ${AKLIBS} after ${AFSLIBS} on the linker command line MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Systems with newer, stricter linkers (such as Ubuntu saucy) require this ordering because libauth.a uses symbols from libk5crypto. Fixes this build failure: gcc -o aklog -g -O -I/…/openafs/src/config -I/…/openafs/include -I. -I. -D_LARGEFILE64_SOURCE -DALLOW_REGISTER aklog.o aklog_roken.o krb_util.o linked_list.o -Wl,-Bsymbolic-functions -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err /…/openafs/lib/libprot.a /…/openafs/lib/libauth.a /…/openafs/lib/libubik.a /…/openafs/lib/librxkad.a /…/openafs/lib/libsys.a /…/openafs/lib/librx.a /…/openafs/lib/libsys.a /…/openafs/lib/liblwp.a /…/openafs/lib/libdes.a /…/openafs/lib/libafscom_err.a /…/openafs/lib/libcmd.a /…/openafs/lib/libafsutil.a -lresolv /usr/bin/ld.bfd.real: /…/openafs/lib/libauth.a(akimpersonate.o): undefined reference to symbol 'krb5_c_make_random_key@k5crypto_3_MIT' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libk5crypto.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[5]: *** [aklog] Error 1 make[5]: Leaving directory `/…/openafs/src/aklog' Change-Id: Ibb12178d85e37e21320706eaafb84c7457d16e6c Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10107 Reviewed-by: Andrew Deason Reviewed-by: Christof Hanke Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- src/aklog/Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aklog/Makefile.in b/src/aklog/Makefile.in index 4feecb482..c67471c66 100644 --- a/src/aklog/Makefile.in +++ b/src/aklog/Makefile.in @@ -24,13 +24,13 @@ OBJS= aklog.o aklog_roken.o krb_util.o linked_list.o all: aklog asetkey klog aklog: ${OBJS} ${AFSLIBS} - ${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS} + ${CC} -o $@ ${CFLAGS} ${OBJS} ${AFSLIBS} ${AKLIBS} ${XLIBS} asetkey: asetkey.o ${AFSLIBS} - ${CC} -o $@ ${CFLAGS} asetkey.o ${AKLIBS} ${AFSLIBS} ${XLIBS} + ${CC} -o $@ ${CFLAGS} asetkey.o ${AFSLIBS} ${AKLIBS} ${XLIBS} klog: klog.o skipwrap.o ${AFSLIBS} - ${CC} -o $@ ${CFLAGS} klog.o skipwrap.o ${AKLIBS} ${AFSLIBS} ${XLIBS} + ${CC} -o $@ ${CFLAGS} klog.o skipwrap.o ${AFSLIBS} ${AKLIBS} ${XLIBS} # # Installation targets -- 2.39.5