autoconf-2.7x introduced a race condition with how it's used by autotools.eclass. Error happens at the automake stage, and automake.out will have one of: configure.ac:4: error: version mismatch. This is Automake 1.16.3, or configure.ac:5: error: your implementation of AM_INIT_AUTOMAKE comes from an configure.ac:5: old Automake version. You should recreate aclocal.m4 Not believed individual packages need their own fix, this tracker is for reference. Known to be easier to reproduce on a CPU with good single-thread/boost performance, for some hardware it may be near-impossible to reproduce. To reproduce without the eclass, autom4te.cache left by the eclass autotools_check_macro()'s --trace usage is needed. For example, looping this on a clean affected source (e.g. x11-misc/numlockx) may fail eventually: autoconf --trace=AC_INIT && \ aclocal && autoconf -f && autoheader && automake -acf --foreign Not known to happen with autoreconf after a --trace.
I think it's not exactly a race condition (i found no processes running in parallel), but a bug in too coarse grained timestamps used to regenerate the autoconf cache. I looked at xmlto's failures and noticed that failure happens when automake decides not to regenerate caches because they are too fresh. autoconf's comment for `up_to_date()` function nails it down: https://git.savannah.gnu.org/cgit/autoconf.git/tree/bin/autom4te.in#n913 # The youngest of the cache files must be older than the oldest of # the dependencies. # FIXME: These timestamps have only 1-second resolution. # Time::HiRes fixes this, but assumes Perl 5.8 or later. my $tmtime = mtime ($tfile); my $omtime = mtime ($ofile); my ($file, $mtime) = ($tmtime < $omtime ? ($ofile, $omtime) : ($tfile, $tmtime)); Note that it uses single-second resolution for that. If the machine is fast enough to unpack the source and run all the autoconf steps within a second it will not regenerate stale traces. The following workaround seems to repair `xmlto` for me, but I think it's too conservative for general use: --- a/bin/autom4te.in +++ b/bin/autom4te.in @@ -898,6 +898,8 @@ sub up_to_date ($) { my ($req) = @_; + return 0; + return 0 if ! $req->valid;
Created attachment 729279 [details, diff] autoconf-2.71-always-stale.patch
Created attachment 729375 [details, diff] patch for higher time resolution Here's a patch that works from ~ Perl 5.8 on and provides us time resolution. Completely untested so far, please give it a try.
(In reply to Andreas K. Hüttel from comment #3) > Created attachment 729375 [details, diff] [details, diff] > patch for higher time resolution > > Here's a patch that works from ~ Perl 5.8 on and provides us time resolution. > > Completely untested so far, please give it a try. Doesnt work yet. On it.
Created attachment 729402 [details, diff] patch for higher time resolution this one is actually working perl :D
(In reply to Andreas K. Hüttel from comment #5) > Created attachment 729402 [details, diff] [details, diff] > patch for higher time resolution > > this one is actually working perl :D ... and the testsuite passes with the patch. :)
Created attachment 729423 [details, diff] 0001-profiles-package.mask-a-add-a-bug-reference-to-autoc.patch
Filed bug and minimal reproducer upstream as https://savannah.gnu.org/support/index.php?110521
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a27bb196930c2b32f3f24956d902c2849d27d20b commit a27bb196930c2b32f3f24956d902c2849d27d20b Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2021-08-01 19:44:14 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2021-08-01 19:44:24 +0000 sys-devel/autoconf: use Time::HiRes functions, bug 782985 While this solution is perfect for Gentoo, it may not be upstreamable (since Time::HiRes was introduced in Perl 5.8 and autoconf upstream insists on supporting Perl 5.6). Bug: https://bugs.gentoo.org/782985 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> sys-devel/autoconf/autoconf-2.71.ebuild | 2 + sys-devel/autoconf/files/autoconf-2.71-time.patch | 49 +++++++++++++++++++++++ 2 files changed, 51 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9c4fccc1d664d80c422c0e1eea169564266fb5c commit e9c4fccc1d664d80c422c0e1eea169564266fb5c Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-08-01 16:36:54 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-08-01 19:47:12 +0000 profiles/package.mask: add a bug reference to autoconf:2.71 mask Bug: https://bugs.gentoo.org/782985 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org> profiles/package.mask | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92fbfd818f07358491803f0b2ca4ec63296d4360 commit 92fbfd818f07358491803f0b2ca4ec63296d4360 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-08-01 19:51:08 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-08-01 19:51:24 +0000 sys-devel/autoconf: revbump for possible 2.71 race condition fix See: a27bb196930c2b32f3f24956d902c2849d27d20b Bug: https://bugs.gentoo.org/782985 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/autoconf/{autoconf-2.71.ebuild => autoconf-2.71-r1.ebuild} | 0 1 file changed, 0 insertions(+), 0 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bedc7744b5b77113a27ac257053c24999610b26 commit 0bedc7744b5b77113a27ac257053c24999610b26 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-08-03 12:57:37 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-08-03 12:57:37 +0000 profiles: unmask autoconf 2.71 Let's give it another go. It was rather hard last time around to see many actual problems with 2.71 at all, and we've since fixed all remaining known ones other than some which look rather stale. We'll revisit if necessary. Bug: https://bugs.gentoo.org/732648 Bug: https://bugs.gentoo.org/782985 Signed-off-by: Sam James <sam@gentoo.org> profiles/package.mask | 6 ------ 1 file changed, 6 deletions(-)
Fixed upstream too: https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=3a9802d60156809c139e9b4620bf04917e143ee2.