[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fnmatch-gnu fails to compile on OSX with clang
From: |
Bruno Haible |
Subject: |
Re: fnmatch-gnu fails to compile on OSX with clang |
Date: |
Tue, 14 Aug 2018 02:31:22 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-130-generic; KDE/5.18.0; x86_64; ; ) |
Jeroen Meijer wrote:
> I re-ran the build on Travis, so now I have a config.log. I forgot to
> dump the output of config.status, however. Do you require it?
>
> The config.log can be found here: [...]
>
> Now, in the mean time I did update to the latest gnulib version
> (1945403c96c533137ea6916ad5a220050d176fd0), since it includes changes to
> fnmatch. The compilation error is still the same though.
>
> It looks like config.log shows that it finds (as you expected):
>
> HAVE_FNMATCH_H = 1
> HAVE_FNMATCH = 1
> REPLACE_FNMATCH = 1
Thanks, this is helpful.
The issue should now be fixed through the patch below.
Two notes about modules that use a GL_GENERATE_... conditional
to decide whether to generate a substitute .h file:
1) Previously, it was sufficient to test
./gnulib-tool --create-testdir --with-c++-tests ...
since a build success of this testdir implied also a build
success of the one without the C++ tests:
./gnulib-tool --create-testdir ...
Now, both have to be tested separately, because in the testdir
with C++ tests the .h file is always generated, whereas it may
be omitted in the other testdir.
2) If we use
AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"])
in more than one Autoconf macro, the default one (this is the one
which may set the value of FNMATCH_H to empty) must be defined
through AC_DEFUN_ONCE, not AC_DEFUN.
Issue 2) is what caused the failure with the 'fnmatch' module
(reported by Paul Lucas).
2018-08-13 Bruno Haible <address@hidden>
fnmatch, fnmatch-gnu: Fix compilation error on Mac OS X.
Reported by Jeroen Meijer <address@hidden> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00046.html>
and by Paul J. Lucas <address@hidden> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00069.html>.
* m4/fnmatch_h.m4 (gl_FNMATCH_H): Define through AC_DEFUN_ONCE.
diff --git a/m4/fnmatch_h.m4 b/m4/fnmatch_h.m4
index c40d0a7..afa59fe 100644
--- a/m4/fnmatch_h.m4
+++ b/m4/fnmatch_h.m4
@@ -1,4 +1,4 @@
-# fnmatch_h.m4 serial 2
+# fnmatch_h.m4 serial 3
dnl Copyright (C) 2009-2018 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is
preserved.
dnl From Bruno Haible.
-AC_DEFUN([gl_FNMATCH_H],
+AC_DEFUN_ONCE([gl_FNMATCH_H],
[
AC_REQUIRE([gl_FNMATCH_H_DEFAULTS])
m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])