Skip to content

mcpp build fails inside an xlings sandbox since 2026.8.10.x (bisected; not a regression of the latest release) #427

Description

@Sunrisepeak

现象

在 xlings 沙箱里(xlings subos use --sandbox --cmd "...")构建任何工程都失败:

$ xlings subos use --sandbox --cmd "cd /tmp/ctl && mcpp build" mcpp-test
   Runtime SubOS 'default' does not describe itself: subos '/home/speak/.mcpp/registry/subos/default'
     does not describe its runtime …
   Resolving toolchain
error: toolchain post-install fixup: cannot fix up gcc toolchain
       '/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0': …

工程本身无关紧要 —— int main(){return 0;} 就能复现。同一个沙箱、同一个工程、
同一个 subos
,换旧版 mcpp 就能构建成功。

二分定位(全部在同一沙箱、同一工程上跑)

版本 结果
2026.8.8.4 Finished dev [unoptimized + debuginfo]
2026.8.10.3 error: selected SubOS 'default' cannot provide a RuntimeBinding
2026.8.11.3 error: toolchain post-install fixup: cannot fix up gcc toolchain
2026.8.15.1 ❌ 与 2026.8.11.3 相同

⇒ 引入区间是 2026.8.8.4 → 2026.8.10.3,与 RuntimeBinding / rule B 的引入
(#413 / #414)时间吻合。不是最近这次发布带来的 —— 2026.8.15.1 与上一个发布版
表现完全一致。

为什么这值得修

沙箱外一切正常:

$ /home/speak/.xlings/data/xpkgs/xim-x-mcpp/2026.8.15.1/bin/mcpp run
   Compiling relcheck v0.1.0 (.)
    Finished dev [unoptimized + debuginfo] in 0.61s
released-ok

所以这不是「mcpp 坏了」,而是沙箱环境下的运行时身份推导拿不到它要的东西,
然后一路升级成硬错误。两条消息各自都合理:sandbox 里 /home/speak/.mcpp/registry
是只读或被隔离的,于是 subos 描述不出自己、fixup 也写不进去。

沙箱正是验证发布产物的标准手段(clean-room 验证),现在这条路被堵住了。

判据

xlings subos use --sandbox --cmd "mcpp build" 在一个平凡工程上成功;
或者 mcpp 明确说明「沙箱内不支持 X,请用 Y」,而不是抛一个指向 registry 路径的
fixup 错误 —— 那条消息把用户指向了一个他在沙箱里本来就不该写的目录。

环境

mcpp 2026.8.15.1 / xlings 2026.8.14.1 / Linux x86_64 / subos mcpp-test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions