patchelf: add patch: false alarm for non overlapping sections #106340
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.
Motivation for this change
Starting with version 0.12, patchelf sometimes returns an error complaining about overlapping sections. The build of tsm-client reports the following error message
see #106257
There is a patch available in this patchelf pull request: NixOS/patchelf#230
The pull request at hand adds the patch to the nixpkgs patchelf build recipe. This fixes the
tsm-client
package, maybe more.Note on local tests
Due to lack of machine power, I cannot fully test this commit. It tries to rebuild stdenv again, and would even try to build the whole world to obtain a NixOS system for testing.
However, I tested the patch by building the attached recipe with current nixos-unstable (
83cbad92d73
) and also with current nixos-20.09 (3a02dc9edb2
). This generates a working patchelf alone, then uses a modified autoPatchelfHook to inject the fixed patchelf into thePATH
of the tsm-client build. It makes tsm-client build correctly (on unstable and on 20.09).Note that the attached recipe below can also be used as a workaround to build a working tsm-client.
tsm-client-fix.nix.txt
Notifying patchelf maintainer: @edolstra
Things done
See the note on local tests above.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
: too much./result/bin/
): indirectly tested, by buildingtsm-client
nix path-info -S
before and after): 39,441,192 Bytes + 240 Bytes = 39,441,432 Bytes (this is the increase measured with the patchelf build by the attached recipe)