-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rustc: use targetPlatform
to detect pkgsLLVM
, unbreak with LLVM and musl
#379632
base: master
Are you sure you want to change the base?
Conversation
Previously `pkgsLLVM.rustc` was correctly flagged, but not the spliced wrapper in dependencies like `pkgsLLVM.ripgrep` for example
This is something that is not supported by upstream, no longer used in other distributions like Gentoo (where it was originally sourced from), doesn't fix issues with compilation at runtime, and only works around the root problem of Rust wanting to use `libgcc_s` when it's not available Let's remove it
Heads up the requisite has been reverted in #379615. Hopefully it gets fixed and relanded before too long. |
Unfortunately, it's impossible to land this soon, it requires a deprecation phase on the NixOS side which imho can't be avoided and can't be worked around. So.. don't hold you breath - I have put it on hold for me for now :( |
That is sad to hear. The composition introduced in that PR was honestly a game changer in solving this problem I'll see if we can get the same logic working OOTB with |
Is it not just sugar for setting |
Basically lol, I was just having some trouble with trying to extend the current stdenv with some of those variables -- it's the same as what happens with packages evaluated from This PR will continue to work with import <nixpkgs> {
localSystem.system = "x86_64-linux";
crossSystem = {
config = "x86_64-unknown-linux-musl";
useLLVM = true;
linker = "lld";
};
config = { };
overlays = [ ];
} But I'm not sure how we can make this buildable again directly 🤷 |
Essentially yes. I guess the most value those predefined package sets bring is.. the fact that they encode this knowledge and thus you're more likely to find something that doesn't immediately break everything. Similar to |
We probably found a way without touching NixOS and hopefully without lengthy deprecation phases. Can you try this on top of #380342? |
I think this PR is based on somewhat of a misconception. The linked comment reads:
But this is in the context of someone using a (Musl‐based) Alpine system, and LLVM is only mentioned in the context of Gentoo’s
I think that the more general solution is probably going to be packaging |
Pseudo-alternative to #330037
Following #376988, it seems
pkgsLLVM.pkgsMusl
and similar combinations work as expected! This has led me to do a bit of testing based on this comment from a Rust developer on using LLVM/libunwind:Sure enough after a little tweaking,
pkgsLLVM.pkgsMusl.rustc
appears to be fully functional :)Tested against #375030 and with the following:
We should of course continue looking for ways to get
pkgsLLVM
alone to buildrustc
properly, but hopefully this can hold us over until a solution is foundThings done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.