Skip to content

Commit 558f9a7

Browse files
committed
Fix legacy llama standard headers on macOS without replacing archives
1 parent b0e9be4 commit 558f9a7

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

‎.agents/docs/2026-10-25-unified-mwrap-execution.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,3 +367,18 @@ configs, 19 updater regressions, four tag regressions and skill validation pass.
367367
The ad0f019-based audit preserves all existing versions, with zero remaining
368368
manual commit snapshots. Final remote index CI, ecosystem review/squash, actual
369369
index publication and artifact/Git installed consumers remain required.
370+
371+
372+
Final b0e9be4 index CI found a legacy macOS regression in workspace default
373+
shard 1/2 (job 121081914195): ggml-org.llamacpp b10069.2 implementation
374+
llama-mmap.cpp lacks explicit cstdlib declarations for posix_memalign/free.
375+
The new mwrap llama consumer passed. Existing Linux installation adaptation
376+
already supplies cstdlib/cerrno; extended that same source-scoped manifest
377+
adaptation to native macOS. Raw historical archive URLs/hash/version remain
378+
unchanged; macOS packaging revision/floor 1 refreshes installed old manifests.
379+
The actual Lua install hook was executed against the public legacy manifest,
380+
and both native tables parse with the expected ordinary-source-only flags.
381+
This is not a skipped legacy test: complete final-head CI must run again.
382+
The previous strict auto-merge observer was stopped before preparing this fix.
383+
At b0e9be4, site, updater and OpenKAL workflows passed; validate did not.
384+
Failure log: /tmp/mwrap-final-index-macos-default-1-failed.log.

‎pkgs/g/ggml-org.llamacpp.lua‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ package = {
8888
},
8989
macosx = {
9090
["b10069.2"] = {
91+
-- Refresh older installs after the explicit standard-header fix.
92+
revision = 1,
93+
floor = 1,
9194
url = {
9295
GLOBAL = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.2.tar.gz",
9396
CN = "https://gitcode.com/mcpp-res/llamacpp/releases/download/b10069.2/llamacpp-b10069.2.tar.gz",
@@ -135,16 +138,19 @@ import("xim.libxpkg.pkginfo")
135138

136139
function install()
137140
local wrap = "llama.cpp-m-" .. pkginfo.version()
138-
-- libc++ 23 exposes missing standard headers in this Linux checkpoint.
139-
-- Scope the explicit includes to ordinary Linux implementation sources;
141+
-- Current libc++ exposes missing standard headers in this checkpoint.
142+
-- Scope explicit includes to ordinary Linux/macOS implementation sources;
140143
-- the exported module and the downloaded source files remain untouched.
141144
if pkginfo.version() == "b10069.2" then
142145
local manifest = path.join(wrap, "mcpp.toml")
143146
local content = assert(io.readfile(manifest)):gsub("\r\n", "\n")
144147
local patched, count = content:gsub("\n%[target%.linux%.build%]\n",
145148
'\n[target.linux.build]\nflags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n', 1)
146149
assert(count == 1, "llamacpp: expected the native Linux build table")
147-
io.writefile(manifest, patched)
150+
local macos, macos_count = patched:gsub("\n%[target%.macos%.build%]\n",
151+
'\n[target.macos.build]\nflags = [{ glob = "third_party/llama.cpp/**/*.cpp", cxxflags = ["-include", "cstdlib", "-include", "cerrno"] }]\n', 1)
152+
assert(macos_count == 1, "llamacpp: expected the native macOS build table")
153+
io.writefile(manifest, macos)
148154
end
149155
local prefix = pkginfo.install_dir()
150156
os.tryrm(prefix)

0 commit comments

Comments
 (0)