Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/openkal-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
# run if this drifts from pins.toml. See the comment beside `mcpp` in
# pins.toml for why this pin, not just validate.yml's, is gated by the
# index floor.
MCPP_VERSION: "2026.9.21.3"
MCPP_VERSION: "2026.9.26.1"
# CROSS-VALIDATION BEFORE A RELEASE, NOT AFTER IT.
#
# Empty in an ordinary run, so this measurement keeps using the RELEASED
Expand Down Expand Up @@ -140,16 +140,18 @@ jobs:
# The Windows cross headers of the host are installed deliberately. A
# graph that reached them would build differently with them present, so a
# result that is the same here and on a runner without them is evidence
# that the graph is closed. Wine runs the Windows members' tests.
- name: Host headers the graph must not reach, and a runner for Windows
# that the graph is closed. Wine runs the Windows members' tests, and
# qemu-aarch64 the aarch64-linux-musl members' (tests/openkal/pins.toml).
- name: Host headers the graph must not reach, and runners for Windows and aarch64
if: steps.select.outputs.members != ''
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq mingw-w64 wine64 > /dev/null
sudo apt-get install -y -qq mingw-w64 wine64 qemu-user > /dev/null
ls /usr/x86_64-w64-mingw32/include/windows.h
command -v wine || sudo ln -s "$(command -v wine64)" /usr/local/bin/wine
wine --version
qemu-aarch64 --version | head -1

- name: The pins agree with this workflow
if: steps.select.outputs.members != ''
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,20 @@ env:
# cache epoch moves from 3 to 4 in the same release, so the first run is cold.
#
# `index.toml` min_mcpp does not move: no descriptor grammar changed.
MCPP_VERSION: "2026.9.25.1"
# ── 2026-09-26: raised 2026.9.25.1 -> 2026.9.26.1 ─────────────────────────
#
# 2026.9.26.1 changes three things a member's build can see
# (mcpp-community/mcpp#693-#696): a package's `c_standard` reaches that
# package's own C units and no one else's; a link over a graph-supplied C
# library searches no host library directory; and paths are held as UTF-8,
# so a project in a directory whose name is not ASCII builds on Windows. The
# three descriptors that spell `-D_GNU_SOURCE` because a dependency's
# `gnu11` used to be dropped keep the define, which works under every engine
# this index admits. The raise is the measurement of that on every member
# and platform.
#
# `index.toml` min_mcpp does not move: no descriptor grammar changed.
MCPP_VERSION: "2026.9.26.1"

jobs:
lint:
Expand Down
13 changes: 9 additions & 4 deletions docs/openkal-compat.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,15 @@ change can affect:
Adding a member therefore measures that member, not the whole list. The
workflow does not block a merge unless the comparison below is enabled.

The targets are `x86_64-linux-gnu` and `x86_64-windows-musl`. The Windows
target is named for the C environment the graph presents there, which is
musl's, not MinGW's. Results measured before 2026-09-23 are recorded as
`x86_64-windows-gnu`, the name that target had then.
The targets are `x86_64-linux-gnu`, `x86_64-windows-musl`, `x86_64-linux-musl`
and `aarch64-linux-musl`. The Windows target is named for the C environment the
graph presents there, which is musl's, not MinGW's. Results measured before
2026-09-23 are recorded as `x86_64-windows-gnu`, the name that target had then.
The two `linux-musl` targets joined on 2026-09-26, with mcpp 2026.9.26.1: a link
over the graph's C library searches no host library directory from that release
(mcpp-community/mcpp#696), and these are the targets where that link is the
graph's own. `x86_64-linux-musl` runs on the host as it is, and
`aarch64-linux-musl` runs under qemu-aarch64.

It installs the Windows cross toolchain's host headers on purpose. A build that
reached the host's headers would change its result when they are present, so a
Expand Down
7 changes: 6 additions & 1 deletion index.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@
# The pull request that moves validate.yml's pin to 2026.9.25.1 runs every
# member on every platform with that release, which is what "known good"
# means for this hint. The release changes no descriptor grammar.
# ── 2026-09-26: latest_mcpp -> 2026.9.26.1, min_mcpp unchanged ─────────────
#
# Moved in the pull request that moves validate.yml's pin and the openkal
# measurement's pin to 2026.9.26.1, which run every member on every platform
# with it. The release changes no descriptor grammar.
[index]
spec = "1"
min_mcpp = "2026.9.18.3"
latest_mcpp = "2026.9.25.1"
latest_mcpp = "2026.9.26.1"
12 changes: 7 additions & 5 deletions pkgs/c/compat.libaio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
-- `_body_io_syscall` macro), and `sigset_t` never arrives, so even the PUBLIC
-- header fails to parse at `io_pgetevents(…, sigset_t *sigmask)`. Upstream
-- never hits this because its Makefile compiles in the compiler's default gnu
-- mode. Declaring `c_standard = "gnu11"` looks like the tidier fix and is a
-- trap: mcpp 2026.8.27.2 accepts the string and still emits `-std=c11`
-- (verified in the emitted compile_commands.json), so the build fails exactly
-- as if nothing had been declared. The define is the spelling that actually
-- takes effect.
-- mode. `c_standard = "gnu11"` is the declaration upstream's build implies,
-- and mcpp up to 2026.9.25.1 did not apply it to a package in the dependency
-- position: the root's value reached every C unit of the graph and a
-- dependency's own was dropped, so the build failed exactly as if nothing had
-- been declared (verified in the emitted compile_commands.json under
-- 2026.8.27.2). mcpp 2026.9.26.1 applies it (mcpp-community/mcpp#695); the
-- define stays because it works under every engine this index admits.
--
-- Two further GNU-isms ride along and are fine under plain `-std=c11` because
-- gcc/clang only diagnose them under -pedantic: `syscall.h`'s named-variadic
Expand Down
8 changes: 5 additions & 3 deletions pkgs/c/compat.libdrm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,11 @@ package = {
import_std = false,
c_standard = "c11",

-- `c_standard = "gnu11"` is accepted and silently emits -std=c11, so
-- _GNU_SOURCE has to be spelled out. Without it O_CLOEXEC, `asprintf`
-- and `major`/`minor` are hidden and xf86drm.c does not compile.
-- _GNU_SOURCE is spelled out because mcpp up to 2026.9.25.1 dropped a
-- dependency's own `c_standard = "gnu11"` (mcpp-community/mcpp#695;
-- applied from 2026.9.26.1), and the define works under every engine
-- this index admits. Without it O_CLOEXEC, `asprintf` and
-- `major`/`minor` are hidden and xf86drm.c does not compile.
-- -fPIC because this becomes a .so; -fvisibility=hidden to match
-- upstream's `gnu_symbol_visibility : 'hidden'`, so only the symbols
-- libdrm_macros.h marks drm_public are exported.
Expand Down
17 changes: 10 additions & 7 deletions pkgs/c/compat.libinput.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ package = {
language = "c++23",
import_std = false,
-- Upstream asks for `c_std=gnu99` and means it — see the `typeof`
-- note in cflags. `c_standard = "gnu11"` was tried here first and is
-- NOT the fix: mcpp accepts the string and still emits `-std=c11`, so
-- the descriptor would claim a dialect the compiler never sees.
-- note in cflags. `c_standard = "gnu11"` was tried here first, when
-- mcpp (up to 2026.9.25.1) applied only the root package's value and
-- dropped a dependency's own (mcpp-community/mcpp#695, fixed in
-- 2026.9.26.1); the defines below work under every engine this index
-- admits, so they stay.
c_standard = "c11",

-- `"*"` is the package ROOT, and it is here for exactly one file:
Expand Down Expand Up @@ -240,10 +242,11 @@ package = {
-- damage lands as `-Wint-conversion` errors in a dozen unrelated
-- files that never mention typeof.
--
-- This is a `-D` rather than `c_standard = "gnu11"` because the
-- gnu dialects do not reach the compiler: mcpp accepts the string
-- and still emits `-std=c11`. Measured, not assumed — gnu11 was
-- set here and these exact errors survived it.
-- This is a `-D` rather than `c_standard = "gnu11"` because a
-- dependency's own C standard did not reach the compiler before
-- mcpp 2026.9.26.1 (mcpp-community/mcpp#695): gnu11 was set here
-- and these exact errors survived it. The `-D` works under every
-- engine this index admits.
--
-- Safe because `__typeof__` IS `typeof`, always available in any
-- dialect, and nothing can be named `typeof` in code that expects
Expand Down
25 changes: 24 additions & 1 deletion tests/openkal/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,20 @@ def host_triple() -> str:
return f"{arch}-{system}"


def host_executes(target: str, host: str | None = None) -> bool:
"""Whether this host runs the target's programs itself, with no runner.

A Linux host executes a Linux image of its own architecture whatever C
library the image carries: an `x86_64-linux-musl` program is a static
image, and mcpp runs it on an `x86_64-linux-gnu` machine as it is (`mcpp
test --target x86_64-linux-musl` needs no runner). Measured with `--no-run`
instead, such a cell would record `builds` for a member that runs."""
h = (host or host_triple()).split("-")
t = target.split("-")
return len(h) >= 2 and len(t) >= 2 and h[1] == "linux" and t[1] == "linux" \
and h[0] == t[0]


def packages_of(manifest: dict) -> list[str]:
"""The index packages a member depends upon, as `namespace.name`."""
found: list[str] = []
Expand Down Expand Up @@ -241,7 +255,8 @@ def measure(member: str, target: str, pins: dict) -> dict:
toolchain = pins["toolchain"]
native = target == host_triple()
runner = (pins.get("runners") or {}).get(target)
can_run = bool(native or (runner and shutil.which(runner[0])))
can_run = bool(native or host_executes(target)
or (runner and shutil.which(runner[0])))
cmd = command_for(target, toolchain, native, can_run)
proc = subprocess.run(cmd, cwd=work, capture_output=True, text=True,
timeout=pins.get("timeout", 3600))
Expand Down Expand Up @@ -533,6 +548,14 @@ def cmd_selftest(_args: argparse.Namespace) -> int:
("the host names no target and runs them",
command_for("x86_64-linux-gnu", "llvm@22.1.8", True, True),
["mcpp", "test", "--toolchain", "llvm@22.1.8"]),
# A static musl image of the host's own architecture is run as it
# is; a runner is for what the host cannot execute.
("a Linux image of the host's architecture runs without a runner",
host_executes("x86_64-linux-musl", "x86_64-linux-gnu"), True),
("another architecture needs a runner",
host_executes("aarch64-linux-musl", "x86_64-linux-gnu"), False),
("and so does another system",
host_executes("x86_64-windows-musl", "x86_64-linux-gnu"), False),
]

# `select` decides how much of a pull request's four-hour matrix runs. It
Expand Down
31 changes: 28 additions & 3 deletions tests/openkal/pins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# `runtime` is the C++ runtime for openkal; it pins openkal-musl exactly, and
# openkal-musl selects the openkal implementation for each target, so this one
# version names the whole graph.
runtime = "0.15.1"
runtime = "0.15.2"
toolchain = "llvm@22.1.8"
# `mcpp` here moves together with index.toml's `min_mcpp` and
# .github/workflows/openkal-compat.yml's own MCPP_VERSION (that workflow
Expand All @@ -18,6 +18,28 @@ toolchain = "llvm@22.1.8"
# index requires mcpp >= 2026.9.18.1 but this is mcpp 2026.9.17.3 [E0006]"
# before a single line of the member's own source is read.
#
# 2026-09-26 (fourth move): `runtime` -> 0.15.2 and `mcpp` -> 2026.9.26.1,
# AND THE GRAPH'S OWN LINUX TARGETS JOIN THE MEASUREMENT.
#
# mcpp 2026.9.26.1 links a program over a graph-supplied C library with no
# host library directory in its search (mcpp-community/mcpp#696). Before it,
# clang derived `/usr/lib/x86_64-linux-gnu` and its siblings for such a link,
# so a member's `-lm` on x86_64-linux-musl linked the HOST's glibc objects into
# a musl image without a diagnostic, and on aarch64-linux-musl failed on the
# host's x86_64 linker script. Neither target was measured here, which is why
# neither showed: the two rows measure exactly that link.
#
# 0.15.2 pins openkal-musl 0.19.2, which ships musl's eight empty archives
# (`libm.a`, `libpthread.a`, ...), so those names are answered by the graph.
# The runtime pins openkal-musl exactly, so `runtime` alone names the whole
# graph, as the header above says. mcpp moves in the same change because the
# rows mean nothing under an engine that still searches the host.
#
# x86_64-linux-musl runs natively; aarch64-linux-musl runs under
# qemu-aarch64, which openkal-compat.yml installs. Every link was registered,
# published and verified resolvable from the PUBLISHED index before this pin
# moved (#467, #468).

# 2026-09-21 (third move): `runtime` -> 0.15.1, AND THIS ONE IS A WINDOWS FIX
# REACHING THE MEASUREMENT THROUGH FOUR PACKAGES.
#
Expand Down Expand Up @@ -114,16 +136,19 @@ toolchain = "llvm@22.1.8"
# openkal-musl 0.16.0 and openkal-llvm-runtime 0.12.0), because a pin that
# moves onto an unreachable or divergent asset fails every member at once and
# reports it as a compatibility result.
mcpp = "2026.9.21.3"
mcpp = "2026.9.26.1"

# The Windows target is named for the C environment the graph presents there,
# which is musl's (openkal-musl declares `[c-abi] presents = "posix"`), not
# MinGW's: `x86_64-windows-gnu` read as a mingw-w64 build, which this graph
# has never been. Results measured before 2026-09-23 are recorded under that
# older name.
targets = ["x86_64-linux-gnu", "x86_64-windows-musl"]
targets = ["x86_64-linux-gnu", "x86_64-windows-musl", "x86_64-linux-musl", "aarch64-linux-musl"]

# A target that is not the host is tested through its runner when the runner is
# on PATH, and built otherwise.
[runners]
x86_64-windows-musl = ["wine"]
# x86_64-linux-musl needs none: a Linux host runs a Linux image of its own
# architecture as it is (compat.py `host_executes`).
aarch64-linux-musl = ["qemu-aarch64"]
Loading