From 10e21591caae03040fe703ae646eefb604ee848e Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Fri, 26 Jul 2024 18:37:40 -0400 Subject: [PATCH] rx: Link simple.example targets with XLIBS Commit 3961e416f62a 'rx: Cleanup and build simple.example' fails to build on Solaris 11.3 or older due to undefined socket and resolver API symbols, including bind, getsockname, connect, recvfrom, etc: LD /.../src/rx/simple.example/sample_client Undefined first referenced symbol in file bind /.../lib/libafsrpc.a(rx_user.o) getsockname /.../lib/libafsrpc.a(rx.o) gethostbyname sample_client.o [...] ld: fatal: symbol referencing errors. No output written to sample_client 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 our link rules in the simple.example Makefile to avoid these errors. 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: Id3b5d1903aa41807cca7a97d48dac9ff272101b1 Reviewed-on: https://gerrit.openafs.org/15789 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Michael Meffie --- src/rx/simple.example/Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rx/simple.example/Makefile.in b/src/rx/simple.example/Makefile.in index 5ac46f2724..3dac391560 100644 --- a/src/rx/simple.example/Makefile.in +++ b/src/rx/simple.example/Makefile.in @@ -22,10 +22,10 @@ all: sample_client sample_server install dest: sample_client: sample_client.o ${LIBS} sample.cs.o - $(AFS_LDRULE) sample_client.o sample.cs.o ${LIBS} ${LIB_hcrypto} ${LIB_roken} + $(AFS_LDRULE) sample_client.o sample.cs.o ${LIBS} ${LIB_hcrypto} ${LIB_roken} ${XLIBS} sample_server: sample_server.o sample.ss.o ${LIBS} - $(AFS_LDRULE) sample_server.o sample.ss.o ${LIBS} ${LIB_hcrypto} ${LIB_roken} + $(AFS_LDRULE) sample_server.o sample.ss.o ${LIBS} ${LIB_hcrypto} ${LIB_roken} ${XLIBS} sample_client.o: sample.h sample_server.o: sample.h