You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@dunric Thanks for filing this issue! I'm not sure if this is a Rustup issue, but it might indicate a faulty installation caused by something like #988. For the moment being, I suggest uninstalling and reinstalling the toolchain in question.
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
nightly-x86_64-unknown-linux-gnu
is installed with itsrust-src
componentbuild-std
option likecargo +nightly build -Z build-std=std,panic_abort --target=x86_64-unknown-linux-gnu -r
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, onlyCargo.lock
is 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)
The text was updated successfully, but these errors were encountered: