From 3ce2749b21c779e43b731b3070010477a078cb9e Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Tue, 7 Jan 2025 14:27:50 -0500 Subject: [PATCH] lwp: Link selclient and selserver with XLIBS Commit e4d8329619f3 (lwp: Build src/lwp/test) fails to build on Solaris 11.3 or older due to undefined socket and resolver API symbols, including recv, send, gethostbyname, socket, etc: Undefined first referenced symbol in file recv selsubs.o send selsubs.o gethostbyname selclient.o socket selclient.o connect selclient.o ld: fatal: symbol referencing errors This is because on Solaris, these have historically been supplied via -lsocket, -lresolv, and other libraries as defined in the OpenAFS variable XLIBS. Add XLIBS to the recipes for selclient and selserver to avoid these errors when building on Solaris 11.3 or older. On Solaris 11.4, XLIBS is not required to build because the APIs formerly found via XLIBS are now largely provided in libc.so instead, with libsocket.so and libresolv.so maintained for compatibility as filters on libc.so. Change-Id: I19a5cca20bd9ac335cd0e6424ed8aeb85d574bc8 Reviewed-on: https://gerrit.openafs.org/16033 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Cheyenne Wills --- src/lwp/test/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lwp/test/Makefile.in b/src/lwp/test/Makefile.in index 67ca2fab02..06d0f958e7 100644 --- a/src/lwp/test/Makefile.in +++ b/src/lwp/test/Makefile.in @@ -21,12 +21,12 @@ test: test.o ${LIBS} selclient.o: selclient.c seltest.h selclient: selclient.o selsubs.o ${LIBS} - $(AFS_LDRULE) selclient.o selsubs.o ${LIBS} + $(AFS_LDRULE) selclient.o selsubs.o ${LIBS} ${XLIBS} selserver.o: selserver.c seltest.h selserver: selserver.o selsubs.o ${LIBS} - $(AFS_LDRULE) selserver.o selsubs.o ${LIBS} + $(AFS_LDRULE) selserver.o selsubs.o ${LIBS} ${XLIBS} selsubs.o: selsubs.c seltest.h