Code
While logged in as root on Linux::
- Clone the Rust repo
cd rust; ./x.py build
Current output
info: looks like you're trying to run this command as root
and so in order to preserve your $HOME this will now
use vendored sources by default.
error: vendoring required, but vendor directory does not exist.
Run `cargo vendor --sync ./src/tools/rust-analyzer/Cargo.toml --sync ./compiler/rustc_codegen_cranelift/Cargo.toml --sync ./src/bootstrap/Cargo.toml ` to initialize the vendor directory.
Alternatively, use the pre-vendored `rustc-src` dist component.
Traceback (most recent call last):
File "/home/scratch/rust/./x.py", line 29, in <module>
bootstrap.main()
File "/home/scratch/rust/src/bootstrap/bootstrap.py", line 949, in main
bootstrap(args)
File "/home/scratch/rust/src/bootstrap/bootstrap.py", line 896, in bootstrap
build.check_vendored_status()
File "/home/scratch/rust/src/bootstrap/bootstrap.py", line 831, in check_vendored_status
raise Exception("{} not found".format(vendor_dir))
Exception: /home/scratch/rust/vendor not found
Desired output
The suggestion to run cargo vendor isn't helpful if you don't already have a Rust toolchain installed. That leaves: "Alternatively, use the pre-vendored rustc-src dist component." It's completely unclear to me what this means or how to do it. Perhaps providing a link to documentation would be useful.
Code
While logged in as
rooton Linux::cd rust; ./x.py buildCurrent output
Desired output
The suggestion to run
cargo vendorisn't helpful if you don't already have a Rust toolchain installed. That leaves: "Alternatively, use the pre-vendoredrustc-srcdist component." It's completely unclear to me what this means or how to do it. Perhaps providing a link to documentation would be useful.