Re: [PATCH] maint: Nicer warning if autoconf-archive not available
Hi Eric,
On Thu, Sep 02, 2021 at 01:17:43PM -0500, Eric Blake wrote:
> Prior to this patch, failure to install autoconf-archives prior to
> running 'autoreconf' produces the confusing:
>
> Makefile.am: error: Yacc source seen but 'YACC' is undefined
> Makefile.am: The usual way to define 'YACC' is to add 'AC_PROG_YACC'
> Makefile.am: to 'configure.ac' and run 'autoconf' again.
>
> With this change, the error changes to:
>
> configure.ac:117: error: possibly undefined macro: AX_PROG_BISON
> If this token and others are legitimate, please use m4_pattern_allow.
> See the Autoconf documentation.
>
> which is still not a direct finger pointing to missing
> autoconf-archives, but at least provides more relevant hits in a
> google search for how to resolve it (compared to recommended remedies
> for the first message).
I've used
m4_ifdef([AX_CXX_COMPILE_STDCXX_11],,
[m4_fatal([The m4 macro AX_CXX_COMPILE_STDCXX_11 has not been defined. Please install the autoconf-archive package.])])
in a different project, which produces a more helpful error message that
does point directly to the missing package and the correct solution.
I just committed something similar here (with AX_PROG_BISON rather than
AX_CXX_COMPILER_STDCXX_11, obviously):
wouter@pc181009:~/nbd$ autoreconf -f -i
configure.ac:114: error: The m4 macro AX_PROG_BISON has not been defined. Please install the autoconf-archive package.
configure.ac:114: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
wouter@pc181009:~/nbd$ sudo apt install autoconf-archive
[...]
wouter@pc181009:~/nbd$ autoreconf -f -i
configure.ac:114: error: The m4 macro AX_PROG_BISON has not been defined. Please install the autoconf-archive package.
configure.ac:114: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: /usr/bin/autom4te failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
I suppose I should've done that in the first place...
--
w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}
Reply to: