From 9a8c5eefe4b7c863ebc55a5fc7376bc4e6a28c02 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Tue, 10 Nov 2026 09:46:43 +0900 Subject: [PATCH] compat.glfw: the Win32 backend states the system interface it calls (mcpp:kernel-abi=windows) As the Linux row states glibc. The MSVC row, the MinGW-w64 payload and the mingw-w64-sysroot base answer it under every mcpp the index admits, since the payload's kernel-abi is the target's system. A Windows identity whose system interface is openkal (openkal-musl over openkal-windows) has no window system and is refused at resolution, naming the requirement, instead of failing in . A requirement on c-abi=ucrt would refuse this package on MSVC under mcpp 2026.11.3.1 to 2026.11.10.1, which answer msvc there. --- CHANGELOG.md | 5 +++++ pkgs/c/compat.glfw.lua | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c140488d..b586f0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ ### Fixed +- **compat.glfw:Win32 后端以 `requires = { "mcpp:kernel-abi=windows" }` 陈述它直接调用的系统接口。** MSVC 行、MinGW-w64 载荷与 + mingw-w64-sysroot 基座都回答 `windows`,且本索引接受的每个 mcpp 版本都如此回答(载荷的 kernel-abi 即目标的系统);openkal-musl + 经 openkal-windows 的 Windows 身份回答 `openkal`,没有窗口系统,在解析期以该要求被拒绝,不再在 `` 处编译失败。 + 要求写在 `c-abi=ucrt` 上则会使 2026.11.3.1–2026.11.10.1 在 MSVC 上拒绝本包(这些版本对 MSVC 回答 `msvc`)。 + - **compat.mimalloc:ok 映像不再链接 `-lpthread`、`-lrt`,Linux 不再链接 `-latomic`。** ok 映像(`-openkal`)原先读 `linux` 块,链接时找不到这两个归档;新增 `openkal` 块,不列链接参数。`-latomic` 上游只在找到时才链接,mimalloc 的原子操作在本索引 构建的各架构上都是无锁的,LLVM 工具链在图中 C 库之上没有这个归档。 diff --git a/pkgs/c/compat.glfw.lua b/pkgs/c/compat.glfw.lua index a4462886..b0d00727 100644 --- a/pkgs/c/compat.glfw.lua +++ b/pkgs/c/compat.glfw.lua @@ -155,6 +155,17 @@ package = { }, }, windows = { + -- THE WIN32 BACKEND CALLS THE WINDOWS SYSTEM INTERFACE DIRECTLY + -- (, user32, gdi32): a requirement on the kernel-abi + -- layer of the target side (mcpp SPEC-002 §2.2), as the Linux row + -- states glibc. Every route that has the Win32 API answers it -- + -- the MSVC row, the MinGW-w64 payload and the mingw-w64-sysroot + -- base -- under every mcpp the index admits, since the answer is + -- the target's system. A Windows identity whose system interface + -- is another (openkal-musl over openkal-windows answers `openkal`) + -- has no window system, and is refused at resolution, naming this + -- requirement. + requires = { "mcpp:kernel-abi=windows" }, cflags = { "-D_GLFW_WIN32", "-DUNICODE", "-D_UNICODE" }, sources = { "src/win32_time.c",