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

error: manifest path /public/home/litz/mysw/rust-31032ecb1550a402a726e9c244f6a716b214cc9d/src/tools/cargo/Cargo.toml does not exist #115041

Closed
lukin35 opened this issue Aug 21, 2023 · 3 comments
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@lukin35
Copy link

lukin35 commented Aug 21, 2023

here are what I have done to install rust from source, and I am new in rust. can someone offer me some help about this error and give me detailed instruction on how to install rust from source correctly?

  1. I download the zip file to /public/home/litz/mysw
  2. unzip the zip file in the same dir
  3. cd ./rust-31032ecb1550a402a726e9c244f6a716b214cc9d
  4. ./configure --set install.prefix=/public/home/litz/mysw/rust
  5. ./x.py build && ./x.py install
  6. exit with the error
error: manifest path `/public/home/likun/mysw/rust-31032ecb1550a402a726e9c244f6a716b214cc9d/src/tools/cargo/Cargo.toml` does not exist
thread 'main' panicked at 'command did not execute successfully: RUSTC_BOOTSTRAP="1" "/public/home/litz/mysw/rust-31032ecb1550a402a726e9c244f6a716b214cc9d/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "metadata" "--format-version" "1" "--no-deps" "--manifest-path" "/public/home/litz/mysw/rust-31032ecb1550a402a726e9c244f6a716b214cc9d/src/tools/cargo/Cargo.toml"
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 21, 2023
@jmintb
Copy link
Contributor

jmintb commented Aug 21, 2023

I think I am hitting the same issue, running git bisect.

Edit: nevermind I missread the issue.

@gemesa
Copy link

gemesa commented Aug 29, 2023

i see that you downloaded the repo as a .zip, i suggest cloning it and checking out the submodules, then try again (i encountered a similar error message and checking out the submodules solved my issues):

git clone https://github.com/rust-lang/rust.git
git submodule init
git submodule update

@fmease fmease added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 30, 2023
@onur-ozkan
Copy link
Member

It seems like you are downloading the source as a zip file without using Git. During the bootstrapping, we fetch the submodules before invoking Cargo on those paths. However, in your case, since your source doesn't have Git, you don't get the submodules. We should definitely provide better error message for such situations. Thanks for reporting this!

How to install rust from source correctly?

If you haven't read, there is https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html?highlight=build#get-the-source-code.

If you don't want to use git, then you can download dist tarballs from static.rust-lang.org(e.g., wget "https://static.rust-lang.org/dist/2023-08-24/rustc-1.72.0-src.tar.xz) which includes submodules out of the box(so you don't need to fetch them with git).

@onur-ozkan onur-ozkan removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 30, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 1, 2023
…lubby789

warn if source is not either a git clone or a dist tarball

When the repository is downloaded directly via HTTP(as in rust-lang#115041), builds may fail due to missing submodules.

This PR adds a check that warns people in such cases.
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 1, 2023
Rollup merge of rust-lang#116292 - onur-ozkan:warn-wrong-sources, r=clubby789

warn if source is not either a git clone or a dist tarball

When the repository is downloaded directly via HTTP(as in rust-lang#115041), builds may fail due to missing submodules.

This PR adds a check that warns people in such cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

6 participants