Subject: Re: What's cooking in git.git (Mar 2026, #08)

From: Johannes Schindelin <[email-masked]>
Date: Mon, 23 Mar 2026 17:32:41 +0100 (CET)

Hi Junio & René,

On Mon, 23 Mar 2026, Junio C Hamano wrote:

> René Scharfe <[email-masked]> writes:
> 
> > On 3/22/26 7:46 AM, Junio C Hamano wrote:
> >> * js/macos-homebrew-forgets-reg-enhanced (2026-03-20) 1 commit
> >>  - osx-clang: work around Homebrew's clang lacking REG_ENHANCED
> >> 
> >>  The build on macOS with Clang is fixed to work around a Homebrew change
> >>  that exposed an issue with missing REG_ENHANCED.
> >> 
> >>  Will merge to 'next'?
> >>  source: <[email-masked]>

Sorry, I missed this side conversation as it happened out-of-thread.

> > This seems to no longer be necessary -- the latest workflow run on
> > master succeeded (https://github.com/git/git/actions/runs/23392330338).
> 
> Yeah, I saw that too and was wondering if the glitch was reverted or
> something at the platform side.

It was reverted at the platform side. The runner-images team rolled back
the broken image. Georgy Puzakov (runner-images team member) wrote on
2026-03-20 in
https://github.com/actions/runner-images/issues/13827#issuecomment-4096949778:

  "We have some issues with new image version(macOS 15). We made a
   rollback version yesterday, can you check if the issue still
   exists?"

And indeed, the broken `macos-14-arm64/20260317.0174` release has been
deleted from https://github.com/actions/runner-images/releases -- the
latest published `macos-14-arm64` release as of time of writing is once
again (the last known good one):
https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20260302.0147

> > Did some kind soul fix the runners?
> 
> If so, thanks.  It certainly was not me ;-)

Not me either, but I guess nobody earnestly thought that either of us to
fix GitHub's Action runners 😁 But I did dig into the root cause, so here
is a summary for the record.

The culprit is Homebrew 5.1.0 (released 2026-03-10, announced at
https://brew.sh/2026/03/10/homebrew-5.1.0/), which introduced automatic
linking for versioned keg-only formulae when the unversioned sibling is
absent (https://github.com/Homebrew/brew/pull/21676). The runner image
installs `llvm@15` (keg-only) but not unversioned `llvm`. Under Homebrew
5.1.0, `llvm@15` got auto-linked into `/opt/homebrew/bin/`, and `CC=clang`
silently resolved to Homebrew's LLVM clang instead of Apple's
`/usr/bin/clang`. That LLVM clang does not see the macOS SDK headers, so
`REG_ENHANCED` is undefined and the build fails.

Interestingly, this auto-linking feature was actually reverted within
Homebrew itself (https://github.com/Homebrew/brew/pull/21682) and then
re-landed with fixes (https://github.com/Homebrew/brew/pull/21684), all
before the runner image was even built. So the re-landed version is what
shipped in the image.

Which means that the image rollback fixes things for now, but the
underlying Homebrew behavior _still_ exists. The next runner image rebuild
that picks up Homebrew 5.1.0+ could reintroduce the problem unless the
runner-images team pins `llvm@15` as keg-only or explicitly unlinks it.

In light of that, the workaround in
`js/macos-homebrew-forgets-reg-enhanced` may still be worth keeping as
insurance, even though the immediate breakage has been mitigated by the
image rollback. We would be one image refresh away from the same failure
otherwise.

Ciao,
Johannes