-
-
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
tsm-client package: broken on 20.09 due to "patchelf: unsupported overlap of SHT_NOTE and PT_NOTE" #106257
Comments
Hi @florianjacob , thanks for your report and research! The problem is a bug in patchelf. There is already a patch in NixOS/patchelf#230, however, it didn't reach nixpkgs releases yet. Apparently this bug is rarely triggered. I prepared a pull request for master here: #106340 . It just adds the patch to nixpkgs build recipe for patchelf. If the pull requests gets accepted, I will prepare a backporting pull request for release 20.09. In the meantime, you can use the test recipe I attached to my pull request. This recipe builds a patched patchelf, then uses it to build tsm-client. I tested this successfully on unstable and 20.09 Maybe you can even assemble a package overlay to include this workaround script in your NixOS system configuration. |
@Yarny0 I am so happy that you happen to know what you're doing here, and how to deal with this. 😅 |
Starting with version 0.12, patchelf sometimes returns an error complaining about overlapping sections: > unsupported overlap of SHT_NOTE and PT_NOTE This issue was reported for tsm-client: NixOS#106257 There is a patch available in this pull request: NixOS/patchelf#230 This patch fixes tsm-client, maybe other packages as well. This commit adds the patch to the nixpkgs patchelf build recipe. Note that the patch may also be downloaded directly here: https://github.com/NixOS/patchelf/pull/230.patch However, in contrast to common nixpkgs policy, the patch is not fetched with fetchpatch, but is copied directly into nixpkgs tree. This is necessary because patchelf is a dependency of fetchpatch. See also the note at the top of the patchelf build recipe in pkgs/development/tools/misc/patchelf/default.nix .
Tried to get it to work with this overlay, but failed: nixpkgs.config.overlays = [ (self: super: {
patchelf = super.patchelf.overrideAttrs (oldAttrs: {
patches = [(fetchpatch {
name = "PR230-fix-false-alarm-for-non-overlapping-sections.patch";
url = "https://raw.githubusercontent.com/Yarny0/nixpkgs/f9d5e1c8278cbd05148859b05016c01889351c59/pkgs/development/tools/misc/pa tchelf/PR230-fix-false-alarm-for-non-overlapping-sections.patch";
sha256 = "1l69grlij1ycqacf0lgka8dq14wdi49wn173hrw2vw18n8rz4md1";
})];
});
})]; The error message from tsm building stays the same, but probably the patch is just not really applied / a vanilla patchelf version is actually used, due to the bootstrapping role it plays in the build process. :/ |
I'm not sure if You can also work around that by adding the patch file directly into your nixos configuration, but since I guess there is no way around: You need to add an overlay that essentially replaces the build script of |
I marked this as stale due to inactivity. → More info |
I really have to test this again with NixOS 21.05 |
With #135477 the branch Given the opportunity, I filed a pull request to update Dear @florianjacob, sorry it took so long until it got fixed. Can you verify that |
No worries, thanks for investigating this intricate issue! 👍 for updating tsm-client to the latest version, that'll be helpful for the next time. :) As the patchelf issues also appeared in other contexts and were reproduced by other people, and are presumably fixed now, I'll proceed and close this issue. |
Describe the bug
Upgrading to NixOS 20.09 failed for me because the tsm-client package is broken on 20.09.
patchelf: unsupported overlap of SHT_NOTE and PT_NOTE
seems to be the main error message from the rebuild log output pasted below. While this sounds similar to NixOS/patchelf#255, tsm-client is written in Java and not in Rust.The tsm-client package built fine on NixOS 20.03.
To Reproduce
Expected behavior
The tsm-client package should compile on 20.09.
Screenshots
Notify maintainers
Maintainer: @Yarny0 can you reproduce this?
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: