Hi,
Trying out the latest gnulib via coreutils, I hit this "make check" failiure:
../lib/libcoreutils.a(argmatch.o): In function `__argmatch_die':
/h/w/coreutils/lib/argmatch.c:63: undefined reference to `usage'
collect2: ld returned 1 exit status
make[3]: *** [test-exclude] Error 1
The fix is to define "usage", as is done in test-argmatch.c:
>From ce795c70947ffc1a52a02394d9aa03b81eb3b2b4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Fri, 14 Aug 2009 08:17:46 +0200
Subject: [PATCH] test-exclude: avoid coreutils "make check" failure
* tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
just as in test-argmatch.c.
---
ChangeLog | 6 ++++++
tests/test-exclude.c | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d6c3670..ab455e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-14 Jim Meyering <[email protected]>
+
+ test-exclude: avoid coreutils "make check" failure
+ * tests/test-exclude.c (ARGMATCH_DIE_DECL) [ARGMATCH_DIE_DECL]: Define,
+ just as in test-argmatch.c.
+
2009-08-13 Eric Blake <[email protected]>
test-dup2: fix bad assumption
diff --git a/tests/test-exclude.c b/tests/test-exclude.c
index c220e0b..a729bba 100644
--- a/tests/test-exclude.c
+++ b/tests/test-exclude.c
@@ -60,6 +60,12 @@ int exclude_flags[] = {
ARGMATCH_VERIFY (exclude_keywords, exclude_flags);
+/* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and
+ thus must link with a definition of that function. Provide it here. */
+#ifdef ARGMATCH_DIE_DECL
+ARGMATCH_DIE_DECL { exit (1); }
+#endif
+
int
main (int argc, char **argv)
{
--
1.6.4.357.gfd68c