mainAutoconf - Support: sr #110397, autoconf 2.70: autotest.m4 error

 
 

sr #110397: autoconf 2.70: autotest.m4 error

Submitter:  None
Submitted:  Tue 08 Dec 2020 11:09:23 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Not Autoconf Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed Operating System:  Mac OS
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 08 Dec 2023 03:55:09 PM UTC, comment #18: 

We decided to officially desupport Apple's system m4.  Specifically, as of revision fec8a33d87bbe9f024a31a18642618716b7ad7c9, GNU m4 1.4.8 or later is required.  After 2.72 the requirement will probably increase all the way to 1.4.16.

Zack Weinberg <zackw>
Group administrator
Wed 24 Mar 2021 07:25:09 AM UTC, comment #17: 

I looked into this again, and it seems the issue really is with the old version of m4 that Apple provides.

It seems that it can be fixed in autoconf/autom4te, but I'm not sure how much you're willing to support old versions of m4.

Details here: https://github.com/Homebrew/homebrew-core/pull/73797#issuecomment-805494845

Carlo Cabrera <carlocab>
Tue 09 Mar 2021 06:49:43 AM UTC, comment #16: 

I ran into this too, and installing GNU m4 1.4.18 before configuring autoconf did fix it.

Joshua Root <jmroot>
Tue 15 Dec 2020 02:22:58 AM UTC, comment #15: 

Oh, I guess "unknown channel" is coming direct from autom4te, not m4. Sorry. That makes it even more mysterious that you get that error and we don't, since I doubt anything in that Perl code is system-dependent.

Karl Berry <karl>
Group Member
Tue 15 Dec 2020 01:59:31 AM UTC, comment #14: 

Did you try with current GNU m4 (1.4.18) in the sandbox? 1.4.6 is ancient. When I see the mysterious m4 message "unknown channel", I have to keep wondering about m4 being the issue.

When I run configure in automake-1.4.3 against 2.70, I also get the warning about the missing AC_OUTPUT, but it's just a warning. It appears that, in your environment, it is the emitting of the warning that is the fatal error, not the warning itself.

The autotools should be robust with different core utilities, but anything's possible / worth trying.

Karl Berry <karl>
Group Member
Mon 14 Dec 2020 09:19:57 AM UTC, comment #13: 

Your new test works:

$ cat conftest.ac
AC_INIT([test], [1])
AC_USG
AC_OUTPUT
$ autoconf -o /dev/null conftest.ac
conftest.ac:2: warning: The macro `AC_USG' is obsolete.
conftest.ac:2: You should run autoupdate.
./lib/autoconf/headers.m4:837: AC_USG is expanded from...
conftest.ac:2: the top level
$ autoconf --version
autoconf (GNU Autoconf) 2.70


For your next command, the --gnu option lead to: unrecognized option `--gnu'

If I remove the --gnu option, and change $PREFIX/share/autoconf/autoconf.m4f (does not exist) to $PREFIX/share/autoconf/autoconf/autoconf.m4f, and same for trailer.m4, I get:

$ m4 --nesting-limit=1024 --include=/tmp/share/autoconf --debug=aflq --fatal-warning --trace=_m4_warn --reload-state=/tmp/share/autoconf/autoconf/autoconf.m4f /tmp/share/autoconf/autoconf/trailer.m4 conftest.ac > /dev/null
m4trace:conftest.ac:2: -1- _m4_warn([obsolete], [The macro `AC_USG' is obsolete.
You should run autoupdate.], [./lib/autoconf/headers.m4:837: AC_USG is expanded from...
conftest.ac:2: the top level])

FX <fxcoudert>
Mon 14 Dec 2020 01:06:00 AM UTC, comment #12: 

First off, yes, automake should change its test to read something like


AC_INIT([smoketest], [1])
AC_OUTPUT


(Calling `AC_INIT` with no arguments is also deprecated.)

However, something else is wrong as well -- I have a bad feeling that this may affect any diagnostic emitted by autoconf.  What happens if you run autoconf 2.70 on this test file?


AC_INIT([test], [1])
AC_USG
AC_OUTPUT


You ought to get output more or less like this:


conftest.ac:2: warning: The macro `AC_USG' is obsolete.
conftest.ac:2: You should run autoupdate.
../lib/autoconf/headers.m4:822: AC_USG is expanded from...
conftest.ac:2: the top level


It would also be interesting to know what this command prints:


m4 --nesting-limit=1024 --gnu --include=$PREFIX/share/autoconf \
   --debug=aflq --fatal-warning --trace=_m4_warn \
   --reload-state=$PREFIX/share/autoconf/autoconf.m4f \
   $PREFIX/share/autoconf/trailer.m4 conftest.ac > /dev/null


where $PREFIX is the installation prefix.  It ought to print something like this:


m4trace:conftest.ac:2: -1- _m4_warn([obsolete], [The macro `AC_USG' is obsolete.
You should run autoupdate.], [../lib/autoconf/headers.m4:822: AC_USG is expanded from...
conftest.ac:2: the top level])


Zack Weinberg <zackw>
Group administrator
Sun 13 Dec 2020 11:38:22 PM UTC, comment #11: 

Re. GNU m4, Apple has:

$ /usr/bin/m4 --version
GNU M4 1.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Rene' Seindal.

Indeed, autoconf's configure script concludes that it has "supports accurate traces". Do you want me to run a test to double-check?


Re. the bigger picture: automake is trying to test whether autoconf is functional by testing it on a simple .ac file:

$ cat conftest.ac                          
AC_INIT
$ /tmp/bin/autoconf -o /dev/null conftest.ac
unknown channel m4trace: -1- _m4_warn(syntax, AC_OUTPUT was never used, )
 at /tmp/share/autoconf/Autom4te/Channels.pm line 631.
Autom4te::Channels::msg("m4trace: -1- _m4_warn(syntax, AC_OUTPUT was never used, )\x{a}", undef, undef, "partial", 0) called at /tmp/bin/autom4te line 1073

This content of conftest.ac is exactly what is being tested by configure, with those exact options. I don't understand the "unknown channel m4trace" part, but "AC_OUTPUT was never used" seems clear enough. The doc for AC_OUTPUT states: "This is the only required macro besides AC_INIT".

Should, shouldn't automake simply include AC_OUTPUT in its simple test? I mean, if I add it as a second line of conftest.ac, the test definitely passes.

FX <fxcoudert>
Sun 13 Dec 2020 10:49:05 PM UTC, comment #10: 

No, sorry, I was mistaken. I concluded incorrectly that GNU m4 fixed it when everything worked fine on my local machine.

When I made GNU m4 available to a sandboxed build environment, it stopped working. There seems to have been something else on my local machine that fixed things.

My current hypothesis is GNU coreutils, which I've installed on my machine but is not in Homebrew's standard build environment. However I'm not familiar enough with autoconf/automake to tell if that would even make a difference.

Carlo Cabrera <carlocab>
Sun 13 Dec 2020 10:45:17 PM UTC, comment #9: 

Glad that worked, at least.

I have no way to know specifically what the problem was. In general, autoconf (and automake subprograms) are a big stress test for m4, and afaik a lot of non-GNU m4's fail.

The configure test that reads
"checking for GNU M4 that supports accurate traces"
should presumably fail with Apple's m4 (it was reported as succeeding). Whether it's viable to sharpen that test, I can't say. I doubt Zack can do much without access to a system with the insufficient m4 (and enough time to look ...).

Best,
Karl

Karl Berry <karl>
Group Member
Sun 13 Dec 2020 10:40:35 PM UTC, comment #8: 

Thanks, that seems to have worked.

Any idea what the problem might be?

Carlo Cabrera <carlocab>
Sun 13 Dec 2020 10:25:55 PM UTC, comment #7: 

Looking at comment #6, the only idea that comes to mind is to try installing GNU m4 and see if that works around the problem.

Karl Berry <karl>
Group Member
Wed 09 Dec 2020 07:23:22 AM UTC, comment #6: 

Without patch, outside of homebrew, installing automake 1.16.3 with autoconf 2.70 fails:


rmeur /tmp/autoconf-2.70 $ ./configure --prefix=/tmp
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin20.1.0
checking host system type... x86_64-apple-darwin20.1.0
configure: autobuild project... GNU Autoconf
configure: autobuild revision... 2.70
configure: autobuild hostname... rmeur.local
configure: autobuild timestamp... 20201209T072029Z
checking for a shell whose -n mode is known to work... /bin/sh
checking for characters that cannot appear in file names... none
checking whether directories can have trailing spaces... yes
checking for expr... /bin/expr
checking for GNU M4 that supports accurate traces... /usr/bin/m4
checking whether /usr/bin/m4 accepts --gnu... no
configure: WARNING: the version of M4 that was found does not support -g
configure: WARNING: using it with POSIXLY_CORRECT set may cause problems
checking how m4 supports trace files... --error-output
checking for perl... /usr/bin/perl
checking whether /usr/bin/perl Fcntl::flock is implemented... yes
checking for emacs... no
checking for xemacs... no
checking for emacs... no
checking where .elc files should go... ${datadir}/emacs/site-lisp
checking for grep that handles long lines and -e... /usr/local/bin/ggrep
checking for egrep... /usr/local/bin/ggrep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking whether make is case sensitive... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating tests/atlocal
config.status: creating Makefile
config.status: executing tests/atconfig commands
rmeur /tmp/autoconf-2.70 $ make install
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-am
rm -f bin/autom4te bin/autom4te.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autom4te.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autom4te.in; do not edit by hand.|g' ${srcdir}bin/autom4te.in >bin/autom4te.tmp
chmod +x bin/autom4te.tmp
chmod a-w bin/autom4te.tmp
mv bin/autom4te.tmp bin/autom4te
rm -f lib/autom4te.cfg lib/autom4te.cfg-t
./build-aux/install-sh -c -d lib
sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from lib/autom4te.cfg.in; do not edit by hand.|g' ./lib/autom4te.in >lib/autom4te.cfg-t
chmod a-w lib/autom4te.cfg-t
mv -f lib/autom4te.cfg-t lib/autom4te.cfg
./build-aux/install-sh -c -d lib/m4sugar
:;{ \
          echo '# This file is part of -*- Autoconf -*-.' && \
          echo '# Version of Autoconf.' && \
          echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \
          echo '# Free Software Foundation, Inc.' && \
          echo  &&\
          echo 'm4_define([m4_PACKAGE_NAME],      [GNU Autoconf])' && \
          echo 'm4_define([m4_PACKAGE_TARNAME],   [autoconf])' && \
          echo 'm4_define([m4_PACKAGE_VERSION],   [2.70])' && \
          echo 'm4_define([m4_PACKAGE_STRING],    [GNU Autoconf 2.70])' && \
          echo 'm4_define([m4_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])' && \
          echo 'm4_define([m4_PACKAGE_URL],       [https://www.gnu.org/software/autoconf/])' && \
          echo 'm4_define([m4_PACKAGE_YEAR],      [2020])'; \
        } > lib/m4sugar/version.m4-t
mv lib/m4sugar/version.m4-t lib/m4sugar/version.m4
autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         --language M4sh --cache '' \
          --melt ./bin/autoconf.as -o bin/autoconf.in
rm -f bin/autoconf bin/autoconf.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autoconf.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autoconf.in; do not edit by hand.|g' ${srcdir}bin/autoconf.in >bin/autoconf.tmp
chmod +x bin/autoconf.tmp
chmod a-w bin/autoconf.tmp
mv bin/autoconf.tmp bin/autoconf
rm -f bin/autoheader bin/autoheader.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autoheader.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autoheader.in; do not edit by hand.|g' ${srcdir}bin/autoheader.in >bin/autoheader.tmp
chmod +x bin/autoheader.tmp
chmod a-w bin/autoheader.tmp
mv bin/autoheader.tmp bin/autoheader
rm -f bin/autoreconf bin/autoreconf.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autoreconf.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autoreconf.in; do not edit by hand.|g' ${srcdir}bin/autoreconf.in >bin/autoreconf.tmp
chmod +x bin/autoreconf.tmp
chmod a-w bin/autoreconf.tmp
mv bin/autoreconf.tmp bin/autoreconf
rm -f bin/autoscan bin/autoscan.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autoscan.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autoscan.in; do not edit by hand.|g' ${srcdir}bin/autoscan.in >bin/autoscan.tmp
chmod +x bin/autoscan.tmp
chmod a-w bin/autoscan.tmp
mv bin/autoscan.tmp bin/autoscan
rm -f bin/autoupdate bin/autoupdate.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/autoupdate.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/autoupdate.in; do not edit by hand.|g' ${srcdir}bin/autoupdate.in >bin/autoupdate.tmp
chmod +x bin/autoupdate.tmp
chmod a-w bin/autoupdate.tmp
mv bin/autoupdate.tmp bin/autoupdate
rm -f bin/ifnames bin/ifnames.tmp
./build-aux/install-sh -c -d bin
srcdir=''; \
          test -f ./bin/ifnames.in || srcdir=./; \
          sed -e 's|@SHELL[@]|/bin/sh|g' -e 's|@PERL[@]|/usr/bin/perl|g' -e 's|@PERL_FLOCK[@]|yes|g' -e 's|@bindir[@]|/tmp/bin|g' -e 's|@pkgdatadir[@]|/tmp/share/autoconf|g' -e 's|@prefix[@]|/tmp|g' -e 's|@autoconf-name[@]|'`echo autoconf | sed 's,x,x,'`'|g' -e 's|@autoheader-name[@]|'`echo autoheader | sed 's,x,x,'`'|g' -e 's|@autom4te-name[@]|'`echo autom4te | sed 's,x,x,'`'|g' -e 's|@M4[@]|/usr/bin/m4|g' -e 's|@M4_DEBUGFILE[@]|--error-output|g' -e 's|@M4_GNU[@]||g' -e 's|@AWK[@]|awk|g' -e 's|@RELEASE_YEAR[@]|2020|g' -e 's|@VERSION[@]|2.70|g' -e 's|@PACKAGE_NAME[@]|GNU Autoconf|g' -e 's|@configure_input[@]|Generated from bin/ifnames.in; do not edit by hand.|g' ${srcdir}bin/ifnames.in >bin/ifnames.tmp
chmod +x bin/ifnames.tmp
chmod a-w bin/ifnames.tmp
mv bin/ifnames.tmp bin/ifnames
autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         --language=M4sh ./tests/wrapper.as -o tests/wrapper.in
rm -f tests/autoconf tests/autoconf.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autoconf|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autoconf.tmp
chmod +x tests/autoconf.tmp
chmod a-w tests/autoconf.tmp
mv -f tests/autoconf.tmp tests/autoconf
rm -f tests/autoheader tests/autoheader.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autoheader|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autoheader.tmp
chmod +x tests/autoheader.tmp
chmod a-w tests/autoheader.tmp
mv -f tests/autoheader.tmp tests/autoheader
rm -f tests/autom4te tests/autom4te.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autom4te|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autom4te.tmp
chmod +x tests/autom4te.tmp
chmod a-w tests/autom4te.tmp
mv -f tests/autom4te.tmp tests/autom4te
rm -f tests/autoreconf tests/autoreconf.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autoreconf|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autoreconf.tmp
chmod +x tests/autoreconf.tmp
chmod a-w tests/autoreconf.tmp
mv -f tests/autoreconf.tmp tests/autoreconf
rm -f tests/autoscan tests/autoscan.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autoscan|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autoscan.tmp
chmod +x tests/autoscan.tmp
chmod a-w tests/autoscan.tmp
mv -f tests/autoscan.tmp tests/autoscan
rm -f tests/autoupdate tests/autoupdate.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|autoupdate|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/autoupdate.tmp
chmod +x tests/autoupdate.tmp
chmod a-w tests/autoupdate.tmp
mv -f tests/autoupdate.tmp tests/autoupdate
rm -f tests/ifnames tests/ifnames.tmp
input=tests/wrapper.in \
          && sed -e 's|@wrap_program[@]|ifnames|g' -e 's|@abs_top_srcdir[@]|/tmp/autoconf-2.70|g' -e 's|@abs_top_builddir[@]|/tmp/autoconf-2.70|g' -e "s|@configure_input[@]|Generated from $input.|g" tests/wrapper.in >tests/ifnames.tmp
chmod +x tests/ifnames.tmp
chmod a-w tests/ifnames.tmp
mv -f tests/ifnames.tmp tests/ifnames
if test 'no' != no; then \
          am__dir=. am__subdir_includes=''; \
          case lib/emacs/autoconf-mode.elc in */*) \
            am__dir=`echo 'lib/emacs/autoconf-mode.elc' | sed 's,/[^/]*$,,'`; \
            am__subdir_includes="-L $am__dir -L ./$am__dir"; \
          esac; \
          test -d "$am__dir" || ./build-aux/install-sh -c -d "$am__dir" || exit 1; \
          no --batch \
              \
            $am__subdir_includes -L . -L . \
            --eval '(if (boundp (quote byte-compile-dest-file-function)) (setq byte-compile-dest-file-function (lambda (_) "lib/emacs/autoconf-mode.elc")) (defun byte-compile-dest-file (_) "lib/emacs/autoconf-mode.elc") )' \
            -f batch-byte-compile 'lib/emacs/autoconf-mode.el'; \
        else :; fi
if test 'no' != no; then \
          am__dir=. am__subdir_includes=''; \
          case lib/emacs/autotest-mode.elc in */*) \
            am__dir=`echo 'lib/emacs/autotest-mode.elc' | sed 's,/[^/]*$,,'`; \
            am__subdir_includes="-L $am__dir -L ./$am__dir"; \
          esac; \
          test -d "$am__dir" || ./build-aux/install-sh -c -d "$am__dir" || exit 1; \
          no --batch \
              \
            $am__subdir_includes -L . -L . \
            --eval '(if (boundp (quote byte-compile-dest-file-function)) (setq byte-compile-dest-file-function (lambda (_) "lib/emacs/autotest-mode.elc")) (defun byte-compile-dest-file (_) "lib/emacs/autotest-mode.elc") )' \
            -f batch-byte-compile 'lib/emacs/autotest-mode.el'; \
        else :; fi
./build-aux/install-sh -c -d lib/autoconf
lang=`echo 'lib/autoconf/autoconf' | sed 's,.*/,,'` \
          && if test $lang = autoconf; then \
               lang=autoconf-without-aclocal-m4; \
             else :; fi \
          && autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         \
                --language=$lang \
                --freeze \
                --output=lib/autoconf/autoconf.m4f
./build-aux/install-sh -c -d lib/autoscan
echo '# Automatically Generated: do not edit this file' >lib/autoscan/autoscan.list
sed '/^[#]/!q' ./lib/autoscan/autoscan.pre >>lib/autoscan/autoscan.list
( \
          sed -n '/^[^#]/p' ./lib/autoscan/autoscan.pre; \
          autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         --cache '' -M -l autoconf-without-aclocal-m4 \
            -t'AN_OUTPUT:$1: $2                $3' \
        ) | LC_ALL=C sort >>lib/autoscan/autoscan.list
./build-aux/install-sh -c -d lib/autotest
lang=`echo 'lib/autotest/autotest' | sed 's,.*/,,'` \
          && if test $lang = autoconf; then \
               lang=autoconf-without-aclocal-m4; \
             else :; fi \
          && autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         \
                --language=$lang \
                --freeze \
                --output=lib/autotest/autotest.m4f
./build-aux/install-sh -c -d lib/m4sugar
lang=`echo 'lib/m4sugar/m4sugar' | sed 's,.*/,,'` \
          && if test $lang = autoconf; then \
               lang=autoconf-without-aclocal-m4; \
             else :; fi \
          && autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         \
                --language=$lang \
                --freeze \
                --output=lib/m4sugar/m4sugar.m4f
./build-aux/install-sh -c -d lib/m4sugar
lang=`echo 'lib/m4sugar/m4sh' | sed 's,.*/,,'` \
          && if test $lang = autoconf; then \
               lang=autoconf-without-aclocal-m4; \
             else :; fi \
          && autom4te_perllibdir='.'/lib AUTOM4TE_CFG='lib/autom4te.cfg'         bin/autom4te -B ''lib -B '.'/lib         \
                --language=$lang \
                --freeze \
                --output=lib/m4sugar/m4sh.m4f
 ./build-aux/install-sh -c -d '/tmp/bin'
 /usr/bin/install -c bin/autoconf bin/autoheader bin/autom4te bin/autoreconf bin/autoscan bin/autoupdate bin/ifnames '/tmp/bin'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/autoconf'
 /usr/bin/install -c -m 644 lib/autoconf/autoconf.m4 lib/autoconf/general.m4 lib/autoconf/status.m4 lib/autoconf/oldnames.m4 lib/autoconf/specific.m4 lib/autoconf/autoheader.m4 lib/autoconf/autoupdate.m4 lib/autoconf/autotest.m4 lib/autoconf/autoscan.m4 lib/autoconf/lang.m4 lib/autoconf/c.m4 lib/autoconf/erlang.m4 lib/autoconf/fortran.m4 lib/autoconf/functions.m4 lib/autoconf/go.m4 lib/autoconf/headers.m4 lib/autoconf/types.m4 lib/autoconf/libs.m4 lib/autoconf/programs.m4 lib/autoconf/trailer.m4 '/tmp/share/autoconf/autoconf'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/autotest'
 /usr/bin/install -c -m 644 lib/autotest/autotest.m4 lib/autotest/general.m4 lib/autotest/specific.m4 '/tmp/share/autoconf/autotest'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/build-aux'
 /usr/bin/install -c -m 644 build-aux/config.guess build-aux/config.sub build-aux/install-sh '/tmp/share/autoconf/build-aux'
if test 'no' != no; then \
          am__dir=. am__subdir_includes=''; \
          case lib/emacs/autoconf-mode.elc in */*) \
            am__dir=`echo 'lib/emacs/autoconf-mode.elc' | sed 's,/[^/]*$,,'`; \
            am__subdir_includes="-L $am__dir -L ./$am__dir"; \
          esac; \
          test -d "$am__dir" || ./build-aux/install-sh -c -d "$am__dir" || exit 1; \
          no --batch \
              \
            $am__subdir_includes -L . -L . \
            --eval '(if (boundp (quote byte-compile-dest-file-function)) (setq byte-compile-dest-file-function (lambda (_) "lib/emacs/autoconf-mode.elc")) (defun byte-compile-dest-file (_) "lib/emacs/autoconf-mode.elc") )' \
            -f batch-byte-compile 'lib/emacs/autoconf-mode.el'; \
        else :; fi
if test 'no' != no; then \
          am__dir=. am__subdir_includes=''; \
          case lib/emacs/autotest-mode.elc in */*) \
            am__dir=`echo 'lib/emacs/autotest-mode.elc' | sed 's,/[^/]*$,,'`; \
            am__subdir_includes="-L $am__dir -L ./$am__dir"; \
          esac; \
          test -d "$am__dir" || ./build-aux/install-sh -c -d "$am__dir" || exit 1; \
          no --batch \
              \
            $am__subdir_includes -L . -L . \
            --eval '(if (boundp (quote byte-compile-dest-file-function)) (setq byte-compile-dest-file-function (lambda (_) "lib/emacs/autotest-mode.elc")) (defun byte-compile-dest-file (_) "lib/emacs/autotest-mode.elc") )' \
            -f batch-byte-compile 'lib/emacs/autotest-mode.el'; \
        else :; fi
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/m4sugar'
 /usr/bin/install -c -m 644 lib/m4sugar/m4sugar.m4 lib/m4sugar/foreach.m4 lib/m4sugar/m4sh.m4 '/tmp/share/autoconf/m4sugar'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/Autom4te'
 /usr/bin/install -c -m 644 lib/Autom4te/C4che.pm lib/Autom4te/ChannelDefs.pm lib/Autom4te/Channels.pm lib/Autom4te/Config.pm lib/Autom4te/Configure_ac.pm lib/Autom4te/FileUtils.pm lib/Autom4te/General.pm lib/Autom4te/Getopt.pm lib/Autom4te/Request.pm lib/Autom4te/XFile.pm '/tmp/share/autoconf/Autom4te'
 ./build-aux/install-sh -c -d '/tmp/share/info'
 /usr/bin/install -c -m 644 ./doc/autoconf.info ./doc/standards.info '/tmp/share/info'
 install-info --info-dir='/tmp/share/info' '/tmp/share/info/autoconf.info'
 install-info --info-dir='/tmp/share/info' '/tmp/share/info/standards.info'
 ./build-aux/install-sh -c -d '/tmp/share/man/man1'
 /usr/bin/install -c -m 644 man/autoconf.1 man/autoheader.1 man/autom4te.1 man/autoreconf.1 man/autoscan.1 man/autoupdate.1 man/ifnames.1 '/tmp/share/man/man1'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/autoconf'
 /usr/bin/install -c -m 644 lib/autoconf/autoconf.m4f '/tmp/share/autoconf/autoconf'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/autoscan'
 /usr/bin/install -c -m 644 lib/autoscan/autoscan.list '/tmp/share/autoconf/autoscan'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/autotest'
 /usr/bin/install -c -m 644 lib/autotest/autotest.m4f '/tmp/share/autoconf/autotest'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf/m4sugar'
 /usr/bin/install -c -m 644 lib/m4sugar/version.m4 lib/m4sugar/m4sugar.m4f lib/m4sugar/m4sh.m4f '/tmp/share/autoconf/m4sugar'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf'
 /usr/bin/install -c -m 644 lib/autom4te.cfg '/tmp/share/autoconf'
 ./build-aux/install-sh -c -d '/tmp/share/autoconf'
 /usr/bin/install -c -m 644 ./INSTALL '/tmp/share/autoconf'
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-data-hook
for s in build-aux/config.guess build-aux/config.sub build-aux/install-sh; do \
          chmod +x "/tmp/share/autoconf/$s"; \
        done
rmeur /tmp/autoconf-2.70 $ cd ../automake-1.16.3
rmeur /tmp/automake-1.16.3 $ export PATH=/tmp/bin:$PATH
rmeur /tmp/automake-1.16.3 $ ./configure
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin20.1.0
checking host system type... x86_64-apple-darwin20.1.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... ./lib/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
checking for perl... /usr/bin/perl
checking for tex... tex
checking for yacc... yacc
checking for lex... lex
checking whether autoconf is installed... yes
checking whether autoconf works... no
configure: error: The installed version of autoconf does not work.
    Please check config.log for error messages before this one.



and config.log shows the error:


configure:3113: checking whether autoconf works
configure:3121: cd conftest && autoconf -o /dev/null conftest.ac
unknown channel m4trace: -1- _m4_warn(syntax, AC_OUTPUT was never used, )
 at /tmp/share/autoconf/Autom4te/Channels.pm line 631.
        Autom4te::Channels::msg("m4trace: -1- _m4_warn(syntax, AC_OUTPUT was never used, )\x{a}", undef, undef, "partial", 0) called at /tmp/bin/autom4te line 1073
configure:3124: $? = 1
configure:3133: result: no
configure:3136: error: The installed version of autoconf does not work.
    Please check config.log for error messages before this one.



FX <fxcoudert>
Wed 09 Dec 2020 03:40:05 AM UTC, comment #5: 

Yes, of course. That makes sense. I'll need to look into finding you a machine for remote shell access.

However, the build scripts for automake and autoconf are very simple. For automake, it (essentially) runs these commands in the build directory:

export PERL=/usr/bin/perl
./configure --prefix=$prefix
make install


Similarly, for autoconf:

export PERL=/usr/bin/perl
sed -i 's/libtoolize/glibtoolize/g' bin/autoreconf.in
sed -i 's/libtoolize/glibtoolize/g' man/autoreconf.1

./configure --prefix=$prefix --with-lispdir=$elisp
make install

rm -f info/standards.info


The modification to autoreconf.in is so that autoreconf uses Homebrew's (GNU) libtool instead of Apple's libtool. Could the patch to autoreconf.{in,1} be causing problems?

Carlo Cabrera <carlocab>
Wed 09 Dec 2020 02:58:14 AM UTC, comment #4: 

The aclocal command is part of automake; you need existing installed copies of both autoconf and automake to run autoreconf -iv on either autoconf or automake.  It's kinda the same thing as needing a C compiler already before you can build gcc.  Normally this is only an issue if you're doing development on these tools, though, because the tarball releases include pre-generated copies of all the files that are generated by autoreconf -iv.

Is there a macOS machine that you could give me remote shell access to?  I don't understand how Homebrew works particularly, but I could at least debug the upstream build process for autoconf and automake in that environment.  I can provide you with SSH keys.

Zack Weinberg <zackw>
Group administrator
Wed 09 Dec 2020 02:39:36 AM UTC, comment #3: 

Sorry, I just noticed you mentioning the automake configure script needing to be regenerated with the new autoconf. That's not done in the CI run, which just calls the configure script immediately. I just tried to run it locally instead:


autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.70/share/autoconf/Autom4te/FileUtils.pm line 274.
autoreconf: error: aclocal failed with exit status: 2


This is the error from running `autoreconf --verbose` in the build directory for automake. Adding `--install` or `--force` flags don't seem to help, but I'll admit to having no idea what I'm doing here.

Carlo Cabrera <carlocab>
Wed 09 Dec 2020 02:08:30 AM UTC, comment #2: 

Thanks for the quick response. Here are the autoconf and automake logs from the CI node running macOS 11: https://www.dropbox.com/s/ts1nx36buk3x7a8/logs.tar.gz?dl=1

The logs look similar on the nodes running 10.14 and 10.15, but let me know if you'd like to have a look at them anyway.

You can also access the logs through the GitHub CI interface here:

https://github.com/Homebrew/homebrew-core/pull/66511/checks?check_run_id=1520593657

There is a way to access the raw logs and log archives for the whole CI run through that interface if you need it.

Let me know if you need anything else.

Anonymous
Wed 09 Dec 2020 01:42:25 AM UTC, comment #1: 

Thanks for the bug report.  It looks like the smoke-test code in your Homebrew recipe was attempting to run autoconf (the command-line utility) on the file Autoconf (the package) installs as $prefix/share/autoconf/autotest/autotest.m4.  This file is not a configure script, and running autoconf on it is not expected to work.  It looks like you have already changed your recipe to do a more sensible smoke test.

It should be possible to build autoconf from the release tarball without running `autoreconf -fiv` first and without having automake installed, unless you patch configure.ac, Makefile.am, any of the files in the m4/ or build-aux/ subdirectories, or any of the files with a .mk extension.

Could you please provide a link to the complete build log for the failed attempt to build automake after regenerating its configure script with the new autoconf?  That might indeed be a bug.

Zack Weinberg <zackw>
Group administrator
Tue 08 Dec 2020 11:09:23 PM UTC, original submission:  

Attempting to run autoconf 2.70 on the packaged autotest.m4 produces the following error:

```
==> /usr/local/Cellar/autoconf/2.70/bin/autoconf autotest.m4
unknown channel m4trace: -1- _m4_warn(syntax, AC_INIT was never used, )
m4trace: -1- _m4_warn(syntax, AC_OUTPUT was never used, )
 at /usr/local/Cellar/autoconf/2.70/share/autoconf/Autom4te/Channels.pm line 631.
Autom4te::Channels::msg("m4trace: -1- _m4_warn(syntax, AC_INIT was never used, )\x{a}m4tra"..., undef, undef, "partial", 0) called at /usr/local/Cellar/autoconf/2.70/bin/autom4te line 1073
```

A similar error is generated when one attempts to build automake using the newly built autoconf.

These errors were generated in Homebrew CI runs here: https://github.com/Homebrew/homebrew-core/pull/66511

I can also reproduce the error quoted above on my local machine. Assistance would be appreciated.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmroot (Posted a comment)
  • -email is unavailable- added by karl (Posted a comment)
  • -email is unavailable- added by fxcoudert (Posted a comment)
  • -email is unavailable- added by carlocab (Posted a comment)
  • -email is unavailable- added by zackw (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-08 zackw StatusNeed Info Not Autoconf
        Open/ClosedOpen Closed
    2020-12-09 zackw StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code