git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] macos: do let the build find the gettext headers/libraries/msgfmt

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 23, 2020, 16:17 UTC
Message-ID
<CAPig+cSDQe7YDke=fyfdeSZOimcR5jj3FFk=Q4iOk6uiHsT-Zw@mail.gmail.com>
In-Reply-To
<pull.616.git.1587628367528.gitgitgadget@gmail.com>

On Thu, Apr 23, 2020 at 3:54 AM Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 6 quoted lines
> Apparently a recent Homebrew update now installs `gettext` into a
> subdirectory under /usr/local/, requiring the CFLAGS/LDFLAGS to list
> explicit directories _even_ when asking to force-link the `gettext`
> package.
>
> Likewise, the `msgfmt` tool is no longer in the `PATH`.

Interesting. I wonder if this is indeed a recent Homebrew change or if something changed elsewhere in the environment. I ask because...

Show 11 quoted lines
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
> diff --git a/config.mak.uname b/config.mak.uname
> @@ -133,8 +133,11 @@ ifeq ($(uname_S),Darwin)
> -       BASIC_CFLAGS += -I/usr/local/include
> -       BASIC_LDFLAGS += -L/usr/local/lib
> +       BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include
> +       BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib
> +       ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
> +               MSGFMT = /usr/local/opt/gettext/bin/msgfmt
> +       endif

... I've needed these assignments in my local config.mak file ever since I switched over to Homebrew from Macports (which installed everything under top-level /opt) years ago.

I'm slightly leery of seeing these applied globally on Mac OS in config.mak.uname since various package managers on Mac OS install packages in wildly different locations, and these settings might cause the wrong version of a package to be picked up if a user has a preferred version installed elsewhere.

Would it be an alternative for the CI/PR build process to just create a local customized config.mak rather than patching the globally-applied config.mak.uname like this?

Previous: Johannes Schindelin via GitGitGadgetNext: Eric Sunshine
Message 2 of 12 in “macos: do let the build find the gettext headers/libraries/msgfmt”
  1. macos: do let the build find the gettext headers/libraries/msgfmtJohannes Schindelin via GitGitGadget, Apr 23, 2020
  2. Eric SunshineApr 23, 2020
  3. Eric SunshineApr 23, 2020
  4. Johannes SchindelinApr 25, 2020
  5. Carlo ArenasApr 26, 2020
  6. Johannes SchindelinApr 26, 2020
  7. macos: do not assume brew and gettext are always available/wantedCarlo Marcelo Arenas Belón, Apr 25, 2020
  8. Johannes SchindelinApr 25, 2020
  9. macos: do let the build find the gettext headers/libraries/msgfmtJohannes Schindelin via GitGitGadget, Apr 25, 2020
  10. Torsten BögershausenApr 26, 2020
  11. Carlo Marcelo Arenas BelónApr 26, 2020
  12. 1/1 MacOs/brew: Let the build find gettext headers/libraries/msgfmttboegi@web.de, Apr 26, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.