-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use staticx for Aarch64 exe builds #355
Merged
Merged
Conversation
This file contains 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
…taticx doesn't like multiple times
Jongy
commented
May 1, 2022
LiorMosk
previously approved these changes
May 1, 2022
I think this will fix the build. |
LiorMosk
approved these changes
May 2, 2022
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.
Closes: #342
Description
The problem starts with #342 - we needed to solve the glibc issue after upgrading the base image to CentOS 8.
staticx is the easiest solution because that's what we already do for x86_64. However, simply enabling staticx with this patch:
Results in this binary:
Not good.
gdb shows this trace:
Tar extraction calling into
getpwnam
which ends up loading DSOs... sigh.We don't need this functionality.
So, this PR:
getpwnam
andgetgrnam
.Known issues
The exe build doesn't pass on x86_64 anymore.
I suspect this to be a bug with the QEMU that emulates the usermode environment for Aarch64 binaries. It doesn't set up a correct environment for
ldd
.Before we merge this PR, I plan to inspect if now after #350 I can provision an Aarch64 runner and separate the Aarch64 build steps to run on it instead. This will also make the build faster :) but mostly it will not crash haha.
Alternatively we need to fix the build when running on x86_64. Maybe upgrade QEMU? We all run
multiarch/qemu-user-static:latest
so IDK....How Has This Been Tested?
All current binaries used in Aarch64 builds of gProfiler are static - only PyPerf is dynamically built, hence this PR is also in preparation for #287 which finally uses PyPerf in Aarch64.
For the mean time, the only thing "tested" here is that gProfiler's Python starts - staticx provides us with libc. So the tests I have performed for Aarch64 are just
gprofiler --version
. For x86_64, I tested PyPerf on appropriate kernel versions as well, and not justgprofiler --version
.