Hi,

On macOS 12, 13, 14, the build of the newest diffutils from git with the newest
gnulib fails. For macOS 12, I reproduce it on cfarm104.cfarm.net; for macOS
13 and 14, I see it in the CI runs.

How to reproduce:
1. Build a tarball of current diffutils.
2. On cfarm104.cfarm.net, configure it with
   $ ./configure --disable-nls
3. $ make V=1

Result:

cc   -g -O2   -o diff analyze.o context.o diff.o dir.o ed.o ifdef.o io.o 
normal.o side.o syncsig.o system.o util.o libver.a ../lib/libdiffutils.a        
   
Undefined symbols for architecture arm64:
  "_locale_charset", referenced from:
      _rpl_wcwidth in libdiffutils.a(libdiffutils_a-wcwidth.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [diff] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

wcwidth gets overridden because of the configure finding
checking whether wcwidth works reasonably in UTF-8 locales... no
(The test program exited with status 6, indicating problems with
wcwidth (0x05B0) and wcwidth (0x200B).)

The module 'wcwidth' depends on 'localcharset'.

The module 'localcharset' is being excluded since commit
e124541148d38cd8b7f962aceb72fb44e7cc0aab (2025-09-05).
The rationale was
   "Recentish changes to Gnulib have pulled in more dependencies
    on multithreading, locking, and whatnot.  Revamp to remove
    these unwanted dependencies."
But the module 'localcharset' has no link dependencies (see
gnulib/modules/localcharset). It is in fact a thin wrapper around
nl_langinfo(CODESET).

I would suggest to add module 'localcharset' back to the non-excluded
modules.

Bruno






Reply via email to