NixOS-WSL
NixOS-WSL copied to clipboard
Nixos-rebuild switch error: rustc 1.74 or newer, while the currently active rustc version is 1.73.0
Bug description
To Reproduce
- wsl --import NixOS $env:USERPROFILE\NixOS\ nixos-wsl.tar.gz
- sudo nix-channel --update
- sudo nixos-rebuild switch
Logs
this derivation will be built:
/nix/store/h3p99bif5wdg0zcwhw62ccj9r0aip36i-nixos-rebuild.drv
these 139 paths will be fetched (48.05 MiB download, 224.44 MiB unpacked):
.
.
.
Executing cargoBuildHook
++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_CC=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/cc HOST_CXX=/nix/store/shdkxxdlpv66wl33rh9d01zfypaka1dn-gcc-wrapper-12.3.0/bin/c++ cargo build -j 20 --target x86_64-unknown-linux-gnu --frozen --profile release
error: package `clap_builder v4.5.2` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0
Either upgrade to rustc 1.74 or newer, or use
cargo update -p [email protected] --precise ver
where `ver` is the latest version of `clap_builder` supporting rustc 1.73.0
error: builder for '/nix/store/9h20mjg3zrdk62jzr5fh75lkg3kj9vaq-nixos-wsl-utils-1.0.0.drv' failed with exit code 101
error: 1 dependencies of derivation '/nix/store/jdw6nfkzb0jhbw32g9x13wfishi5n28h-nixos-system-nixos-23.11.7503.a2e1d0414259.drv' failed to build
WSL version
Please paste the output of wsl --version here
WSL: 2.0.14.0
Same issue: WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.4412
Please update to NixOS 24.05, if you haven't done that yet. 23.11 has an older rustc version, which the newer versions of our dependencies are no longer compatible with
Please update to NixOS 24.05, if you haven't done that yet. 23.11 has an older rustc version, which the newer versions of our dependencies are no longer compatible with
Is this directed to people with problems in this thread or the project? If I can safely update my main channel, I will.
Please update to NixOS 24.05, if you haven't done that yet. 23.11 has an older rustc version, which the newer versions of our dependencies are no longer compatible with
Is this directed to people with problems in this thread or the project? If I can safely update my main channel, I will.
Yep! Try:
sudo nix-channel --add https://nixos.org/channels/nixos-24.05 nixos
sudo nix-channel --update
sudo nixos-rebuild switch
@joegoldin this helped me alot, thanks!
Is this something that can be patched into this repo?
Is this something that can be patched into this repo?
We could revert to an older version of clap, but i'm not sure how much sense that would make
@nzbr But, is it better than not being able to use the OS? I don't think so. It should be at least patched somehow so that when I follow the instructions, it works. Currently it does not.
I have reverted the relevant commits now. Let me know if it works
sudo nix-channel --add https://nixos.org/channels/nixos-24.05 nixos sudo nix-channel --update sudo nixos-rebuild switch
Can we just add this to the docs/instructions?
@andreujuanc It should no longer be needed, because the problematic dependencies have been reverted. Upgrading is the same procedure as on regular NixOS, so I don't think it makes sense to have that in the WSL specific docs
I just downloaded the latest release, imported it and ran NixOS. but after sudo nixos-rebuild switch. it just shows the same error message. The maintainer should release a newer version.
my system is now good to go, but I thinks it should be put somewhere where everyone can see it
Works for me now, too. Thanks!
@andreujuanc Saying that it's same procedure is not a good reason to avoid documenting an issue that prevents people from using it. How would I know it's an upgrade problem in the first place? It's easy when you know the problem, but I would have never solved it if I did not find this thread.
@ekawatani Right, maybe updating to the latest NixOS stable should be part of the troubleshooting instructions
Works for me now, too. Thanks!
@andreujuanc Saying that it's same procedure is not a good reason to avoid documenting an issue that prevents people from using it. How would I know it's an upgrade problem in the first place? It's easy when you know the problem, but I would have never solved it if I did not find this thread.
I think you misquoted me xD