GMP bootstrap fails with Autoconf 2.69d

Paul Eggert eggert at cs.ucla.edu
Thu Nov 12 06:31:52 UTC 2020


Autoconf 2.70 is about to be released, and some people have been using 
prereleases to build lots of GNU packages. They've run into a problem with GMP, 
though, because GMP uses AC_INIT in a way contrary to the Autoconf manual, and 
changes in Autoconf mean that GMP's "./.bootstrap" procedure fails as follows:

$ ./.bootstrap
/usr/bin/m4:configure.ac:40: Warning: excess arguments to builtin `m4_define' 
ignored
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: error: aclocal failed with exit status: 1

The bug occurs in the following line of configure.ac:

AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs at gmplib.org, see 
https://gmplib.org/manual/Reporting-Bugs.html], gmp)

The Autoconf manual has long said that the 3rd argument of AC_INIT must be an 
email address. Unfortunately commas are not valid in RFC 5322 email addresses, 
and in Autoconf 2.69d the comma causes problems because a submacro interprets it 
as an argument separator. If you'd like to reproduce the bug, you can get 
Autoconf 2.69d as described here:

https://lists.gnu.org/archive/html/autoconf/2020-11/msg00003.html

To fix the problem, I suggest using just [gmp-bugs at gmplib.org] as the 3rd 
argument of AC_INIT, as being the simplest; or if you want the commentary, put 
it in as valid RFC 5322 commentary, e.g., by parenthesizing it:

diff -r 18875a0a3f89 configure.ac
--- a/configure.ac	Tue Nov 10 18:17:13 2020 +0100
+++ b/configure.ac	Wed Nov 11 22:25:59 2020 -0800
@@ -37,7 +37,7 @@

  AC_REVISION($Revision$)
  AC_PREREQ(2.59)
-AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs at gmplib.org, see 
https://gmplib.org/manual/Reporting-Bugs.html], gmp)
+AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs at gmplib.org (see 
https://gmplib.org/manual/Reporting-Bugs.html)], gmp)
  AC_CONFIG_SRCDIR(gmp-impl.h)
  m4_pattern_forbid([^[ \t]*GMP_])
  m4_pattern_allow(GMP_LDFLAGS)


This should be portable to both older and newer Autoconf releases.

If you use Autoconf 2.69d you'll see that it also warns about a lot of obsolete 
stuff in gmp's configure.ac etc, but none of these warnings stop the build and 
they can be dealt with later.


More information about the gmp-bugs mailing list