There was a small oversight in my mountlist test program. Since
mountlist.c uses xalloc and xalloc_die which uses gettext, we must link
it to LIBINTL.
This caused the following error on OpenBSD:
cc -Wno-error -g -O2 -rdynamic -o test-mountlist test-mountlist.o
libtests.a ../gllib/libgnu.a libtests.a ../gllib/libgnu.a libtests.a
-lexecinfo -lexecinfo -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm
ld: warning: vasnprintf.c:383(vasnprintf.o:(vasnprintf) in archive
../gllib/libgnu.a): warning: sprintf() is often misused, please use snprintf()
ld: error: undefined symbol: libintl_dgettext
>>> referenced by error.c:208
>>> error.o:(error_tail) in archive ../gllib/libgnu.a
>>> referenced by xalloc-die.c:34
>>> xalloc-die.o:(xalloc_die) in archive ../gllib/libgnu.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
And a similar error will probably happen on non-glibc systems.
Collin
>From f1daedcb4c6c653dfc2936847dfe55f5a076d94b Mon Sep 17 00:00:00 2001
From: Collin Funk <[email protected]>
Date: Sun, 23 Mar 2025 20:32:01 -0700
Subject: [PATCH] mountlist tests: Fix link error. (regr. 2025-03-18).
* modules/mountlist-tests (Makefile.am): Link the test program with
LIBINTL.
---
ChangeLog | 4 ++++
modules/mountlist-tests | 1 +
2 files changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index c849ceb122..4d5c7f8770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2025-03-23 Collin Funk <[email protected]>
+ mountlist tests: Fix link error. (regr. 2025-03-18).
+ * modules/mountlist-tests (Makefile.am): Link the test program with
+ LIBINTL.
+
utimens: Fix missing declarations on NetBSD (regr. 2024-09-16).
* lib/utimens.h [HAVE_UTIMENS || HAVE_LUTIMENS]: Include <sys/stat.h>
instead of <sys/time.h> for the declarations of these functions on
diff --git a/modules/mountlist-tests b/modules/mountlist-tests
index d44f23ef9c..4573f039bf 100644
--- a/modules/mountlist-tests
+++ b/modules/mountlist-tests
@@ -9,3 +9,4 @@ configure.ac:
Makefile.am:
TESTS += test-mountlist
check_PROGRAMS += test-mountlist
+test_mountlist_LDADD = $(LDADD) @LIBINTL@
--
2.49.0