@@ -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,24 @@ 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+ # macOS uses Apple Common Crypto instead of OpenSSL. The main Makefile
495+ # sets NO_OPENSSL and adds -DNO_OPENSSL to BASIC_CFLAGS, but contrib
496+ # Makefiles that only include config.mak* don't get this logic.
497+ BASIC_CFLAGS += -DNO_OPENSSL
498+
499+ # CRITICAL FIX: Disable USE_HOMEBREW_LIBICONV
500+ # On Darwin 24+ (macOS 15), config.mak.uname sets USE_HOMEBREW_LIBICONV
501+ # which causes ICONVDIR to point to Homebrew's libiconv. But Homebrew's
502+ # libiconv exports _libiconv/_libiconv_open symbols (with prefix), while
503+ # Homebrew's gettext/libintl was built against system iconv which uses
504+ # _iconv/_iconv_open symbols (no prefix). We must use the system's
505+ # /usr/lib/libiconv.dylib which is universal and has the correct symbols.
506+ USE_HOMEBREW_LIBICONV =
507+ ICONVDIR =
490508 EOF
491509
492- # Configure the Git build to pick up gettext
510+ # Configure the Git build to find our universal libintl.a
493511 homebrew_prefix="$(brew --prefix)"
494512 cat >>git/config.mak <<EOF
495513 CFLAGS = -I$homebrew_prefix/include -I/usr/local/opt/gettext/include
0 commit comments