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
linux bootstrap tools: Use same derivation whether cross compiling or not #26883
linux bootstrap tools: Use same derivation whether cross compiling or not #26883
Conversation
@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @dezgeg, @viric and @ambrop72 to be potential reviewers. |
12d45b8
to
74c3238
Compare
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.
nix-build ./pkgs/top-level/release-cross.nix -A bootstrapTools.aarch64
gives me:
error: syntax error, unexpected $end, expecting ')', at /home/tmtynkky/opt/nixpkgs/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix:23:2
74c3238
to
029cb3a
Compare
Well, that's awkward. Sorry @dezgeg, I guess I was multitasking on too many PRs today. Fixed now. |
For some reason it's trying to build a non-native
|
029cb3a
to
be7699d
Compare
@dezgeg Ah, that is because without Also, I realized from the fact that |
be7699d
to
773b4ea
Compare
Pushed again with a way to make the cross file even smaller. (!) |
5710ccd
to
27349be
Compare
Next up seems to be:
|
@dezgeg Hmm, is that a regression of this PR though? |
561a45c
to
3134a13
Compare
@dezgeg, to be clear, I'm sure it isn't. I think it would be best to merge this and then fix? |
3134a13
to
b6a9d9c
Compare
I'm not sure since it's impossible to verify that the end result works. |
Fair enough, I'll probably let this sit until after #26805, which is a better foundation to see what's wrong with |
aadf0f1
to
d9dc989
Compare
@@ -176,11 +189,14 @@ rec { | |||
bootstrapTools = runCommand "bootstrap-tools.tar.xz" {} "cp ${build}/on-server/bootstrap-tools.tar.xz $out"; | |||
}; | |||
|
|||
bootstrapTools = import ./bootstrap-tools { inherit system bootstrapFiles; }; | |||
bootstrapTools = import ./bootstrap-tools { | |||
inherit (hostPlatform) system; |
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 will now be built on the platform the stdenv's host platform. For native, this makes so difference, but for cross it does mean we would have permanently enqueued derivations, unless we add builders for those platforms.
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.
Added an assertion to prevent those jobs from appearing. Easy to undo if we want them later.
|
||
test = derivation { | ||
name = "test-bootstrap-tools"; | ||
inherit system; | ||
inherit (hostPlatform) system; |
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.
Same sort of change as above #26883 (comment)
fi | ||
done | ||
|
||
nuke-refs $out/bin/* | ||
nuke-refs $out/lib/* | ||
nuke-refs $out/libexec/gcc/*/*/* | ||
nuke-refs $out/lib/gcc/*/*/* |
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 was only recently needed by cross, for reasons unknown. Should be harmless for native?
d9dc989
to
434f96c
Compare
@@ -123,6 +123,8 @@ in | |||
bootstrapTools = let | |||
tools = import ../stdenv/linux/make-bootstrap-tools-cross.nix { system = "x86_64-linux"; }; | |||
maintainers = [ lib.maintainers.dezgeg ]; | |||
mkBootstrapToolsJob = drv: hydraJob' (lib.addMetaAttrs { inherit maintainers; } drv); | |||
mkBootstrapToolsJob = drv: | |||
assert lib.elem drv.system (supportedSystems ++ [ "aarch64-linux" ]); |
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.
I'll eventually make supportedSystems
include that, but I need to do a few thinks with release-lib first.
434f96c
to
ab651d2
Compare
Merging to unblock other things. It's not a mass rebuild so easy to address anything brought up after the fact. |
Motivation for this change
I'm hoping this doesn't constitute a mass rebuild, but I'm not really sure.It doesn't.Things done
Tested at https://hydra.nixos.org/jobset/nixpkgs/ericson2314-cross-trunk. The
aarch64-linux
stdenv is actually tested now!(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)CC @Dridus