Skip to content

"Alternatively, use the pre-vendored rustc-src dist component" is confusing #110163

Closed
@catamorphism

Description

@catamorphism

Code

While logged in as root on Linux::

  1. Clone the Rust repo
  2. 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.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)requires-custom-configThis issue requires custom config/build for rustc in some way

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions