I used mock to compile the rust source package and it failed, saying "the compiler unexpectedly panicked. this is a bug"

This is a mock compiled log error
Compiling xz2 v0.1.6
Compiling installer v0.0.0 (/builddir/build/BUILD/rustc-1.58.1-src/src/tools/rust-installer)
Finished release [optimized + debuginfo] target(s) in 16.61s
Dist rust-docs-1.58.1-aarch64-unknown-linux-gnu
Error: failed to generate installer

Caused by:
0: failed to copy '/builddir/build/BUILD/rustc-1.58.1-src/build/tmp/tarball/rust-docs/aarch64-unknown-linux-gnu/image/share/doc/rust/html/.lock' to '/builddir/build/BUILD/rustc-1.58.1-src/build/tmp/tarball/rust-docs/aarch64-unknown-linux-gnu/rust-docs-1.58.1-aarch64-unknown-linux-gnu/rust-docs/share/doc/rust/html/.lock'
1: Invalid argument (os error 22)

command did not execute successfully: "/builddir/build/BUILD/rustc-1.58.1-src/build/aarch64-unknown-linux-gnu/stage0-tools-bin/fabricate" "generate" "--image-dir" "/builddir/build/BUILD/rustc-1.58.1-src/build/tmp/tarball/rust-docs/aarch64-unknown-linux-gnu/image" "--component-name=rust-docs" "--bulk-dirs" "share/doc/rust/html" "--rel-manifest-dir=rustlib" "--legacy-manifest-dirs=rustlib,cargo" "--product-name=Rust Documentation" "--success-message=rust-docs installed." "--package-name=rust-docs-1.58.1-aarch64-unknown-linux-gnu" "--non-installed-overlay" "/builddir/build/BUILD/rustc-1.58.1-src/build/tmp/tarball/rust-docs/aarch64-unknown-linux-gnu/overlay" "--output-dir" "/builddir/build/BUILD/rustc-1.58.1-src/build/dist" "--work-dir" "/builddir/build/BUILD/rustc-1.58.1-src/build/tmp/tarball/rust-docs/aarch64-unknown-linux-gnu" "--compression-formats" "gz"
expected success, got: exit status: 1

Build completed unsuccessfully in 0:57:50
error: Bad exit status from /var/tmp/rpm-tmp.AEuFEa (%install)

This is more detailed information about the statements in the errant spec file that were executed after entering the chroot compilation environment

info: using vendored source, but .cargo/config is already present.
Reusing the current configuration file. But you may want to configure vendoring like this:
[source.crates-io]
replace-with = 'vendored-sources'
registry = 'https://example.com'

[source.vendored-sources]
directory = '/builddir/build/BUILD/rustc-1.58.1-src/vendor'

Finished dev [unoptimized] target(s) in 0.31s

thread 'main' panicked at 'failed to get current_exe: no /proc/self/exe available. Is /proc mounted?', compiler/rustc_session/src/filesearch.rs:120:23
stack backtrace:
0: 0xffffa3d1691c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he66f8d238b905f76
1: 0xffffa3d6dc7c - core::fmt::write::h743399f14fac5e26
2: 0xffffa3d07654 -
3: 0xffffa3d195e4 -
4: 0xffffa3d191a0 -
5: 0xffffa44387fc -
6: 0xffffa3d19de8 - std::panicking::rust_panic_with_hook::h6953e7848a489496
7: 0xffffa3d198e0 -
8: 0xffffa3d16dd4 -
9: 0xffffa3d1984c - rust_begin_unwind
10: 0xffffa3ce4cd8 - core::panicking::panic_fmt::h42acc96d3fb41272
11: 0xffffa65ad904 - rustc_session[655b00a29dfa847e]::filesearch::get_or_default_sysroot
12: 0xffffa65d20a0 - rustc_session[655b00a29dfa847e]::config::build_session_options
13: 0xffffa4432488 - <rustc_driver[10ed386a85e4608f]::RunCompiler>::run
14: 0xffffa4453508 -
15: 0xffffa4439a10 - rustc_driver[10ed386a85e4608f]::main
16: 0xaaaad70eea94 -
17: 0xaaaad70eea80 -
18: 0xaaaad70eea54 -
19: 0xffffa3d165a4 - std::rt::lang_start_internal::h156b5c5dcd4da2da
20: 0xaaaad70eeac4 -
21: 0xffffa3b2485c - __libc_start_main
22: 0xaaaad70ee974 -

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: Sign in to GitHub · GitHub

note: rustc 1.58.1 (Red Hat 1.58.1-1.module+an8.6.0+10685+b0dfaf8a) running on aarch64-unknown-linux-gnu

query stack during panic:
end of query stack
thread 'main' panicked at 'command did not execute successfully: "/usr/bin/rustc" "--target" "aarch64-unknown-linux-gnu" "--print" "target-libdir"
expected success, got: exit status: 101', src/bootstrap/lib.rs:376:13
stack backtrace:
0: 0xaaaae47ffee8 -
1: 0xaaaae4822d5c -
2: 0xaaaae47fa648 -
3: 0xaaaae4801ec0 -
4: 0xaaaae4801a7c -
5: 0xaaaae4802528 -
6: 0xaaaae480204c -
7: 0xaaaae48003a0 -
8: 0xaaaae4801fb8 -
9: 0xaaaae40c9e08 -
10: 0xaaaae47dc3bc -
11: 0xaaaae4151638 -
12: 0xaaaae40ca770 -
13: 0xaaaae40cb290 -
14: 0xaaaae40cad48 -
15: 0xaaaae40cb454 -
16: 0xaaaae47ffc18 -
17: 0xaaaae40cb430 -
18: 0xaaaae40cac84 -
19: 0xffff96a1485c - __libc_start_main
20: 0xaaaae40ca3e0 -
Build completed unsuccessfully in 0:00:00
bash-4.4#

There is no point posting this here. You should file a bug report on Github, the link is in your error message. Remember to provide a fully reproducing code example. Ideally you should minimize it, but if you don't, someone will do it later.

1 Like

ok,This is my first help post,