bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Cc: Simon Josefsson <simon@josefsson.org>, bug-gettext@gnu.org
Subject: Re: Prefer AM_GNU_GETTEXT_REQUIRE_VERSION?
Date: Mon, 06 Dec 2021 02:20:21 +0100	[thread overview]
Message-ID: <4790470.KnAXcdumGx@omega> (raw)
In-Reply-To: <87ee76wshq.fsf@latte.josefsson.org>

[CCing bug-gettext]
Simon Josefsson wrote in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-11/msg00029.html>:

> Hi.  This may mostly be for Bruno, but I believe it is more relevent to
> gnulib than gettext, even though it is gettext-related, and maybe others
> on this list can provide feedback too.
> 
> I got a bug report that suggested using AM_GNU_GETTEXT_REQUIRE_VERSION:
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=999510
> 
> The suggestion boils down to:
> 
> -AM_GNU_GETTEXT_VERSION([0.19.3])
> +AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])
> +AM_GNU_GETTEXT_VERSION([0.19.6])

I don't understand the use-case of AM_GNU_GETTEXT_REQUIRE_VERSION; and it's
only half documented (not listed in the TOC, not listed in the autoconf
macro index); therefore I cannot recommend to use it.

> Libidn2 (and many other packages) contains:
> 
> AM_GNU_GETTEXT([external])
> AM_GNU_GETTEXT_VERSION([0.19.3])
> 
> Reading gettext NEWS suggests to me that 0.19.8 fixed something for
> musl, and that this gettext fix is what is needed to build packages
> using gettext on that platform.  Am I understanding correct?

The NEWS entry says:
  - The AM_GNU_GETTEXT Autoconf macro can now detect musl-libc's
    gettext as a compatible implementation.

Since this was a change in the gettext.m4 macro (as opposed to the
runtime code), yes you need to do something in order to make your
package build well on musl systems.

I would suggest to just replace

  AM_GNU_GETTEXT_VERSION([0.19.3])

with

  AM_GNU_GETTEXT_VERSION([0.19.8])

> If so, my usage of AM_GNU_GETTEXT_VERSION([0.19.3]) seems indeed
> problematic because it leads to a too old gettext infrastructure being
> pulled in.  It would be nice if my package used the latest available
> gettext files during bootstrapping, so I should use this:
> 
> AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
> AM_GNU_GETTEXT_VERSION([0.19.6])

If you do this, different people who check out your repository and build
it will get different configure files - some with gettext.m4 0.19.6 (which
does not include the musl fix), some with 0.21, some with intermediate
versions. I wouldn't go down this route, because the difference between
what the different people get is hard to track down.

> Why
> wouldn't you want gettext to use the latest available infrastructure
> files?  The situation seems similar to libtool's M4 handling.

Because if e.g. you are the main developer, and another person is the
release manager, you don't want the release manager to release a source
tarball that is significantly different from what you have tested all
the time.

> Thus I would prefer to write a 'make syntax-check' rule to catch this,
> and suggest that all packages should use AM_GNU_GETTEXT_REQUIRE_VERSION
> to get latest gettext files included in them.

You are free to do so. But I would not do that. And certainly it should
not be done in Gnulib's maint.mk.

Bruno





      reply	other threads:[~2021-12-06  1:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-23 20:02 Prefer AM_GNU_GETTEXT_REQUIRE_VERSION? Simon Josefsson via Gnulib discussion list
2021-12-06  1:20 ` Bruno Haible [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4790470.KnAXcdumGx@omega \
    --to=bruno@clisp.org \
    --cc=bug-gettext@gnu.org \
    --cc=bug-gnulib@gnu.org \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).