On Mon, Dec 28, 2020 at 6:31 PM Eli Schwartz <eschwartz@xxxxxxxxxxxxx> wrote: > > On autoconf 2.69, this project: https://github.com/openzfs/zfs > logs the message: > > autoreconf: configure.ac: AM_GNU_GETTEXT is used, but not > AM_GNU_GETTEXT_VERSION > > But succeeds. > > With the update to autoconf 2.70, it instead logs: > > configure.ac: error: AM_GNU_GETTEXT is used, but not > AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION > > 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 configure.ac. # 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 configure.ac. 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 configure.ac, 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 configure.ac 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 configure.ac; 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 configure.ac, 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 configure.ac. 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 week. zw