Skip to content

fix: include bound glibc in compiler environment - #485

Closed
ZheFeng7110 wants to merge 6 commits into
mcpp-community:mainfrom
ZheFeng7110:fix/gcc-private-glibc-path
Closed

fix: include bound glibc in compiler environment#485
ZheFeng7110 wants to merge 6 commits into
mcpp-community:mainfrom
ZheFeng7110:fix/gcc-private-glibc-path

Conversation

@ZheFeng7110

Copy link
Copy Markdown
Member

Summary

  • add the exact glibc@<version> payload library directory to Linux compiler child environments
  • keep runtime selection explicit; do not scan installed glibc versions
  • cover the initial GCC --version probe failing with exit 127 when the directory is absent

Closes #484

Test plan

  • git diff --check
  • managed GCC 16.1.0 --version succeeds with the bound private glibc plus gcc-runtime directories
  • managed GCC 16.1.0 compiles a C++23 source with the bound private glibc, gcc-runtime, and managed binutils
  • mcpp test (full self-host build was terminated by an OOM kill while compiling cli.m.cppm)
  • CI

@Sunrisepeak

Sunrisepeak commented Aug 27, 2026

Copy link
Copy Markdown
Member

@ZheFeng7110 这个 /etc/ld.so.preload 的问题 是 libc 侧的问题。可以不用从mcpp侧强行 workaround, 并且从 mcpp 侧无法根本解决这个问题。目前已经从glibc侧解决了这个问题。可以使用最新版本进行尝试

xlings update mcpp -y

# 删除全局缓存目录
rm -rf ~/.mcpp

# 配置镜像(可选)
mcpp self config --mirror CN

然后验证。

@ZheFeng7110

Copy link
Copy Markdown
Member Author

好的,问题已解决。谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux: private glibc ld.so.cache is not relocated, so gcc probe fails with /etc/ld.so.preload

2 participants