You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Linux 上 mcpp run 启动 GUI 应用后,应用每 spawn 一次子进程(popen / std::system,底层走 /bin/sh -c)就报:
sh: symbol lookup error: $HOME/.mcpp/registry/data/xpkgs/xim-x-glibc/2.44/lib64/libc.so.6: undefined symbol: __pointer_chk_guard, version GLIBC_PRIVATE
Activity
fix(runtime): keep the private libc out of the process environment (#401
docs: the bare-name window, the runtime env scope, and AUR arming
docs: record the completion design and what executing it actually found
feat: converge template identity, runtime contracts, and release state (
speak-agent commentedon Aug 9, 2026
已在
2026.8.10.1修复(PR #400,合入 commit0006ce6)。修的是什么
mcpp run曾把私有 glibc 目录放进LD_LIBRARY_PATH。那个变量会被程序派生的每一个进程继承,而
/bin/sh由宿主 loader 加载(PT_INTERP写死在可执行文件里,任何环境变量都改不了),于是子进程在重定位阶段就死掉 —— 正是你报的那条。
关键是:这条环境项本来就没有收益。它存在的唯一理由是「可执行文件 DT_NEEDED 闭包
覆盖不到的 dlopen」,而产物的 RUNPATH 已经覆盖了这一点 —— link model 在
--dynamic-linker旁就发了-Wl,-rpath,<glibc>。实测:删掉这条环境项前后,产物的 RUNPATH 逐字节相同。所以它只是在给每一个后代进程添麻烦。
决策收敛在新模块
src/platform/runtime_env_contract.cppm,写成作用域而不是条件判断:DT_RUNPATHdlopen()LD_LIBRARY_PATH没有任何构建期条件能让一个继承变量对 mcpp 没启动、也看不见的进程变安全 ——
「只在依赖可能 dlopen 时才导出」仍然是导出,而死掉的子进程不关心原因。
验证
同一 fixture(带
[runtime] library_dirs的 dlopen 依赖)对照:本机复现确认过 2.44 payload 杀死
/bin/sh、2.39 不会 —— 这也是它能活这么久、以及「我这儿是好的」毫无意义的原因。
回归锁:
tests/e2e/208_private_libc_stays_in_the_binary.sh—— 目录在产物 RUNPATH 里、不在程序环境里、
/bin/sh子进程存活、dlopen 仍然解析得到,四条一起断言。tests/e2e/166_run_env_no_private_glibc.sh—— 原本断言相反(要求这条环境项必须在)。那条守卫的意图是对的(防止有人「修 LD_LIBRARY_PATH to fromsource glibc causes SIGSEGV in child process popen shell #291」时顺手把 dlopen 弄坏),但它锁的是机制
而不是能力,而机制的前提是错的。现在它对两种形状都断言私有 libc 不进环境,
能力断言交给 208。
隔离 fresh-home 冷启动验收里这两条都是 PASS。
feat: 图形栈闭合与分发档位 —— 标签、一条没人依赖的边、一个被钉住的 pin (#405, #407) (2026.8.10.2) (…