-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
shrink-rpath renames global variable symbol name #169
Comments
Likely the same issue as #45 |
It does indeed look like #45, which arises for example in several Rpackages like Seurat. It'd be good to see if there are any similarities to narrow down what causes patchelf to output wrong binaries. |
@jtojnar could you try again with master (or patchelfUnstable in nixpkgs)? |
Can still reproduce with with import ./. { };
with pkgs;
let
deadbeef = fetchFromGitHub {
owner = "DeaDBeeF-Player";
repo = "deadbeef";
rev = "1.8.0";
sha256 = "126i5qlkpv7pvi1mmc9y0jhqs6jjspsj7j615n2ddvsb2jsps81c";
};
in runCommand "patchelf" {
buildInputs = [ patchelfUnstable gcc ];
} ''
cp -r ${deadbeef} source
chmod -R u+w -- source
cd source/plugins/wildmidi
gcc -ggdb -shared -Iinclude -DWILDMIDI_VERSION=\"0.2.2\" -DWILDMIDILIB_VERSION=\"0.2.2\" -DTIMIDITY_CFG=\"/etc/timidity.conf\" -fPIC wildmidiplug.c src/wildmidi_lib.c include/wildmidi_lib.h -o wildmidi.so -lm
mkdir $out
cp wildmidi.so $out/wildmidi-patched.so
cp wildmidi.so $out/wildmidi.so
patchelf --shrink-rpath $out/wildmidi-patched.so
echo "These should be the same:"
nm -A -D -l $out/wildmidi.so | grep wildmidi_lib.c:399
nm -A -D -l $out/wildmidi-patched.so | grep wildmidi_lib.c:399
echo "^ The symbol should not have been renamed to X."
'' |
It would be helpful if you can also try 0.9 as the linked issue says it used to work. |
I originally reproduced this with 0.9. Just tried it again to be sure and replacing |
patchelf --shrink-rpath
renames global variable symbol breaking DeaDBeeF’s wildmidi plug-in.This is the variable in question:
https://github.com/DeaDBeeF-Player/deadbeef/blob/7ac83fb204fc3c8a35486ef8f9550cd98cec674e/plugins/wildmidi/src/wildmidi_lib.c#L399
Compare the patched and unpatched libraries:
Here is the reproducible:
The text was updated successfully, but these errors were encountered: