* Fix build error when libintl is installed
@ 2021-05-09 2:24 Bruno Haible
0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-05-09 2:24 UTC (permalink / raw)
To: bug-m4, bug-gnulib
When building m4-1.4.18b on OpenBSD 6.9, with GNU gettext installed,
there is a link error:
CCLD test-posix_spawn-chdir
ld: error: undefined symbol: libintl_gettext
>>> referenced by xalloc-die.c:34 (../../lib/xalloc-die.c:34)
>>> xalloc-die.o:(xalloc_die) in archive ../lib/libm4.a
>>> referenced by error.c:195 (../../lib/error.c:195)
>>> error.o:(error_tail) in archive ../lib/libm4.a
collect2: ld returned 1 exit status
Errors while building
The cause are these dependencies:
test-posix_spawn-chdir.o
-> find_in_path() in findprog.o
-> xmalloc()
-> xalloc_die()
-> libintl_gettext()
This patch to gnulib fixes it. In m4, you'll need to update to the
current gnulib.
2021-05-08 Bruno Haible <bruno@clisp.org>
Fix build error when libintl is installed.
* modules/posix_spawn_file_actions_addchdir-tests (Makefile.am): Link
test-posix_spawn-chdir with libintl.
* modules/posix_spawn_file_actions_addfchdir-tests (Makefile.am): Link
test-posix_spawn-fchdir with libintl.
diff --git a/modules/posix_spawn_file_actions_addchdir-tests b/modules/posix_spawn_file_actions_addchdir-tests
index e554138..d44b3f1 100644
--- a/modules/posix_spawn_file_actions_addchdir-tests
+++ b/modules/posix_spawn_file_actions_addchdir-tests
@@ -19,3 +19,4 @@ TESTS += \
check_PROGRAMS += \
test-posix_spawn_file_actions_addchdir \
test-posix_spawn-chdir
+test_posix_spawn_chdir_LDADD = $(LDADD) @LIBINTL@
diff --git a/modules/posix_spawn_file_actions_addfchdir-tests b/modules/posix_spawn_file_actions_addfchdir-tests
index 2f09934..789a85d 100644
--- a/modules/posix_spawn_file_actions_addfchdir-tests
+++ b/modules/posix_spawn_file_actions_addfchdir-tests
@@ -27,4 +27,5 @@ check_PROGRAMS += test-posix_spawn_file_actions_addfchdir
if POSIX_SPAWN_PORTED
TESTS += test-posix_spawn-fchdir
check_PROGRAMS += test-posix_spawn-fchdir
+test_posix_spawn_fchdir_LDADD = $(LDADD) @LIBINTL@
endif
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-09 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 2:24 Fix build error when libintl is installed Bruno Haible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).