this post was submitted on 08 Apr 2025
15 points (100.0% liked)

Rust

6827 readers
1 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

I've been pretty busy in my life recently, but I finally got around writing this blog post. Hopefully, things are sorted out in my personal life and I should be able to be more regular about these updates in the future.

I'm very happy to see good progress towards rustup distribution (thanks to Kobzol again!).

you are viewing a single comment's thread
view the rest of the comments
[–] BB_C 1 points 1 week ago (1 children)

Yeah, apologies for not communicating the issue clearly.

cp config.example.toml config.toml
./y.sh prepare
./y.sh build --sysroot
./y.sh clean all
# above commands finish with success
# below, building succeeds, but it later fails with "error: failed to load source for dependency `rustc-std-workspace-alloc`
./y.sh test --release 

And then trying to use the "release" build fails:

% CHANNEL="release"  ./y.sh cargo build  --manifest-path tests/hello-world/Cargo.toml
[BUILD] build system
    Finished `release` profile [optimized] target(s) in 0.03s
Using `/tmp/rust/rustc_codegen_gcc/build/libgccjit/d6f5a708104a98199ac0f01a3b6b279a0f7c66d3` as path for libgccjit
   Compiling mylib v0.1.0 (/tmp/rust/rustc_codegen_gcc/tests/hello-world/mylib)
error[E0463]: can't find crate for `std`
  |
  = note: the `x86_64-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `mylib` (lib) due to 1 previous error

I will make sure to report issues directly in the future, although from account(s) not connected to this username.

[–] antoyo 1 points 1 week ago (1 children)

The issue here is that you didn't provide --build-sysroot to ./y.sh test --release, so it cannot find the std crate.

[–] BB_C 1 points 1 week ago (1 children)

But running

./y.sh prepare
./y.sh test --release

does work. That's what gave me the impression that clean all doesn't actually clean everything!

[–] antoyo 2 points 1 week ago (1 children)

It does actually clean everything. You need to call ./y.sh prepare again if you ran clean all; otherwise, it will fail to find some stuff like rustc-std-workspace-alloc.

I opened an issue to improve the documentation in this regards. Thanks for testing all this: this will help me improve the documentation.

[–] BB_C 1 points 1 week ago

You need to call ./y.sh prepare again

Aha! Good to know. And yes, improved documents would be of great help.

Thanks again for working on this.