Skip to content

Native bootstrap for RISC-V on Gentoo Linux (failure) #83970

Closed
@dlan17

Description

@dlan17

Trying to do the native rust bootstrap on Gentoo Linux for RISC-V ARCH, but fail at 'compiler_builtins' crate.

I tried this code:
both tried & failed for rust-1.50.0 and 1.51.0, same error

the downstream bug report can be found here:
https://bugs.gentoo.org/747460

the full build log for 1.51.0:
https://bugs.gentoo.org/attachment.cgi?id=698247

any suggestion for how I could further debug this? or could someone shed some lights on this ..

==== snip of error logs ===

Did not run successfully: signal: 11
rustc exited with signal: 11
"/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1/bin/rustc" "--crate-name" "compiler_builtins" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/vendor/compiler_bui
ltins/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "codegen-units=10000" "-C" "debuginfo=0" "--cfg" "f
eature=\"c\"" "--cfg" "feature=\"cc\"" "--cfg" "feature=\"compiler-builtins\"" "--cfg" "feature=\"core\"" "--cfg" "feature=\"default\"" "--cfg" "feature=\"rustc-dep-of-std\"" "-C" "metadata=bd9daff102317ab4" "-C" "extra-filename=-bd9daf
f102317ab4" "--out-dir" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps" "--target" "riscv64gc-unknown-linux-gnu" "-C" "linker=riscv6
4-unknown-linux-gnu-gcc" "-L" "dependency=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps" "-L" "dependency=/var/notmpfs/portage/dev-l
ang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/release/deps" "--extern" "core=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unk
nown-linux-gnu/release/deps/librustc_std_workspace_core-154d9dce115223e5.rmeta" "--cap-lints" "allow" "-Zmacro-backtrace" "-Zsave-analysis" "-Cprefer-dynamic" "-Cembed-bitcode=yes" "-Cforce-unwind-tables=yes" "-Z" "binary-dep-depinfo" "
-L" "native=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/build/compiler_builtins-dee9282c2b696383/out" "--cfg" "feature=\"unstable\"" "-
-cfg" "__absvdi2=\"optimized-c\"" "--cfg" "__absvsi2=\"optimized-c\"" "--cfg" "__absvti2=\"optimized-c\"" "--cfg" "__addvdi3=\"optimized-c\"" "--cfg" "__addvsi3=\"optimized-c\"" "--cfg" "__addvti3=\"optimized-c\"" "--cfg" "__clzdi2=\"op
timized-c\"" "--cfg" "__clzsi2=\"optimized-c\"" "--cfg" "__clzti2=\"optimized-c\"" "--cfg" "__cmpdi2=\"optimized-c\"" "--cfg" "__cmpti2=\"optimized-c\"" "--cfg" "__ctzdi2=\"optimized-c\"" "--cfg" "__ctzsi2=\"optimized-c\"" "--cfg" "__ct
zti2=\"optimized-c\"" "--cfg" "__divdc3=\"optimized-c\"" "--cfg" "__divsc3=\"optimized-c\"" "--cfg" "__divxc3=\"optimized-c\"" "--cfg" "__extendhfsf2=\"optimized-c\"" "--cfg" "__ffsti2=\"optimized-c\"" "--cfg" "__int_util=\"optimized-c\
"" "--cfg" "__muldc3=\"optimized-c\"" "--cfg" "__mulsc3=\"optimized-c\"" "--cfg" "__mulvdi3=\"optimized-c\"" "--cfg" "__mulvsi3=\"optimized-c\"" "--cfg" "__mulvti3=\"optimized-c\"" "--cfg" "__mulxc3=\"optimized-c\"" "--cfg" "__negdf2=\"
optimized-c\"" "--cfg" "__negdi2=\"optimized-c\"" "--cfg" "__negsf2=\"optimized-c\"" "--cfg" "__negti2=\"optimized-c\"" "--cfg" "__negvdi2=\"optimized-c\"" "--cfg" "__negvsi2=\"optimized-c\"" "--cfg" "__negvti2=\"optimized-c\"" "--cfg" 
"__paritydi2=\"optimized-c\"" "--cfg" "__paritysi2=\"optimized-c\"" "--cfg" "__parityti2=\"optimized-c\"" "--cfg" "__popcountdi2=\"optimized-c\"" "--cfg" "__popcountsi2=\"optimized-c\"" "--cfg" "__popcountti2=\"optimized-c\"" "--cfg" "_
_powixf2=\"optimized-c\"" "--cfg" "__subvdi3=\"optimized-c\"" "--cfg" "__subvsi3=\"optimized-c\"" "--cfg" "__subvti3=\"optimized-c\"" "--cfg" "__truncdfhf2=\"optimized-c\"" "--cfg" "__truncdfsf2=\"optimized-c\"" "--cfg" "__truncsfhf2=\"
optimized-c\"" "--cfg" "__ucmpdi2=\"optimized-c\"" "--cfg" "__ucmpti2=\"optimized-c\"" "--cfg" "apple_versioning=\"optimized-c\"" "-l" "static=compiler-rt" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Dwarnings" "--sysroot" "/var/notmpfs
/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1" "-C" "panic=abort" "--remap-path-prefix" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src=/rustc/1.51.0" "-Z" "force-unstable-
if-unmarked"
-------------
error: could not compile `compiler_builtins`

Caused by:
  process didn't exit successfully: `/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/bootstrap/debug/rustc --crate-name compiler_builtins /var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/vendor/compi
ler_builtins/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C codegen-units=10000 -C debuginfo=0 --cfg 'feature="c"' --cfg 'fea
ture="cc"' --cfg 'feature="compiler-builtins"' --cfg 'feature="core"' --cfg 'feature="default"' --cfg 'feature="rustc-dep-of-std"' -C metadata=bd9daff102317ab4 -C extra-filename=-bd9daff102317ab4 --out-dir /var/notmpfs/portage/dev-lang/
rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps --target riscv64gc-unknown-linux-gnu -C linker=riscv64-unknown-linux-gnu-gcc -L dependency=/var/notmpfs/portage/dev-
lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps -L dependency=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/release/deps --extern core=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps/librustc_std_workspace_core-154d9dce115223e5.rmeta --cap-lints allow -Zmacro-backtrace -Zsave-analysis -Cprefer-dynamic -Cembed-bitcode=yes -Cforce-unwind-tables=yes -Z binary-dep-depinfo -L native=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/build/compiler_builtins-dee9282c2b696383/out --cfg 'feature="unstable"' --cfg '__absvdi2="optimized-c"' --cfg '__absvsi2="optimized-c"' --cfg '__absvti2="optimized-c"' --cfg '__addvdi3="optimized-c"' --cfg '__addvsi3="optimized-c"' --cfg '__addvti3="optimized-c"' --cfg '__clzdi2="optimized-c"' --cfg '__clzsi2="optimized-c"' --cfg '__clzti2="optimized-c"' --cfg '__cmpdi2="optimized-c"' --cfg '__cmpti2="optimized-c"' --cfg '__ctzdi2="optimized-c"' --cfg '__ctzsi2="optimized-c"' --cfg '__ctzti2="optimized-c"' --cfg '__divdc3="optimized-c"' --cfg '__divsc3="optimized-c"' --cfg '__divxc3="optimized-c"' --cfg '__extendhfsf2="optimized-c"' --cfg '__ffsti2="optimized-c"' --cfg '__int_util="optimized-c"' --cfg '__muldc3="optimized-c"' --cfg '__mulsc3="optimized-c"' --cfg '__mulvdi3="optimized-c"' --cfg '__mulvsi3="optimized-c"' --cfg '__mulvti3="optimized-c"' --cfg '__mulxc3="optimized-c"' --cfg '__negdf2="optimized-c"' --cfg '__negdi2="optimized-c"' --cfg '__negsf2="optimized-c"' --cfg '__negti2="optimized-c"' --cfg '__negvdi2="optimized-c"' --cfg '__negvsi2="optimized-c"' --cfg '__negvti2="optimized-c"' --cfg '__paritydi2="optimized-c"' --cfg '__paritysi2="optimized-c"' --cfg '__parityti2="optimized-c"' --cfg '__popcountdi2="optimized-c"' --cfg '__popcountsi2="optimized-c"' --cfg '__popcountti2="optimized-c"' --cfg '__powixf2="optimized-c"' --cfg '__subvdi3="optimized-c"' --cfg '__subvsi3="optimized-c"' --cfg '__subvti3="optimized-c"' --cfg '__truncdfhf2="optimized-c"' --cfg '__truncdfsf2="optimized-c"' --cfg '__truncsfhf2="optimized-c"' --cfg '__ucmpdi2="optimized-c"' --cfg '__ucmpti2="optimized-c"' --cfg 'apple_versioning="optimized-c"' -l static=compiler-rt` (exit code: 254)
warning: build failed, waiting for other jobs to finish...

Did not run successfully: signal: 11
rustc exited with signal: 11
"/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1/bin/rustc" "--crate-name" "libc" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/vendor/libc/src/lib.rs" "--error-format=json" "--json=diagnostic-rendered-ansi,artifacts" "--crate-type" "lib" "--emit=dep-info,metadata,link" "-C" "opt-level=3" "-C" "embed-bitcode=no" "-C" "codegen-units=1" "-C" "debuginfo=0" "--cfg" "feature=\"align\"" "--cfg" "feature=\"rustc-dep-of-std\"" "--cfg" "feature=\"rustc-std-workspace-core\"" "-C" "metadata=043964802a47f292" "-C" "extra-filename=-043964802a47f292" "--out-dir" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps" "--target" "riscv64gc-unknown-linux-gnu" "-C" "linker=riscv64-unknown-linux-gnu-gcc" "-L" "dependency=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps" "-L" "dependency=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/release/deps" "--extern" "rustc_std_workspace_core=/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1-std/riscv64gc-unknown-linux-gnu/release/deps/librustc_std_workspace_core-154d9dce115223e5.rmeta" "--cap-lints" "allow" "-Zmacro-backtrace" "-Zsave-analysis" "-Cprefer-dynamic" "-Cembed-bitcode=yes" "-Cforce-unwind-tables=yes" "-Z" "binary-dep-depinfo" "--cfg" "freebsd11" "--cfg" "libc_priv_mod_use" "--cfg" "libc_union" "--cfg" "libc_const_size_of" "--cfg" "libc_align" "--cfg" "libc_core_cvoid" "--cfg" "libc_packedN" "--cfg" "libc_cfg_target_vendor" "--cfg" "libc_thread_local" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Dwarnings" "--sysroot" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src/build/riscv64gc-unknown-linux-gnu/stage1" "--remap-path-prefix" "/var/notmpfs/portage/dev-lang/rust-1.51.0/work/rustc-1.51.0-src=/rustc/1.51.0" "-Z" "force-unstable-if-unmarked"

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-linuxOperating system: LinuxO-riscvTarget: RISC-V architectureT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions