-
-
Notifications
You must be signed in to change notification settings - Fork 13.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
treewide: autoPatchelfHook / fixDarwinDylibNames only on Linux / Darwin #163924
Conversation
48da2b4
to
482bfcd
Compare
Note that dmd will still fail with this, but at a different point in the build. That failure wasn't introduced by the |
maybe you can add |
None of the other setup hook derivations (i.e. autoPatchelfHook = (makeSetupHook {
name = "auto-patchelf-hook";
deps = [ bintools ];
substitutions = {
pythonInterpreter = "${python3.withPackages (ps: [ ps.pyelftools ])}/bin/python";
autoPatchelfScript = ../build-support/setup-hooks/auto-patchelf.py;
};
} ../build-support/setup-hooks/auto-patchelf.sh).overrideAttrs (oa: {
meta.platforms = lib.platforms.linux;
}); Works but maybe there's a better way? |
If you see a value in modifying derivations to not use autoPatchelfHook on darwin, then it must fail loudly when not fixed otherwise it will bitrot.
The way you found look good enough to me, but modifying makeSetupHook to optionally take meta as argument would be better. |
482bfcd
to
86a2688
Compare
Ah ok, weird that nobody noticed it then. |
Result of 22 packages marked as broken and skipped:
2 packages failed to build:
10 packages built:
|
I was hoping to keep the changes small to get them into staging-next before the merge, but I suppose we can aim abit bigger now that that's over. @symphorien We can do that, I guess there usually isn't much use to trying to patch ELF files for a Darwin target. For consistency's sake I'll do the same to |
After being rewritten in NixOS#149731, this hook can fail on Mach-O binaries. Since patching ELF files on Darwin doesn't make much sense anyway, we'll mark this as Linux-exclusive.
86a2688
to
0368893
Compare
0368893
to
58e0bbb
Compare
pkgs/applications/networking/cluster/ssm-session-manager-plugin/default.nix
Outdated
Show resolved
Hide resolved
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.
Coq also builds. Not sure what the previous errors were caused by.
Just wondering, what's the next step to get this into master? |
The next step is for this to get picked up by a staging-next iteration. It missed the current one, so it'll happen in the next one. After that it'll get merged into master, and from there into the various channels: https://nixpk.gs/pr-tracker.html?pr=163924 |
lovely, thanks. I'm following master in my flakes so that point will be good enough for me :) |
This is supposed to fix an issue caused by this PR: NixOS#163924 Which made `autoPatchelfHook` available only on Linux, resulting in builds of Android packages failing with: ``` error: Package ‘auto-patchelf-hook’ in /nix/store/...-nixpkgs-source/pkgs/build-support/trivial-builders.nix:73 is not supported on ‘x86_64-darwin’, refusing to evaluate. ``` Signed-off-by: Jakub Sokołowski <jakub@status.im>
A PR changing behavior of `auto-patchelf-hook` on Linux broke Android SDK builds: * NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: * NixOS/nixpkgs#173376 But I need to test it properly with out builds first. Signed-off-by: Jakub Sokołowski <jakub@status.im>
A PR changing behavior of `auto-patchelf-hook` on Linux broke Android SDK builds: * NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: * NixOS/nixpkgs#173376 But I need to test it properly with out builds first. Signed-off-by: Jakub Sokołowski <jakub@status.im>
A PR changing behavior of `auto-patchelf-hook` on Linux broke Android SDK builds: * NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: * NixOS/nixpkgs#173376 But I need to test it properly with out builds first. Signed-off-by: Jakub Sokołowski <jakub@status.im>
A PR changing behavior of `auto-patchelf-hook` on Linux broke Android SDK builds: * NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: * NixOS/nixpkgs#173376 But I need to test it properly with out builds first. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This is supposed to fix an issue caused by this PR: #163924 Which made `autoPatchelfHook` available only on Linux, resulting in builds of Android packages failing with: ``` error: Package ‘auto-patchelf-hook’ in /nix/store/...-nixpkgs-source/pkgs/build-support/trivial-builders.nix:73 is not supported on ‘x86_64-darwin’, refusing to evaluate. ``` Signed-off-by: Jakub Sokołowski <jakub@status.im>
Notable version changes: - Coreutils `9.0` to `9.1` - NodeJS `16.14.2` to `16.15.1` - Clojure `1.11.1.1107` to `1.11.1.1113` - Git `2.35.1` to `2.36.1` - Curl `7.82.0` to `7.83.1` - Android SDK Platform Tools `31.0.3` to `33.0.1` Most important is the Coreutils upgrade to 9.1 which includes a fix for iOS builds on new M1 ARM64 processors: #12799 Also fixes broken Android SDK builds on Linux due to `auto-patchelf-hook` change: NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: NixOS/nixpkgs#173376 Signed-off-by: Jakub Sokołowski <jakub@status.im>
Notable version changes: - Coreutils `9.0` to `9.1` - OpenSSL `1.1.1n` to `1.1.1o` - NodeJS `16.14.2` to `16.15.1` - Clojure `1.11.1.1107` to `1.11.1.1113` - Ruby `2.7.5p203` to `2.7.6p219` - Cocoapods `1.11.0` to `1.11.3` - Git `2.35.1` to `2.36.1` - Curl `7.82.0` to `7.83.1` - Android SDK Platform Tools `31.0.3` to `33.0.1` Most important is the Coreutils upgrade to 9.1 which includes a fix for iOS builds on new M1 ARM64 processors: #12799 Also fixes broken Android SDK builds on Linux due to `auto-patchelf-hook` change: NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: NixOS/nixpkgs#173376 Signed-off-by: Jakub Sokołowski <jakub@status.im>
Notable version changes: - Coreutils `9.0` to `9.1` - OpenSSL `1.1.1n` to `1.1.1o` - NodeJS `16.14.2` to `16.15.1` - Clojure `1.11.1.1107` to `1.11.1.1113` - Ruby `2.7.5p203` to `2.7.6p219` - Cocoapods `1.11.0` to `1.11.3` - Git `2.35.1` to `2.36.1` - Curl `7.82.0` to `7.83.1` - Android SDK Platform Tools `31.0.3` to `33.0.1` Most important is the Coreutils upgrade to 9.1 which includes a fix for iOS builds on new M1 ARM64 processors: #12799 Also fixes broken Android SDK builds on Linux due to `auto-patchelf-hook` change: NixOS/nixpkgs#163924 I've fixed this in `nixpkgs` PR: NixOS/nixpkgs#173376 Signed-off-by: Jakub Sokołowski <jakub@status.im>
Description of changes
#149731 rewrote
autoPatchelfHook
in a way where it won't silently skip over non-ELF binaries anymore. I assume that wasn't an intended change, but it's prolly better to fix some packages so they don't even pull in this hook when it's not needed.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes