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
stdenv, treewide: Better configure platforms #60166
base: staging
Are you sure you want to change the base?
Conversation
(stdenv.hostPlatform != stdenv.buildPlatform) | ||
[ "build" "host" ] | ||
"host" |
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.
Why leave out host?
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 think it forced some cross-specific logic, even if both were the same. Don't want to go that far yet :).
@@ -133,7 +133,6 @@ stdenv.mkDerivation rec { | |||
++ (with darwin.apple_sdk.frameworks; optionals stdenv.isDarwin [ Cocoa OpenGL ]) | |||
; | |||
|
|||
configurePlatforms = [ ]; |
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.
Don't these fail on the build flag?
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.
But it's a harmless env var now!
Not sure if you've seen it yet @Ericson2314 but each ofborg run now comes with an evaluation performance report: https://github.com/NixOS/nixpkgs/pull/60166/checks?check_run_id=109946398 since you do some pretty core stuff, I think this report is especially relevant to you. Check it out? not saying your changes here need rethinking due to the results, just keep it in mind and check it out when submitting changes to see how it impacts evaluation |
I hope not. I chose not to make any labels or value judgement around the results of the performance report, specifically to avoid pushing people to write ugly code to make the mark go away. |
For make-derivation it's pretty important to look at performance. optionalAttrs is best to avoid as much as possible here. Nix has to evaluate those checks every timne. |
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 doesn't work for build scripts that support build, host and target but don't know about the *_alias flag.
Cool! No worries, I hadn't even looked at your PR, or the result of the performance report ;) thank you! |
Then we don't run the risk of stomping over non-autotools.
This isn't needed now that we use env vars.
c8aaccc
to
c81e91d
Compare
@volth Hmm does that mean everything all the way down is screwed up, or I just need to cherry-pick your perl fix? Perl doesn't use autoconf so I wouldn't expect |
I thought I used your PR's base-branch. Maybe I need to use something else to get a) the right perl version, b) your and @matthewbauer's |
Also, is there a way to turn of the |
OK I'll see why stdenv is screwed up. |
x86_64 python did build correctly, so the bootstrap tools referece does seem to be an aarch32-specific (or alt-mode-specific) problem. |
He can request access any time he'd like :) https://github.com/nix-community/aarch64-build-box#want-access |
@grahamc I read the README and now I'm properly scared :) |
What do you all think we merge this cause it's a step in the right direction? |
@volth you saying this is worse than 19.03? I figured it was better, just not sufficient to fix aarch32. |
Nothing to be really scared about, just a warning not to (mis)place any trust in the community box. I can highly recommend using it for stuff like this though! Hell, I've used it for non-aarch64-specific stuff as well just because of the oomph it has :)
I'm generally in favour. My main remaining concern is whether the |
This needs much more testing IMO |
https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Canonicalizing.html this is the documentation for |
@matthewbauer That's not a very helpful comment. What sort of testing is missing in your view? It's targeted at staging, where hydra will (once the PR is merged) rebuild everything including the nixos tests. If that's not good enough for you, please be more specific about what you think we need in addition. |
When building armv7l on an aarch64 machine, I'm getting
|
Thank you for your contributions.
|
@yorickvP's error isn't a regression AFAIK since I guess builds didn't even get that far when natively building armv7 software on aarch64. Is there anything besides the merge conflicts that prevents this from being merged? |
I marked this as stale due to inactivity. → More info |
Rebased #240637 |
Motivation for this change
build_alias
, so that buildingx86_32
onx86_64
, oraarch32
onaarch64
, etc should work.configurePlatforms = [ ];
now that they are not needed.CC @volth, can you confirm this mostly works? We can combine with any package-specific fixes needed from #60131.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)