Building a testdir of all of Gnulib on Solaris 10 with Oracle Studio 12.6,
I get this link error:

CC -xarch=generic64 -O -Wno-error -Wno-error -g  
-L/home/haible/prefix-x86_64/lib -o test-netdb-h-c++ test-netdb-h-c++.o 
libtests.a ../gllib/libgnu.a libtests.a ../gllib/libgnu.a libtests.a  -lsocket 
-lnsl -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
Undefined                       first referenced
 symbol                             in file
libintl_dcngettext                  ../gllib/libgnu.a(getaddrinfo.o)
libintl_dcgettext                   ../gllib/libgnu.a(getaddrinfo.o)
ld: fatal: symbol referencing errors. No output written to test-netdb-h-c++
gmake[4]: *** [Makefile:23302: test-netdb-h-c++] Error 2

This patch fixes it.


2026-05-10  Bruno Haible  <[email protected]>

        netdb-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.6.
        * modules/netdb-h-c++-tests (Makefile.am): Link test-netdb-h-c++ with
        $(LIBINTL).

diff --git a/modules/netdb-h-c++-tests b/modules/netdb-h-c++-tests
index d211c62faa..593ec5b27a 100644
--- a/modules/netdb-h-c++-tests
+++ b/modules/netdb-h-c++-tests
@@ -15,5 +15,5 @@ if ANSICXX
 TESTS += test-netdb-h-c++
 check_PROGRAMS += test-netdb-h-c++
 test_netdb_h_c___SOURCES = test-netdb-h-c++.cc
-test_netdb_h_c___LDADD = $(LDADD) $(GETADDRINFO_LIB)
+test_netdb_h_c___LDADD = $(LDADD) $(LIBINTL) $(GETADDRINFO_LIB)
 endif




Reply via email to