Hi,

I would suggest to mention an important Autoconf bug fix that happened
in the 2.70 release. Namely:

  In previous releases, after changing the ‘configure.ac’ file, a
  previously generated ‘autom4te.cache’ directory could lead to a
  broken ‘config.status’ file, which in turn, after running ‘automake’,
  would lead to a broken ‘Makefile.in’.

How to reproduce the bug:

  - On Alma Linux 9 (a CentOS 9 clone).
  - Take a GNU gettext 1.0 or snapshot release. Build it.
  - In the gettext-tools/tests/ subdirectory, run
    $ make check TESTS=autopoint-3
    a few times. (I ran it 100 times, in each configuration.)
    It fails with a probability > 10%, like this:

      FAIL: autopoint-3
      =================

      Makefile:459: *** missing separator.  Stop.
      FAIL autopoint-3 (exit status: 1)

What this test does, is:
  1. It creates a configure.ac file and a Makefile.am file for a
     package named 'foo'.
  2. It invokes 'aclocal' and 'automake'.
  3. It erases configure.ac and Makefile.am.
  4. It creates a new configure.ac file and a new Makefile.am file for a
     package named 'hello'.
  5. It invokes 'aclocal' and 'autoconf'.
  6. It invokes 'automake', './configure', 'make'.

With the mentioned probability > 10%, step 5 creates a config.status file
that is made for package 'foo', not package 'hello', and whose subs1.awk
does not reflect the new configure.ac. Then step 6 creates a Makefile that
has many @...@ variables still unsubstituted, which leads to the
"*** missing separator." error.

I observe this with Autoconf 2.69 (built from source or from Red Hat, does
not matter), independently of the Automake version:
  - Automake 1.16.2  => probability ca. 16%
  - Automake 1.20    => probability ca. 40%

The workaround is to add a statement 'rm -rf autom4te.cache' in step 3.

I do *not* observe this with Autoconf releases 2.70, 2.71, 2.72, 2.73.
In particular, with Autoconf 2.73:
  - Automake 1.16.2  => probability 0% (0 failures out of 100)
  - Automake 1.20    => probability 0% (0 failures out of 100)

So, this shows that the bug is in Autoconf 2.69 and is fixed in 2.70
and newer.

I consider this an important bug, because a build system should be
deterministic. Producing a broken config.status with a probability > 0
is therefore important.

Hence my suggestion to mention it in the NEWS file, even a posteriori.
I spent several hours investigating this one (it first came up as a
continuous integration build failure), and would not have had to spend
this time if it had been mentioned in NEWS.

PS: I see this bug on two different Alma Linux 9 machines (a VM of mine,
with an XFS file system, and a CI machine). I don't know why I don't
reproduce it on Ubuntu 26.04, on an ext4 file system. (Maybe a different
perl version?) But that should be irrelevant at this point.

Bruno

From 7ea0ae2fc30ccea37ae917e6cc988576e9a561c0 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Sun, 8 Nov 2026 19:46:46 +0100
Subject: [PATCH] NEWS: Mention an important bug fix.

* NEWS (Notable bug fixes in 2.70): Mention the outdated autom4te.cache problem.
---
 NEWS | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/NEWS b/NEWS
index 9ffba6f7..2f5e29be 100644
--- a/NEWS
+++ b/NEWS
@@ -803,6 +803,13 @@ GNU Autoconf NEWS - User visible changes.
   closed, or $TMPDIR not being an absolute path, or the root directory
   being mentioned in $PATH.
 
+*** Correct ‘config.status’ generation even if ‘autom4te.cache’ is outdated.
+
+  In previous releases, after changing the ‘configure.ac’ file, a
+  previously generated ‘autom4te.cache’ directory could lead to a
+  broken ‘config.status’ file, which in turn, after running ‘automake’,
+  would lead to a broken ‘Makefile.in’.
+
 *** AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE now support multiple
     programming languages.  They no longer perform all checks in the
     language active upon the first use of the macro.
-- 
2.53.0

  • [PATCH] NEW... Bruno Haible via Discussion list for the autoconf build system
    • Re: [P... Paul Eggert
      • Re... Bruno Haible via Discussion list for the autoconf build system

Reply via email to