From 741a9ada692179a92eed661102bac7d8afe627b2 Mon Sep 17 00:00:00 2001 From: speak-agent Date: Thu, 27 Aug 2026 10:14:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?ci:=20=E6=8A=8A=E5=BC=95=E5=AF=BC=E9=98=B6?= =?UTF-8?q?=E6=AE=B5=E7=BB=91=E5=AE=9A=E6=8C=87=E5=90=8D=E7=9A=84=20glibc?= =?UTF-8?q?=20=E8=BD=BD=E8=8D=B7=E8=A3=85=E7=BB=99=E5=AE=83(=E8=BF=87?= =?UTF-8?q?=E6=B8=A1=E6=AD=A5=E9=AA=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `xim:glibc` 的 `latest` 从 `2.44` 移到了 `2.44.2`。载荷目录按请求**解析成**的版本 命名,而 RuntimeBinding 带的是**声明的**版本 —— 而一个已发布的 mcpp vendor 进自己 沙箱的那份 xlings 仍然声明 `2.44`。于是干净机器装出 `2.44.2`,工具链 fixup 要 `2.44`,构建在编译任何东西之前就停住: error: selected RuntimeBinding glibc@2.44 requires payload '.../xpkgs/xim-x-glibc/2.44', but it is not installed ⚠️ 在每一台**新**机器上出现,在任何已存在的机器上都不出现 —— 所以开发机看不见。 索引的 `pkgs/g/glibc.lua` 把这次失败逐字记着,并给出规则: 「The index is DATA and the client is a PROGRAM: the consumer ships first。」 ## ⚠️ 我先试过 bump xlings,撤回了 把 `XLINGS_VERSION` 提到 2026.8.27.1 会让**沙箱里那份** xlings 被换掉 (mcpp 的 `acquire_xlings_binary` 在 pin 前移时更新它),绑定于是**前移**到 `glibc@2.44.2`,而已经装好的是 `2.44` —— 请求比已装的**更新**。那是更糟的一侧: 接受一个更旧的载荷去回答更新的请求,等于静默用上索引明说 「IT IS NOT THE ONE TO INSTALL」的那份(带 mcpp#484 的 preload 缺陷)。 ⇒ 保持 xlings 不动,把缺的那个载荷直接装上。 ⭐ 待 mcpp 2026.8.27.1(mcpp-community/mcpp#515)发布后移除:它接受 「版本精化了请求」的已装载荷,从它引导就不需要这一步。 --- .github/workflows/ci.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c608ee..f32d9d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,34 @@ jobs: echo "the index has not caught up yet (attempt $attempt of 6); waiting 60s" sleep 60 done + # ⚠️⚠️ TRANSITION: GIVE THE BOOTSTRAP THE glibc ITS BINDING NAMES. + # + # `xim:glibc`'s `latest` moved from `2.44` to `2.44.2`. A payload + # directory is named after the version a request RESOLVED to, while a + # RuntimeBinding carries the version that was DECLARED — and the xlings + # a released mcpp vendors into its own sandbox still declares `2.44`. + # So a clean machine installs `2.44.2`, the toolchain fixup asks for + # `2.44`, and the build stops before anything is compiled: + # + # error: selected RuntimeBinding glibc@2.44 requires payload + # '…/xpkgs/xim-x-glibc/2.44', but it is not installed + # + # ⚠️ On every NEW machine and on none that already existed, which is why + # it is invisible from a developer's own. Measured on `main` as readily + # as on any branch — the index records the same failure verbatim in + # `pkgs/g/glibc.lua` and states the rule it broke: "The index is DATA + # and the client is a PROGRAM: the consumer ships first." + # + # ⭐ REMOVE THIS once a released mcpp resolves it. `mcpp 2026.8.27.1` + # accepts an installed payload whose version REFINES the requested one + # (`payload_dir_for_version`), so a bootstrap from it needs nothing + # here. Until then the missing payload is simply installed. + if [ -x "$HOME/.mcpp/registry/bin/xlings" ]; then + XLINGS_HOME="$HOME/.mcpp/registry" XLINGS_NON_INTERACTIVE=1 \ + "$HOME/.mcpp/registry/bin/xlings" install glibc@2.44 -y -g \ + >/dev/null 2>&1 || true + echo "glibc payloads present: $(ls "$HOME/.mcpp/registry/data/xpkgs/xim-x-glibc" 2>/dev/null | tr '\n' ' ')" + fi mcpp --version mcpp self config --mirror GLOBAL # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. @@ -307,6 +335,34 @@ jobs: echo "the index has not caught up yet (attempt $attempt of 6); waiting 60s" sleep 60 done + # ⚠️⚠️ TRANSITION: GIVE THE BOOTSTRAP THE glibc ITS BINDING NAMES. + # + # `xim:glibc`'s `latest` moved from `2.44` to `2.44.2`. A payload + # directory is named after the version a request RESOLVED to, while a + # RuntimeBinding carries the version that was DECLARED — and the xlings + # a released mcpp vendors into its own sandbox still declares `2.44`. + # So a clean machine installs `2.44.2`, the toolchain fixup asks for + # `2.44`, and the build stops before anything is compiled: + # + # error: selected RuntimeBinding glibc@2.44 requires payload + # '…/xpkgs/xim-x-glibc/2.44', but it is not installed + # + # ⚠️ On every NEW machine and on none that already existed, which is why + # it is invisible from a developer's own. Measured on `main` as readily + # as on any branch — the index records the same failure verbatim in + # `pkgs/g/glibc.lua` and states the rule it broke: "The index is DATA + # and the client is a PROGRAM: the consumer ships first." + # + # ⭐ REMOVE THIS once a released mcpp resolves it. `mcpp 2026.8.27.1` + # accepts an installed payload whose version REFINES the requested one + # (`payload_dir_for_version`), so a bootstrap from it needs nothing + # here. Until then the missing payload is simply installed. + if [ -x "$HOME/.mcpp/registry/bin/xlings" ]; then + XLINGS_HOME="$HOME/.mcpp/registry" XLINGS_NON_INTERACTIVE=1 \ + "$HOME/.mcpp/registry/bin/xlings" install glibc@2.44 -y -g \ + >/dev/null 2>&1 || true + echo "glibc payloads present: $(ls "$HOME/.mcpp/registry/data/xpkgs/xim-x-glibc" 2>/dev/null | tr '\n' ' ')" + fi mcpp --version mcpp self config --mirror GLOBAL # ⭐⭐ CROSS-VALIDATION: BUILD THE mcpp UNDER REVIEW AND USE THAT ONE. From b07c77b2188155d67197829e09d8da0f9e61a08f Mon Sep 17 00:00:00 2001 From: speak-agent Date: Thu, 27 Aug 2026 13:28:35 +0800 Subject: [PATCH 2/4] Follow openkal 0.8, and record why the five new interfaces are absent This machine provides none of them, and each absence has a reason rather than being an omission: no network for net and datagram, no memory management unit to copy an address space with for space, no second execution context to bound a wait against for timeout, and a console whose settings the firmware does not expose for terminal. Clause 6.1 makes an interface an implementation does not provide absent at the link, so a program requiring one is refused when it is built rather than when it runs. The README states this beside the reasons already recorded for fs, process and task, so that a reader asking why finds the answer where the other answers are. --- README.md | 13 +++++++++++++ mcpp.toml | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 080a296..2ac7d54 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,19 @@ scheduler, and clause 6.2 says the remedy for an operation that cannot be provided is that its absence be expressed by its absence rather than by a run-time refusal. +The five interfaces version 0.8 adds are absent for the same reason and by the +same rule. This machine has no network, so `net` and `datagram` are not provided. +It has no memory management unit to copy an address space with, so `space` is +not. It has no second execution context to bound a wait against, so `timeout` is +not: an operation here either completes or does not, and a bound upon it would +report an expiry that could never occur. `terminal` is absent because the console +is a serial line whose settings this firmware does not expose; a stream is +reported as interactive and nothing acts upon that fact. + +None of the five is a deviation. Clause 6.1 makes an interface an implementation +does not provide absent at the link, so a program requiring one is refused when +it is built rather than when it runs. + ⚠️ **`time` used to be on that list, with a reason, and the reason was wrong.** It read: SBI can arm a timer interrupt, which is a mechanism for a kernel rather diff --git a/mcpp.toml b/mcpp.toml index d7d4f56..811e1d7 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -14,7 +14,7 @@ [package] namespace = "mcpplibs" name = "openkal-opensbi" -version = "0.1.5" +version = "0.2.0" description = "An implementation of openkal on the RISC-V Supervisor Binary Interface, portable across every machine whose firmware provides one" license = "Apache-2.0" @@ -33,7 +33,7 @@ repo = "https://github.com/mcpplibs/openkal-opensbi" # The contract, not an implementation of it. Declaring it turns a version # mismatch into a resolution-time message rather than a link-time one. [dependencies] -openkal = "0.7.0" +openkal = { git = "https://github.com/mcpplibs/openkal", branch = "feat/openkal-0.8" } # ⭐ WHAT RECEIVES CONTROL, WHICH IS A STATEMENT ABOUT THE PROGRAM. # From 971af30f634ade9ade9513cc8fa4e09aa3d4777b Mon Sep 17 00:00:00 2001 From: speak-agent Date: Thu, 27 Aug 2026 14:02:31 +0800 Subject: [PATCH 3/4] examples: name openkal the way this repository does mcpp refuses a graph in which one package reaches a dependency by version and another by git: dependency 'mcpplibs.openkal' is requested as both a version dep (by 'hello') and a git dep (by 'mcpplibs.openkal-@path'). Pick one. That is the right refusal --- two forms can name two different trees --- and it means an example inside a repository must follow that repository's own declaration while a change spanning repositories is in flight. The example named a released version while the package beside it followed a branch. --- examples/hello/mcpp.toml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/hello/mcpp.toml b/examples/hello/mcpp.toml index a4f0822..00cd9cd 100644 --- a/examples/hello/mcpp.toml +++ b/examples/hello/mcpp.toml @@ -13,5 +13,15 @@ runner = ["qemu-system-riscv64", "-machine", "virt", "-nographic", "-no-reboot", "-bios", "default", "-kernel"] [dependencies] -openkal = "0.7.0" +# ⚠️ THE FORM MUST MATCH THE ONE THE IMPLEMENTATION USES, not merely the +# version. mcpp refuses a graph in which one package reaches a dependency by +# version and another by git: +# +# dependency 'mcpplibs.openkal' is requested as both a version dep +# (by 'hello') and a git dep (by 'mcpplibs.openkal-opensbi@path'). +# +# That is the right refusal --- two forms can name two different trees --- and +# it means an example inside a repository follows that repository's own +# declaration while a change is in flight. +openkal = { git = "https://github.com/mcpplibs/openkal", branch = "feat/openkal-0.8" } openkal-opensbi = { path = "../.." } From e98376d081f10858f97dc71dfa736030642768ea Mon Sep 17 00:00:00 2001 From: speak-agent Date: Thu, 27 Aug 2026 17:39:57 +0800 Subject: [PATCH 4/4] Name the released specification and the released engine openkal 0.8.0 is published and resolvable from the index, so the manifest names it by version rather than by branch --- including the example's, where a branch would hand a reader a reference that moves. The engine pin moves to mcpp 2026.8.27.1 and the repository variable MCPP_SOURCE_REF is cleared, so what this repository tests is the engine a user installs. --- .github/workflows/ci.yml | 4 ++-- examples/hello/mcpp.toml | 2 +- mcpp.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f32d9d5..cd46f0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 40 env: - MCPP_VERSION: 2026.8.26.2 + MCPP_VERSION: 2026.8.27.1 XLINGS_VERSION: v2026.8.17.2 XLINGS_NON_INTERACTIVE: '1' # The branch of the specification this backend is verified against. It @@ -274,7 +274,7 @@ jobs: run: shell: bash env: - MCPP_VERSION: 2026.8.26.2 + MCPP_VERSION: 2026.8.27.1 XLINGS_VERSION: v2026.8.17.2 XLINGS_NON_INTERACTIVE: '1' steps: diff --git a/examples/hello/mcpp.toml b/examples/hello/mcpp.toml index 00cd9cd..dd57044 100644 --- a/examples/hello/mcpp.toml +++ b/examples/hello/mcpp.toml @@ -23,5 +23,5 @@ runner = ["qemu-system-riscv64", "-machine", "virt", "-nographic", # That is the right refusal --- two forms can name two different trees --- and # it means an example inside a repository follows that repository's own # declaration while a change is in flight. -openkal = { git = "https://github.com/mcpplibs/openkal", branch = "feat/openkal-0.8" } +openkal = "0.8.0" openkal-opensbi = { path = "../.." } diff --git a/mcpp.toml b/mcpp.toml index 811e1d7..948476f 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -33,7 +33,7 @@ repo = "https://github.com/mcpplibs/openkal-opensbi" # The contract, not an implementation of it. Declaring it turns a version # mismatch into a resolution-time message rather than a link-time one. [dependencies] -openkal = { git = "https://github.com/mcpplibs/openkal", branch = "feat/openkal-0.8" } +openkal = "0.8.0" # ⭐ WHAT RECEIVES CONTROL, WHICH IS A STATEMENT ABOUT THE PROGRAM. #