[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confusing behavior with autoreconf and gettext in the openzfs projec

From: Zack Weinberg
Subject: Re: Confusing behavior with autoreconf and gettext in the openzfs project
Date: Mon, 4 Jan 2021 17:42:15 -0500

On Mon, Dec 28, 2020 at 6:31 PM Eli Schwartz <> wrote:
> On autoconf 2.69, this project:
> logs the message:
> autoreconf: AM_GNU_GETTEXT is used, but not
> But succeeds.
> With the update to autoconf 2.70, it instead logs:
> error: AM_GNU_GETTEXT is used, but not
> And, as stated, errors out.

Thanks for the problem report.

This is a bit of a mess.  I'm going to copy and paste a big comment
from the code for autoreconf:

  # Gettext is a bit of a problem: its macros are not necessarily
  # visible to aclocal, so if we start with a completely stripped down
  # package (think of a fresh CVS checkout), running 'aclocal' first
  # will fail: the Gettext macros are missing.
  # Therefore, we can't use the traces to decide if we use Gettext or
  # not.  I guess that once Gettext move to 2.5x we will be able to,
  # but in the meanwhile forget it.
  # We can only grep for AM_GNU_GETTEXT_(REQUIRE_)?VERSION in
  # You might think this approach is naive, and indeed it is, as it prevents
  # one to embed AM_GNU_GETTEXT_(REQUIRE_)?VERSION in another *.m4, but
  # anyway we don't limit the generality, since... that's what autopoint does.
  # Actually, it is even more restrictive, as it greps for
  # '^AM_GNU_GETTEXT_(REQUIRE_)?VERSION('.  We did this above, while
  # scanning

With both 2.69 and 2.70, autoreconf thinks this project does *not*
need to run autopoint, which is accurate, because config/gettext.m4
(and everything else autopoint would install, I assume) is checked
into git. We did add support for AM_GNU_GETTEXT_REQUIRE_VERSION to
autoreconf in 2.70, but we didn't change anything else about the logic
for deciding when to run autopoint.

However, the "AM_GNU_GETTEXT is used, but not
AM_GNU_GETTEXT_(REQUIRE_)VERSION” diagnostic _did_ get promoted from a
warning to an error in 2.70.  This changed because of an unrelated bug
fix: this particular diagnostic has always been issued via the
"Autom4te" library function error(), and calls to that function are
_supposed_ to make the calling process continue running but, when it
does eventually exit, report a failure to the parent process.  The
code to report the failure had been left out, which we discovered when
working on something else.

> I cannot move just AM_GNU_GETTEXT_REQUIRE_VERSION to, since
> then it tells me:
> autopoint: *** AM_GNU_GETTEXT without 'external' argument is no longer
> supported in version 0.21
> Apparently I need to have *both* in the file itself. I
> don't know why one would not do so -- I don't know why openzfs *wants*
> to do so -- but the fact remains that this project does do so, and the
> error message is very confusing.

autoreconf itself only wants AM_GNU_GETTEXT_(REQUIRE_)VERSION to be in; it detects AM_GNU_GETTEXT by tracing m4 macro
invocations, and can find it whereever it is.

However, once you have AM_GNU_GETTEXT_REQUIRE_VERSION in,
then autoreconf thinks it _does_ need to run autopoint, and
*autopoint* doesn't know it can use traces to detect AM_GNU_GETTEXT,
and so you _do_ need to have both of them directly in

I think what this project actually wants, at least for right now, is
to not run autopoint.  To make that possible again, I have demoted the
"AM_GNU_GETTEXT is used, but not
AM_GNU_GETTEXT_VERSION" message to a warning.  The fix is on
development trunk as commit 66fdaea3cfb4e758212c1891913e9a59441d49af,
and the 2.70 branch as 35b1708c3961dce31e4ce43014e71d77aa4b5e31.  It
will be included in the bug-fix release coming out some time this


reply via email to

[Prev in Thread] Current Thread [Next in Thread]