Verification
Problem
Recent nightly toolchain package for x86_64-unknown-linux-gnu platform miss in its rust-src component Cargo.lock file, which rust compiler expects when rebuild of standard library is required.
Steps
- Make sure toolchain
nightly-x86_64-unknown-linux-gnu is installed with its rust-src component
- Attempt to compile a cargo project with
build-std option like
cargo +nightly build -Z build-std=std,panic_abort --target=x86_64-unknown-linux-gnu -r
- Compilation fails with
error: "/home/whatever/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try:
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
rust-src for nightly is indeed installed and subdirectory ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust contains bin/ and library/ from nightly, only Cargo.lock is not there.
Possible Solution(s)
No response
Notes
No response
Rustup version
rustup 1.27.1 (54dd3d00f 2024-04-24)
Installed toolchains
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
OS version
Linux x86_64 (Arch Linux)
Verification
Problem
Recent nightly toolchain package for x86_64-unknown-linux-gnu platform miss in its rust-src component
Cargo.lockfile, which rust compiler expects when rebuild of standard library is required.Steps
nightly-x86_64-unknown-linux-gnuis installed with itsrust-srccomponentbuild-stdoption likecargo +nightly build -Z build-std=std,panic_abort --target=x86_64-unknown-linux-gnu -rrust-srcfor nightly is indeed installed and subdirectory ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust contains bin/ and library/ from nightly, onlyCargo.lockis not there.Possible Solution(s)
No response
Notes
No response
Rustup version
rustup 1.27.1 (54dd3d00f 2024-04-24)Installed toolchains
OS version
Linux x86_64 (Arch Linux)