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 .../src/tools/cargo/Cargo.toml does not exist #119720

Open
th0ma7 opened this issue Jan 7, 2024 · 3 comments
Open

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

th0ma7 opened this issue Jan 7, 2024 · 3 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@th0ma7
Copy link

th0ma7 commented Jan 7, 2024

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 #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.

@th0ma7 th0ma7 added the C-bug Category: This is a bug. label Jan 7, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 7, 2024
@clubby789 clubby789 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 8, 2024
@chenyukang
Copy link
Member

what's the content of your config.toml?

@th0ma7
Copy link
Author

th0ma7 commented Jan 11, 2024

Here's a copy of it that got generated using the ./configure. What I noticed is that it defaults to profile = "dist" instead of compiler which is what I normally use for my usecases. Also note that post configure I must still add my cross-compiler details as I haven't found out how to do that automatically using the configure script:

# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `config.example.toml`).
profile = 'dist'

[llvm]

[build]

# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of these triples will
# be bootstrapped from the build triple themselves. In other words, this is the list of triples for
# which to build a library that can CROSS-COMPILE to that triple.
#
# Defaults to `host`. If you set this explicitly, you likely want to add all
# host triples to this list as well in order for those host toolchains to be
# able to compile programs for their native target.
target = ['powerpc-unknown-linux-gnuspe']

# Arguments passed to the `./configure` script, used during distcheck. You
# probably won't fill this in but rather it's filled in by the `./configure`
# script. Useful for debugging.
configure-args = ['--set', 'build.target=powerpc-unknown-linux-gnuspe']

[install]

[rust]

[target.x86_64-unknown-linux-gnu]

[target.powerpc-unknown-linux-gnuspe]
cc = "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-gcc"
cxx = "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-g++"
ar = "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-ar"
ranlib = "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-ranlib"
linker = "/home/spksrc/qoriq-debug/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-gcc"

[dist]

And my normal config file that does not trigger this:

profile = "compiler"

[build]
target = ["x86_64-unknown-linux-gnu", "powerpc-unknown-linux-gnuspe"]
build-stage = 1
doc-stage = 2
docs = false
docs-minification = false
compiler-docs = false

[rust]
channel = "stable"
lto = "off"

[llvm]
download-ci-llvm = "if-unchanged"

[install]

[dist]

[target.x86_64-unknown-linux-gnu]

[target.powerpc-unknown-linux-gnuspe]
cc = "/home/spksrc/qoriq-debug-update/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-gcc"
cxx = "/home/spksrc/qoriq-debug-update/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-g++"
ar = "/home/spksrc/qoriq-debug-update/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-ar"
ranlib = "/home/spksrc/qoriq-debug-update/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-ranlib"
linker = "/home/spksrc/qoriq-debug-update/spksrc/toolchain/syno-qoriq-6.2.4/work/powerpc-e500v2-linux-gnuspe/bin/powerpc-e500v2-linux-gnuspe-gcc"

@LuuuXXX
Copy link
Contributor

LuuuXXX commented Jan 12, 2024

This answer may be helpful when you download source as a zip package : #115041 (comment)

If the source code is obtained through git clone https://github.com/rust-lang/rust.git.
Perhaps the following command can help you update the submodule code:

git submodule update --init --recursive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. 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

5 participants