From 5d1f1f8609c352d4ca7962aac3588b4f2c449381 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 16 Dec 2024 16:53:11 -0600 Subject: [PATCH] kauth: Add LIB_crypt to LT_libs Since OpenAFS 1.0, kauth's Andrew_StringToKey() has contained a reference to crypt(). This is provided by $(LIB_crypt) (usually -lcrypt), but not all everything that links against liboafs_kauth.la also links to LIB_crypt. This causes the build to fail with --disable-static: $ make V=0 LD .../src/tbutc/butc /usr/bin/ld: ../../src/kauth/.libs/liboafs_kauth.so: undefined reference to `crypt' collect2: error: ld returned 1 exit status FAILED COMMAND: /bin/bash ../../libtool --quiet --mode=link --tag=CC gcc [...] -o butc [...] ../../src/kauth/liboafs_kauth.la [...] -lafshcrypto -lrokenafs -lpthread -lresolv To fix this, link against LIB_crypt when building liboafs_kauth.la, so anything linking against liboafs_kauth.la should also link against LIB_crypt. Change-Id: I9f46f3c429848b1ae67c8bf28a7698df0c084892 Reviewed-on: https://gerrit.openafs.org/15992 Tested-by: BuildBot Reviewed-by: Cheyenne Wills Reviewed-by: Michael Meffie --- src/kauth/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kauth/Makefile.in b/src/kauth/Makefile.in index 5022fd4241..83a2700f5b 100644 --- a/src/kauth/Makefile.in +++ b/src/kauth/Makefile.in @@ -22,7 +22,7 @@ LT_deps = $(top_builddir)/src/ubik/liboafs_ubik.la \ $(top_builddir)/src/ptserver/liboafs_prot.la \ $(top_builddir)/src/sys/liboafs_sys.la \ $(top_builddir)/src/rxkad/liboafs_rxkad.la -LT_libs = +LT_libs = $(LIB_crypt) INSTALL_KAUTH = @INSTALL_KAUTH@