Skip to content

Cross-compile bootstrap doesn't generating any library files on 1.89.0 #146475

@OctopusET

Description

@OctopusET

Summary

From 1.89.0

rustc-src/build/$HOST/stage0-sysroot/lib/rustlib/$TARGET/lib

is empty.
I tested with 1.87.0 and 1.88,0, and they are generating correct files.

Command used

python x.py build -vv --config bootstrap.toml -j16 library/std --stage 0

Expected behaviour

It should generate files like these:

$ ls -agGlR build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu:
total 0
drwxr-xr-x 1   12 Sep 13 00:56 .
drwxr-xr-x 1  126 Sep 13 00:56 ..
drwxr-xr-x 1   86 Sep 13 00:56 bin
drwxr-xr-x 1 1466 Sep 13 00:56 lib

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu/bin:
total 16220
drwxr-xr-x 1       86 Sep 13 00:56 .
drwxr-xr-x 1       12 Sep 13 00:56 ..
drwxr-xr-x 1       58 Sep 13 00:56 gcc-ld
-rwxr-xr-x 2 10957464 Sep 13 00:54 rust-lld
-rwxr-xr-x 2   276424 Sep 13 00:54 rust-objcopy
-rwxr-xr-x 2  5369048 Sep 13 00:54 wasm-component-ld

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu/bin/gcc-ld:
total 1536
drwxr-xr-x 1     58 Sep 13 00:56 .
drwxr-xr-x 1     86 Sep 13 00:56 ..
-rwxr-xr-x 2 390136 Sep 13 00:54 ld64.lld
-rwxr-xr-x 2 390136 Sep 13 00:54 ld.lld
-rwxr-xr-x 2 390136 Sep 13 00:54 lld-link
-rwxr-xr-x 2 390136 Sep 13 00:54 wasm-ld

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu/lib:
total 84480
drwxr-xr-x 1     1466 Sep 13 00:56 .
drwxr-xr-x 1       12 Sep 13 00:56 ..
-rw-r--r-- 2   459324 Sep 13 00:56 libaddr2line-0d486d2adbd3a7d4.rlib
-rw-r--r-- 2    24238 Sep 13 00:56 libadler2-3886bbae4bd2704d.rlib
-rw-r--r-- 2  6556456 Sep 13 00:56 liballoc-f736fa0faf9a8e93.rlib
-rw-r--r-- 2     7246 Sep 13 00:56 libcfg_if-9816dc4df3995804.rlib
-rw-r--r-- 2  2921164 Sep 13 00:56 libcompiler_builtins-421bcd84244c992e.rlib
-rw-r--r-- 2 36400606 Sep 13 00:56 libcore-15a0e291851d9315.rlib
-rw-r--r-- 2  5651218 Sep 13 00:56 libgimli-e0cb720b0d91900d.rlib
-rw-r--r-- 2  1411100 Sep 13 00:56 libhashbrown-f51e753218f948d0.rlib
-rw-r--r-- 2  3566426 Sep 13 00:56 liblibc-807ae4c2b4f7e80d.rlib
-rw-r--r-- 2   600822 Sep 13 00:56 libmemchr-0ac3470a7dfeecfa.rlib
-rw-r--r-- 2   181462 Sep 13 00:56 libminiz_oxide-37c63ba91f9fa961.rlib
-rw-r--r-- 2  8215310 Sep 13 00:56 libobject-7ab1db9ab9342c65.rlib
-rw-r--r-- 2     7104 Sep 13 00:56 libpanic_abort-9053dca64fff9b71.rlib
-rw-r--r-- 2    17138 Sep 13 00:56 libpanic_unwind-e11db45f9e85b7b5.rlib
-rw-r--r-- 2   225196 Sep 13 00:56 librustc_demangle-c1082308c2c99095.rlib
-rw-r--r-- 2     3700 Sep 13 00:56 librustc_std_workspace_alloc-2d5888dde1d8ce21.rlib
-rw-r--r-- 2     6874 Sep 13 00:56 librustc_std_workspace_core-ea90b7c7ecb4b15f.rlib
-rw-r--r-- 2   305498 Sep 13 00:56 libstd_detect-9528e64cfa658354.rlib
-rw-r--r-- 3 10127560 Sep 13 00:56 libstd-f52d6ae6aa37f247.rlib
-rwxr-xr-x 3  9763480 Sep 13 00:56 libstd-f52d6ae6aa37f247.so
-rw-r--r-- 2    24478 Sep 13 00:56 libunwind-5d5b0fc0d5ba42b3.rlib
drwxr-xr-x 1        0 Sep 13 00:56 self-contained

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu/lib/self-contained:
total 0
drwxr-xr-x 1    0 Sep 13 00:56 .
drwxr-xr-x 1 1466 Sep 13 00:56 ..

Actual behaviour

Nada

$ ls -agGlR build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu:
total 0
drwxr-xr-x 1   6 Sep 13 00:46 .
drwxr-xr-x 1 814 Sep 13 00:46 ..
drwxr-xr-x 1   0 Sep 13 00:46 lib

build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/riscv64gc-unknown-linux-gnu/lib:
total 0
drwxr-xr-x 1 0 Sep 13 00:46 .
drwxr-xr-x 1 6 Sep 13 00:46 ..

Bootstrap configuration (bootstrap.toml)

[build]
build = "x86_64-unknown-linux-gnu"
host = ["x86_64-unknown-linux-gnu"]
target = ["riscv64gc-unknown-linux-gnu"]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
submodules = false
python = "python3.13"
locked-deps = true
vendor = true
extended = true
verbose = 2
cargo-native-static = false
[install]
prefix = "/usr/lib/rust-std/1.89.0"
sysconfdir = "etc"
docdir = "share/doc/rust"
bindir = "bin"
libdir = "lib"
mandir = "share/man"
[rust]
# https://github.com/rust-lang/rust/issues/54872
codegen-units-std = 1
optimize = true
debug = false
debug-assertions = false
debuginfo-level-rustc = 0
backtrace = true
incremental = false
default-linker = "x86_64-unknown-linux-gnu-gcc"
rpath = false
dist-src = false
remap-debuginfo = true
jemalloc = false
[dist]
src-tarball = false
[target.riscv64gc-unknown-linux-gnu]
ar = "riscv64-linux-gnu-ar"
cc = "riscv64-linux-gnu-gcc"
cxx = "riscv64-linux-gnu-g++"
linker = "riscv64-linux-gnu-gcc"
ranlib = "riscv64-linux-gnu-ranlib"

Operating system

HEAD

2948388

Additional context

https://users.rust-lang.org/t/stage-0-bootstrap-doesnt-make-any-files-for-target/133859
https://bugs.gentoo.org/962786

Build Log

<log>

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions