Bake guest paths (/igloo) into staged binaries#6
Merged
Conversation
The staged binaries run on the guest, where penguin mounts this arch's dylibs flat at /igloo/dylibs and the tools at /igloo/utils (per config_patchers.py) -- not at the container's /igloo_static/dylibs/<arch>. normalize_elf was setting the interpreter and RUNPATH to the container path, so on the guest the loader and libraries could not be found and the tools would not launch. Point both at /igloo/dylibs, and rewrite the python tree's internal references to /igloo/utils/python. The drop-in sysroot symlinks stay /igloo_static-relative on purpose: they are consumed at penguin *build* time (clang --sysroot), not on the guest. Verified armel: gdbserver interp -> /igloo/dylibs/ld-musl-arm.so.1, RUNPATH -> /igloo/dylibs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Critical fix — without this the guest tools don't launch.
The staged binaries run on the guest, where penguin mounts this arch's dylibs flat at
/igloo/dylibsand the tools at/igloo/utils(perconfig_patchers.py), not at the container's/igloo_static/dylibs/<arch>.normalize_elfwas baking the container path into the interpreter and RUNPATH, so on the guest the loader and libraries couldn't be found and gdbserver/strace/ltrace/python would fail to exec./igloo/dylibs/igloo/utils/python/igloo_static-relative — consumed at penguin build time via clang --sysroot, not on the guest)Verified armel: gdbserver interp →
/igloo/dylibs/ld-musl-arm.so.1, RUNPATH →/igloo/dylibs.This was meant to be in v0.0.4 but landed after PR #5 merged; needs its own release.