Re: [PATCH] config.mak.uname: use iconv from Homebrew on macOS
- From
René Scharfe <l.s.r@web.de>
- Date
- Dec 9, 2025, 21:27 UTC
- Message-ID
- <2e9aef63-9da0-4635-90f8-fa3e16dddde5@web.de>
- In-Reply-To
- <CAHTeOx-LFJVtNXrY-RfVUcAA_SjvK2310_xQ3skUEgKKQ6w57Q@mail.gmail.com>
On 12/9/25 9:39 PM, Yee Cheng Chin wrote:
Show 11 quoted lines
>> + ifeq ($(shell test -d /usr/local/opt/libiconv/ && echo y),y) >> + ICONVDIR ?= /usr/local/opt/libiconv >> + endif > > One thing to keep in mind is that x86-64 Homebrew (which is the one > that uses the /usr/local/ location) can be installed via Rosetta 2 on > Apple Silicon Macs for testing (I use it myself). In that case you > wouldn't really want to use the /usr/local/opt/libiconv location. It > would be a somewhat niche case (the user has to be using Apple Silicon > Mac, and somehow has Rosetta Homebrew libiconv installed but not > native Homebrew libiconv), but could happen.
If you have libiconv from both x86-64 and aarch64 Homebrew, the patch will use the latter. If you only have the one from x86-64, it will try to use that. For gettext we already do the same.
You can force using the slightly broken system iconv as before by compiling by setting the make variable ICONVDIR manually, e.g. with
$ make ICONVDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr
René