NixOS-WSL icon indicating copy to clipboard operation
NixOS-WSL copied to clipboard

Nixos-rebuild switch error: rustc 1.74 or newer, while the currently active rustc version is 1.73.0

Open MateuszZelent opened this issue 1 year ago • 15 comments
trafficstars

Bug description

To Reproduce

  1. wsl --import NixOS $env:USERPROFILE\NixOS\ nixos-wsl.tar.gz
  2. sudo nix-channel --update
  3. 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

MateuszZelent avatar Jun 06 '24 13:06 MateuszZelent

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

mgrandau avatar Jun 06 '24 16:06 mgrandau

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

nzbr avatar Jun 06 '24 21:06 nzbr

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.

trev-dev avatar Jun 06 '24 22:06 trev-dev

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 avatar Jun 07 '24 00:06 joegoldin

@joegoldin this helped me alot, thanks!

john-fwss avatar Jun 07 '24 00:06 john-fwss

Is this something that can be patched into this repo?

jaskerv avatar Jun 08 '24 01:06 jaskerv

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 avatar Jun 15 '24 16:06 nzbr

@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.

ekawatani avatar Jun 22 '24 18:06 ekawatani

I have reverted the relevant commits now. Let me know if it works

nzbr avatar Jun 23 '24 16:06 nzbr

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 avatar Jun 25 '24 15:06 andreujuanc

@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

nzbr avatar Jun 30 '24 17:06 nzbr

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.

ryannewcomer avatar Jul 04 '24 21:07 ryannewcomer

my system is now good to go, but I thinks it should be put somewhere where everyone can see it

ryannewcomer avatar Jul 04 '24 21:07 ryannewcomer

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 avatar Jul 06 '24 08:07 ekawatani

@ekawatani Right, maybe updating to the latest NixOS stable should be part of the troubleshooting instructions

nzbr avatar Jul 07 '24 04:07 nzbr

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

andreujuanc avatar Oct 14 '24 13:10 andreujuanc