Skip to content

Commit 4eb45a7

Browse files
committed
twenty build and ten do not, and nine of the ten are one cause
macOS is measurable now that a target with no runner compiles the member's own tests, so it was measured: 20 of 30 members build for aarch64-macos over openkal and 10 do not. Nine of the ten are reached under `#ifdef __APPLE__` — TargetConditionals.h five times, then sys/cdefs.h, sys/event.h, xlocale.h and pthread_threadid_np — and on this target `__APPLE__` is correct. It is an Apple platform. What it does not say is which C library is underneath, and upstream uses it to mean both because on a real macOS the two coincide. This is the Windows problem again with one difference: there the engine has a lever, because presenting POSIX is realised as a cygwin triple and `_WIN32` goes away. On macOS the realisation adds `-D__unix__` and leaves `__APPLE__` standing, because it is true. The whole identity a source file sees there is `__APPLE__ __MACH__ __MCPP_TARGET_MACOS__ __OPENKAL__ __unix__`, measured, and none of it answers the question. So the target is not pinned: it would add ten red cells whose repair is one design question. The number is recorded so the question is asked with one.
1 parent 48a7ab5 commit 4eb45a7

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎docs/openkal-compat.md‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,48 @@ lower. The comparison becomes a required check for pull requests once the
167167
repository variable `OPENKAL_RATCHET` is `on`; it is enabled after the weekly
168168
measurement has been stable for two consecutive weeks.
169169

170+
### Why `aarch64-macos` is not a pinned target yet
171+
172+
`pins.toml` names linux and windows. macOS is measurable — `mcpp test --no-run`
173+
compiles and links each member's own tests for a target this host cannot run —
174+
and it was measured once, on 2026-09-21, against mcpp 2026.9.21.3 and
175+
openkal-llvm-runtime 0.15.0: **20 members build and 10 do not.**
176+
177+
Nine of the ten are one cause, and it is not ten packaging defects:
178+
179+
| diagnostic | members |
180+
| --- | --- |
181+
| `TargetConditionals.h` not found | catch2, curl, mimalloc, re2, sqlite3 |
182+
| `sys/cdefs.h`, through Apple's `dnsinfo.h` | c-ares |
183+
| `sys/event.h`, the kqueue reactor | cmp-module |
184+
| `xlocale.h` | fmtlib.fmt |
185+
| `pthread_threadid_np` undeclared | spdlog |
186+
| `library not found for -lm` | brotli |
187+
188+
Every one of those is reached under `#ifdef __APPLE__`, and on this target
189+
`__APPLE__` is **correct**: it is an Apple platform — Mach-O, arm64, macOS.
190+
What it does not say is which C library is underneath, and upstream code uses
191+
it to mean both because on a real macOS the two coincide.
192+
193+
**This is the macOS mirror of the Windows problem this document's `c-ares`
194+
entry describes, with one difference: there the engine has a lever.** A C
195+
library presenting POSIX on Windows is realised as `--target=…-pc-cygwin`,
196+
which suppresses `_WIN32`, so `#ifdef _WIN32` stops selecting the Win32
197+
branch. On macOS the realisation adds `-D__unix__` and leaves `__APPLE__` and
198+
`__MACH__` standing, because they are true. Measured, the whole identity a
199+
source file sees there is
200+
201+
```
202+
__APPLE__ __MACH__ __MCPP_TARGET_MACOS__ __OPENKAL__ __unix__
203+
```
204+
205+
and nothing in it answers "which C library". musl defines no identifying macro
206+
by design, so there is no portable question to ask either.
207+
208+
Pinning the target today would add ten red cells whose repair is one design
209+
question, not ten. The measurement is recorded here so the question is asked
210+
with a number attached.
211+
170212
## 4. Adapting a package
171213

172214
A package that fails in an openkal graph has met one of the layers. The rules

0 commit comments

Comments
 (0)