-
-
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
stdenv: always pass --build, --host to configure #87909
base: staging
Are you sure you want to change the base?
Conversation
Check out https://github.com/NixOS/nixpkgs/pull/44583/files, which was deemed going too far. |
adding WIP to minimize OfBorg abuse |
With the perl change, this successfully builds stdenv on macOS. |
friendly ping |
Not sure what next steps are here - I'll see if I can still build some basic things with this PR and latest staging, but any serious testing of this requires computing infrastructure I don't have. |
Ok, rebased against latest staging, successfully build |
@Gaelan if you can build both stdenvs / hellos, and you have time for the next 2-3 weeks to monitor staging on hydra (something I was never good enough about with my original burst of cross work!!), I think we can merge this. :) |
Linux hello builds (and runs) successfully as well. I'd be happy to watch Hydra as well, though I'm a little confused about how all that works; there seems to be a hydra job for staging at https://hydra.nixos.org/jobset/nixpkgs/staging, but it looks like it only gets run every few months? |
@Gaelan I'm not up to date myself, but I think the idea is that things will be merged into |
/rebase staging |
Useful to enable tree-wide occasionally to have incremental progress towards NixOS#87909 resolution.
To get a bit of incremental progress i'll collect packages known to fail here and possible links to fix them incrementally:
|
In NixOS#87909 ("stdenv: always pass --build, --host to configure") we noticed that stdenv.cc exposes `c++` as a wrapped bianry and `x86_64-unknown-linux-gnu-c++` as unsrapped binary. As a result `x86_64-unknown-linux-gnu-c++` was not able to create basic bianries. This makes seepingly no-op `--host=x86_64-unknown-linux-gnu` option for `./configure` a breaking change. This change adds wrappers to prefixed binaries for cross and native cases where such an inconsistency exists. New validation change will catch new possible inconsistencies. It already caught existing inconsistencies in: `gcc`, `gfortran`, `gcj`, `gccgo`, `gdc`, `clang`. At least `radare2` build is fixed by consistent wrappers. It used to fail before as: radare2> ERROR: x86_64-unknown-linux-gnu-gcc cannot create executables Issue: NixOS#178802
Is anyone still working on this? |
I have not seen PRs recently. I think it's still worth doing. |
So, I finally have some free time: what can I do to help get this done? |
I would suggest trying
|
I tried to build some stuff on this branch, here is what I got in failures so far:
I planned to start opening PRs over the weekend. |
I would look for derivations with custom |
@tobim are you trying on this branch, or on |
I rebased the branch on top of 1460498 (April 5 2023) when I started. I didn't update after that to save time. |
To prevent regressions would it be helpful to override this at a package level? So we could start building packages in hydra with this set? |
This fix might be relevant if you're testing changes in cross compiling with this PR: #240435. |
Motivation for this change
See #21471 for why this is a good idea. The consensus there seemed to be "go for it," so here's me going for it. This is too big to reasonably test on my laptop, but I imagine this will break some stuff, so it might want to be its own hydra job? I'm not sure how one makes that happen. @edolstra, maybe?
This PR sets configurePlatforms to always default to
[ "build" "host" ]
in mkDerivation, which was probably the single biggest source of special-casing for cross compiling. However, many individual packages still have special cases; once the dust settles, we should clean those up as well.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)