Skip to content

Bug: 2026.8.10.1 冷装 xim:gcc@16.1.0 失败 —— 依赖解析到 glibc 2.44 但 gcc config hook 找不到 payload #524

Description

@speak-agent

Bug: 2026.8.10.1 冷装 xim:gcc@16.1.0 失败 —— 依赖装的是 glibc 2.44,gcc 的 config hook 找不到 payload

症状

完全冷的 home(无任何 xpkgs 缓存)上安装 xim:gcc@16.1.0

 Downloading xim:glibc@2.44 [====================] 40.4 MB / 40.4 MB
[VERBOSE] integrity: cleaning incomplete install: <home>/data/xpkgs/xim-x-gcc/16.1.0
[error] [gcc] failed: config hook failed: config hook returned false
[error] [xim:xpkg]: [ERROR] glibc payload not found, but gcc needs it to rewrite its ELF interpreter away from the build machine's path.
[error] [xim:xpkg]: [ERROR] without it the installed gcc cannot run at all.
[error] [xim:xpkg]: [ERROR] install it first: xlings install xim:glibc@2.39
[error] gcc installed but registered none of the programs it declares: gcc, g++, c++
[error] install failed: gcc installed but registered none of its declared programs

安装的是 2.44,而 hook 的诊断建议的是 2.39 —— 二者不一致本身就是线索。

A/B(同一 workflow、同一仓库、同一 runner 镜像,只差 xlings pin)

xlings 缓存状态 结果
2026.8.9.2 Cache not found for input keys: mcpp-sandbox-Linux-ci-xl2026.8.9.2-… ✅ gcc 安装成功
2026.8.10.1 Cache not found for input keys: mcpp-sandbox-Linux-ci-xl2026.8.10.1-… ❌ 上述失败

两次都是真正的冷装(cache miss 已在日志里确认),所以这不是「一直坏、被热缓存掩盖」。

  • 2026.8.9.2 冷装成功:mcpp-community/mcpp run 31317627461
  • 2026.8.10.1 冷装失败:run 31335075557(同一 run 内 4 个 Linux job 全部同样失败)

相关线索

  • xim-pkgindexgcc.lua 声明 deps = { "xim:glibc@>=2.39", "xim:binutils@2.42" }
    所以解析到 2.44 在语义上是允许的;问题出在 gcc 的 config hook 里
    __find_glibc_runtime() 找不到这个 payload。
  • 日志顺序是「开始下载 glibc 2.44」→「清理未完成的 gcc 安装」→ hook 失败,
    看起来像依赖尚未落地就跑了消费方的 config hook,或者 hook 查找的 store root
    不再包含依赖实际落地的位置。
  • 2026.8.10.1 的发布说明里有 “pkginfo.install_dir() returns nil for a dependency that exists only in the shared registry cache #514 显式有序的依赖 store roots”,
    以及 SubOS runtime 声明从常量兜底 glibc@2.44 改为「实际 active 版本」,
    两者都落在这条路径附近。

影响

任何冷 home 都装不上 gcc 工具链:新机器、CI 冷缓存、fresh-install
以及所有基于 mcpp 的下游构建。热 home 不受影响,所以升级后不会立刻显形。

环境

  • runner:ubuntu-24.04(GitHub-hosted)
  • 触发方:mcpp 把 xlings pin 从 2026.8.9.2 提升到 2026.8.10.1
    mcpp-community/mcpp#400
  • mcpp 侧暂时把 pin 回退到 2026.8.9.2,等这条修复后再提升。

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