bug#79714: env: always adds __CF_USER_TEXT_ENCODING var on macOS since v9.8

"Andrew Marshall" via GNU coreutils Bug Reports <[email protected]>
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <[email protected]>
On Sat, Nov 1, 2025, at 07:47, Pádraig Brady wrote:
> On 01/11/2025 09:24, Bruno Haible via GNU coreutils Bug Reports wrote:
>> Pádraig Brady wrote:
>>> In fact only 6 commands require the localename-unsafe dependency:  date, du
>>> through show-date() (fprintftime), and
>>>    ls, pr, stat, uptime through strftime().
>>> So I'll adjust things to only link those against CoreFoundation.
>> 
>> This will have no effect in most cases.
>> 
>> The CoreFoundation dependency is needed for two purposes:
>>    - Gnulib modules such as localename, nstrftime, fprintftime,
>>    - $(LIBINTL) when built without --disable-nls.
>>      Here, it ensures that the user's settings in control panels
>>      are respected by programs that, as usual, do
>>        setlocale (LC_ALL, "");
>> 
>> Since normally, on macOS, GNU packages are built with NLS enabled,
>> the 'env' program will still be linked against CoreFoundation.
>
> Good point,
> but restricting the explicit link would help Andrew's case I think,
> since he said it was fine with v9.7.
>
> Andrew are you using homebrew or doing your own build
> with --disable-nls?
>
> thanks,
> Padraig

Hi, I am primarily building via Nixpkgs (whose derivation I also adapted to be able to build from the src tree in my attempts to bisect). The Nixpkgs derivation does have `--disable-nls` [1]. However, I can also reproduce the same issue (bad in v9.8, good in v9.7) using Homebrew’s coreutils (via the prebuilt bottles).

[1]: https://github.com/NixOS/nixpkgs/blob/9947f42e8867f8c6a8573334256fb4eb1fe6f9e0/pkgs/tools/misc/coreutils/default.nix#L171
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.