Subject: Re: [PATCH] config.mak.uname: use iconv from Homebrew on macOS

From: René Scharfe <[email-masked]>
Date: Tue, 9 Dec 2025 22:27:19 +0100

On 12/9/25 9:39 PM, Yee Cheng Chin wrote:
>> +       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é