Skip to content

Commit 7fa24ee

Browse files
committed
fixup! release: add Mac OSX installer build
The v2.53.0-rc0.vfs.0.0 build began failing with: Undefined symbols for architecture arm64: "_iconv", referenced from: __libintl_find_msg in libintl.a[arm64][13](dcigettext.o) "_iconv_open", referenced from: __libintl_find_msg in libintl.a[arm64][13](dcigettext.o) ld: symbol(s) not found for architecture arm64 See https://github.com/microsoft/git/actions/runs/21450597958 for the failing run. The previous release v2.52.0.vfs.0.5 built successfully on January 24, 2026 (https://github.com/microsoft/git/actions/runs/21313971421). The root cause is upstream commit cee341e ("macOS: use iconv from Homebrew if needed and present", 2025-12-24), which was included in Git v2.53.0-rc0 to work around an iconv bug in macOS 15.7.2. That commit introduced USE_HOMEBREW_LIBICONV, which config.mak.uname now sets on Darwin 24+, causing the Makefile to add Homebrew's libiconv to the linker search path. The problem is a symbol name mismatch: Homebrew's libiconv exports symbols with a prefix (_libiconv, _libiconv_open) to avoid conflicting with the system library, but Homebrew's gettext/libintl was built against the system iconv which uses unprefixed symbols (_iconv, _iconv_open). When building universal binaries, the linker finds Homebrew's libiconv first and cannot resolve the symbols libintl needs. The fix is to explicitly unset USE_HOMEBREW_LIBICONV and ICONVDIR in config.mak, forcing the linker to use the system's /usr/lib/libiconv.dylib which is already universal and exports the correct unprefixed symbols. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
1 parent 4dbb468 commit 7fa24ee

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ jobs:
408408
brew link --force gettext
409409
410410
# Make universal gettext library
411+
# Note: libintl depends on iconv, but we use the system's libiconv
412+
# which is already universal, rather than Homebrew's libiconv which
413+
# has different symbol names (_libiconv vs _iconv)
411414
lipo -create -output libintl.a /usr/local/opt/gettext/lib/libintl.a /opt/homebrew/opt/gettext/lib/libintl.a
412415
413416
- name: Log in to Azure
@@ -487,9 +490,19 @@ jobs:
487490
# used in 'git version --build-options'. We'll fix that in code.
488491
HOST_CPU = universal
489492
BASIC_CFLAGS += -arch arm64 -arch x86_64
493+
494+
# CRITICAL FIX: Disable USE_HOMEBREW_LIBICONV
495+
# On Darwin 24+ (macOS 15), config.mak.uname sets USE_HOMEBREW_LIBICONV
496+
# which causes ICONVDIR to point to Homebrew's libiconv. But Homebrew's
497+
# libiconv exports _libiconv/_libiconv_open symbols (with prefix), while
498+
# Homebrew's gettext/libintl was built against system iconv which uses
499+
# _iconv/_iconv_open symbols (no prefix). We must use the system's
500+
# /usr/lib/libiconv.dylib which is universal and has the correct symbols.
501+
USE_HOMEBREW_LIBICONV =
502+
ICONVDIR =
490503
EOF
491504
492-
# Configure the Git build to pick up gettext
505+
# Configure the Git build to find our universal libintl.a
493506
homebrew_prefix="$(brew --prefix)"
494507
cat >>git/config.mak <<EOF
495508
CFLAGS = -I$homebrew_prefix/include -I/usr/local/opt/gettext/include

0 commit comments

Comments
 (0)