Fix bootstrap failure with the newest gnulib

2020-08-22 Thread Bruno Haible
With the newest gnulib, the Continuous Integration fails already in the
'bootstrap' phase [1]:

bootstrap: running: /builds/gnu-m4/ci-distcheck/gnulib/gnulib-tool 
--no-changelog --no-libtool --symlink --update
/builds/gnu-m4/ci-distcheck/gnulib/gnulib-tool: *** minimum supported autoconf 
version is 2.64. Try adding AC_PREREQ([2.64]) to your configure.ac.
/builds/gnu-m4/ci-distcheck/gnulib/gnulib-tool: *** Stop.

I can reproduce it locally:

$ ./bootstrap --skip-git --gnulib-srcdir=/GNULIB
...
bootstrap: running: /GNULIB/gnulib-tool --no-changelog --no-libtool --symlink 
--update
/GNULIB/gnulib-tool: *** minimum supported autoconf version is 2.64. Try adding 
AC_PREREQ([2.64]) to your configure.ac.
/GNULIB/gnulib-tool: *** Stop.


The attached patch fixes it.


[1] https://gitlab.com/gnu-m4/ci-distcheck/-/jobs/698627302/raw
>From df29c5b764b540940e764a92400a7e6907d7fce3 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Sun, 23 Aug 2020 01:33:08 +0200
Subject: [PATCH] build: Fix bootstrap failure with the newest gnulib.

* configure.ac: Require Autoconf 2.64 at least.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c648dd7..888a08a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .
 
-AC_PREREQ([2.63])
+AC_PREREQ([2.64])
 AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
   [bug-m4@gnu.org])
 AC_CONFIG_AUX_DIR([build-aux])
-- 
2.7.4



Re: Crash on macOS in vasnprintf due to too old gnulib

2020-08-22 Thread Bruno Haible
Marvin Scholz wrote in:
  

> I've encountered a crash in m4 that happens due to too old gnulib, as
> its implementation of vasnprintf uses %n in a non-constant format string
> which is not allowed on macOS since macOS 10.13 and leads to a crash.
> 
> This was fixed in gnulib upstream in c41f233c4c38e84023a16339782ee306f03e7f59
> and 7df04f9b8a0adb1575ca0555775ec10860143cbf but the gnulib in m4 does not
> seem to be yet updated to that version.

The gnulib submodule has been updated on 2020-07-06, see
https://git.savannah.gnu.org/gitweb/?p=m4.git;a=shortlog;h=refs/heads/branch-1.4

> just updating the submodule and running gnulib-tool to update was not
> enough apparently.

Dealing with git submodules is, unfortunately, often prone to errors.

I suggest you copy the 'gitsub.sh' script [1] into your m4 checkout and
run
  $ ./gitsub.sh pull

That should fix things on your side.

Bruno

[1] 
https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=top/gitsub.sh;hb=HEAD