-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
meson: append install_rpath via patchelf #31436
Conversation
for f in $(find . -name .nix-dont-strip); do | ||
echo "Found $f, setting dontStrip" | ||
export dontStrip=1 | ||
rm $f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation mismatch (tabs vs spaces)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't get Emacs to indent shell scripts properly...
04aa987
to
fa29eff
Compare
This is based on Jan Tojnar's work in NixOS#31228. When patchelf has to grow rpath beyond original capacity, it sets dontStrip, to work around NixOS/patchelf#10.
fa29eff
to
aebc2b8
Compare
old_rpath = _patchelf('--print-rpath', self.bfile) | ||
if old_rpath: | ||
new_rpath = old_rpath + b':' + bytes(install_rpath, 'utf-8') | ||
if len(old_rpath) < len(new_rpath): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not this always true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. Thanks!
@@ -9,6 +9,8 @@ python3Packages.buildPythonApplication rec { | |||
sha256 = "0qn5hyzvam3rimn7g3671s1igj7fbkwdnf5nc8jr4d5swy25mq61"; | |||
}; | |||
|
|||
patchPhase = "cat ${./depfixer_patchelf.py} >> mesonbuild/scripts/depfixer.py"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be in postPatch
in case we need to add patches in the future.
For the reference, I propose yet another solution in #31222 (comment) |
Closing in favor of #31222 (comment). |
Motivation for this change
This is based on @jtojnar's work in #31228. When
patchelf
has to grow rpath beyond original capacity, it setsdontStrip
, to work around NixOS/patchelf#10.Fixes #31222. Currently in the process of rebuilding stuff with patched
meson
.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)