From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED
Date: Fri, 20 Mar 2026 09:33:25 -0700 [thread overview]
Message-ID: <xmqqldfmfokq.fsf@gitster.g> (raw)
In-Reply-To: <5b8e24c2-452c-486e-a143-386e06a75e03@web.de> ("René Scharfe"'s message of "Fri, 20 Mar 2026 12:12:00 +0100")
René Scharfe <l.s.r@web.de> writes:
>> The net effect is that `CC=clang` in CI now silently resolves to
>> Homebrew's LLVM 15.0.7 clang instead of Apple's system clang (Apple
>> clang 15.0.0, bundled with Xcode 15.4). The runner image README
>> confirms this: the reported "Clang/LLVM" version flipped from 15.0.0 to
>> 15.0.7 between image releases, matching the Homebrew LLVM version
>> exactly.
>
> Good find!
Indeed. So clang got updated pretty recently (CI runs triggered by
my pushing out happens at least once a day and yesterday was the
first time I saw this failure), and that is because Homebrew got
updated?
>> Homebrew's LLVM clang uses different include paths from Apple's clang.
>> In particular, the `regex.h` it sees does not define `REG_ENHANCED`,
>> which is an Apple-specific extension present in the macOS SDK headers
>> since at least macOS 10.12. The Makefile unconditionally sets
>> `USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS` for all Darwin builds via
>> `config.mak.uname`, which pulls in `compat/regcomp_enhanced.c`, which
>> references `REG_ENHANCED`, hence the build failure.
>
> I suspect it uses the same regex.h. The definition of REG_ENHANCED is
> gated by a __MAC_OS_X_VERSION_MIN_REQUIRED check, though, and that fails
> because __MAC_OS_X_VERSION_MIN_REQUIRED is defined as
> __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ and that one in turn is not
> defined by the Homebrew version of clang in the runner.
> Or how about using /usr/bin/clang explicitly on macOS instead of any old
> clang from $PATH? That would avoid user-visible changes.
If it gives us more stability of CI environment (one fewer thing
that can suddenly change the toolset), and makes the environment
closer to a typical end-user set-up (hopefully most of them would
use what is available in /usr/bin from there, instead of downloading
newer versions but possibly built with different/castrated set of
features), that does look like an attractive alternative to me.
next prev parent reply other threads:[~2026-03-20 16:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 22:37 [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED Junio C Hamano
2026-03-19 23:11 ` René Scharfe
2026-03-20 1:30 ` Junio C Hamano
2026-03-20 7:34 ` Johannes Schindelin
2026-03-20 7:48 ` Johannes Schindelin
2026-03-20 7:55 ` Johannes Schindelin
2026-03-20 8:06 ` Johannes Schindelin
2026-03-20 8:55 ` Johannes Schindelin
2026-03-20 11:12 ` René Scharfe
2026-03-20 15:12 ` Johannes Schindelin
2026-03-20 15:59 ` René Scharfe
2026-03-20 16:33 ` Junio C Hamano [this message]
2026-03-20 16:57 ` Junio C Hamano
2026-03-20 16:50 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqldfmfokq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox