Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
catamorphism opened this issue Apr 10, 2023 · 6 comments · Fixed by #120403
Closed

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

catamorphism opened this issue Apr 10, 2023 · 6 comments · Fixed by #120403
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@catamorphism
Copy link
Contributor

catamorphism commented Apr 10, 2023

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.

@catamorphism catamorphism added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 10, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 11, 2023

Oh this is very funny, rustc-src is what rustup calls it, which is of course completely unhelpful in this scenario where you don't have rustup and are building from source.

Mentoring instructions:

print('Alternatively, use the pre-vendored `rustc-src` dist component.')
should link to https://forge.rust-lang.org/infra/other-installation-methods.html#source-code.

@jyn514 jyn514 added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) requires-custom-config This issue requires custom config/build for rustc in some way and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 11, 2023
@jyn514
Copy link
Member

jyn514 commented Apr 11, 2023

Hmm, I guess for this particular scenario you might be building from a commit other than latest master as well. We do technically package it for individual commits:

; curl -I https://ci-artifacts.rust-lang.org/rustc-builds/dd2b19539ea4d62a150cf13d45942e58b6b44e54/rustc-nightly-src.tar.xz | head -n1
HTTP/2 200 

but AFAIK that isn't documented anywhere. Maybe we should add it to forge?

@reez12g
Copy link
Contributor

reez12g commented Apr 13, 2023

@rustbot claim

@MoskalykA
Copy link
Contributor

hello, i'm taking the liberty of claiming this pull request, but I'd like some information. Should I propose a solution (like the curl command with the right url?) or just propose the documentation page?

@MoskalykA
Copy link
Contributor

@rustbot claim

@rustbot rustbot assigned MoskalykA and unassigned reez12g Aug 4, 2023
@seqre
Copy link
Contributor

seqre commented Jan 27, 2024

@rustbot claim

@bors bors closed this as completed in 8ab372d Jan 30, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Jan 30, 2024
Rollup merge of rust-lang#120403 - seqre-contrib:pre-vendored-message, r=onur-ozkan

Add instructions of how to use pre-vendored 'rustc-src'

This PR closes rust-lang#110163.

I had to move the URL to the left, making it not aligned as it is three lines above, but the tidy check would yell at me otherwise. If that's not acceptable, I'd love some suggestions on how to make it better.

One question: in the original issue (rust-lang#110163 (comment)), it was suggested to mention how to download specific commit tarballs; however, it was said it's not documented anywhere, so I did not include that yet. If there is a want to have that, I'd gladly amend the commit.
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jan 31, 2024
…ozkan

Add instructions of how to use pre-vendored 'rustc-src'

This PR closes #110163.

I had to move the URL to the left, making it not aligned as it is three lines above, but the tidy check would yell at me otherwise. If that's not acceptable, I'd love some suggestions on how to make it better.

One question: in the original issue (rust-lang/rust#110163 (comment)), it was suggested to mention how to download specific commit tarballs; however, it was said it's not documented anywhere, so I did not include that yet. If there is a want to have that, I'd gladly amend the commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. requires-custom-config This issue requires custom config/build for rustc in some way T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants