rust-lang / rust-lang/rust

error: manifest path `.../src/tools/cargo/Cargo.toml` does not exist

Open
#119,720 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I tried this code:

./configure --set build.target=powerpc-unknown-linux-gnuspe
./x build
Building bootstrap
    Finished dev [unoptimized] target(s) in 0.08s
error: manifest path `/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust-1.75.0/src/tools/cargo/Cargo.toml` does not exist
thread 'main' panicked at src/core/metadata.rs:86:31:
command did not execute successfully: RUSTC_BOOTSTRAP="1" "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust-1.75.0/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "metadata" "--format-version" "1" "--no-deps" "--manifest-path" "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/rust-1.75.0/src/tools/cargo/Cargo.toml"
expected success, got: exit status: 101

Behavior somehow changed recently where src/tools/cargo directory is now empty in both online tar.gz source file as well as using a git clone https://github.com/rust-lang/rust.git, thus failing at build time due to missing Cargo.toml from the cargo directory.

This looks similar to https://github.com/rust-lang/rust/issues/115041 whereas invoking submodule init & update does populate the cargo directory at the expense of more than 4GB extra storage (not mentionning the build overhead time).

git submodule init
git submodule update

Note that this wasn't hapening using git clone as of last october.

EDIT: it seems that using git submodule init && git submodule update src/tools/cargo does the trick at populating only that subdirectory.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with ./configure --set build.target=powerpc-unknown-linux-gnuspe followed by ./x build, focusing on the missing src/tools/cargo/Cargo.toml and the src/tools/cargo submodule. Compare a source archive or clone with git submodule init && git submodule update src/tools/cargo; done should identify the expected source layout and provide a build path that does not require unnecessary submodules.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.