[Pkg-rust-maintainers] Bug#1011061: rustc: FTBFS on riscv64

Bo YU tsu.yubo at gmail.com
Mon May 16 12:14:01 BST 2022


Package: rustc
Version: 1.59.0+dfsg1-1
Severity: normal
Tags: ftbfs
User: debian-riscv at lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv at lists.debian.org, debian-rust at lists.debian.org

Dear Maintainer,

The rustc(1.59.0+dfsg1-1) has a ftbfs issue on riscv64,
The error log is(maybe this is not root casue):

```
[libc 0.2.112] cargo:rustc-cfg=libc_thread_local
   Compiling miniz_oxide v0.4.4
        Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=build_script_build CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>>/vendor/miniz_oxide CARGO_PKG_AUTHORS='Frommi <daniil.liferenko at gmail.com>:oyvindln <oyvindln at users.noreply.github.com>' CARGO_PKG_DESCRIPTION='DEFLATE compression and decompression library rewritten in Rust based on miniz' CARGO_PKG_HOMEPAGE='https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide' CARGO_PKG_LICENSE='MIT OR Zlib OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=miniz_oxide CARGO_PKG_REPOSITORY='https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide' CARGO_PKG_VERSION=0.4.4 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=4 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/deps:/usr/lib' /<<PKGBUILDDIR>>/build/bootstrap/debug/rustc --crate-name build_script_build --edition=2018 /<<PKGBUILDDIR>>/vendor/miniz_oxide/build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=0 -C debug-assertions=off --cfg 'feature="alloc"' --cfg 'feature="compiler_builtins"' --cfg 'feature="core"' --cfg 'feature="rustc-dep-of-std"' -C metadata=9098ffa9d2c9ecb0 -C extra-filename=-9098ffa9d2c9ecb0 --out-dir /<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/build/miniz_oxide-9098ffa9d2c9ecb0 -C linker=riscv64-linux-gnu-gcc -L dependency=/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/deps --extern autocfg=/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/deps/libautocfg-ae986f743d622078.rlib --cap-lints warn -Z binary-dep-depinfo`
             Running `/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/build/memchr-8f0abe7310bec7ef/build-script-build`
             Running `/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/build/std-073c0d125eff3104/build-script-build`
  [std 0.0.0] cargo:rerun-if-changed=build.rs
  [std 0.0.0] cargo:rustc-env=STD_ENV_ARCH=riscv64
  [std 0.0.0] cargo:rustc-cfg=backtrace_in_libstd
       Running `/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/release/build/miniz_oxide-9098ffa9d2c9ecb0/build-script-build`
       [miniz_oxide 0.4.4] error[E0463]: can't find crate for `std`
       [miniz_oxide 0.4.4]
       [miniz_oxide 0.4.4] error: aborting due to previous error
       [miniz_oxide 0.4.4]
       [miniz_oxide 0.4.4] For more information about this error, try `rustc --explain E0463`.
       [miniz_oxide 0.4.4]
       [miniz_oxide 0.4.4] Did not run successfully: exit status: 1
       [miniz_oxide 0.4.4] "/usr/bin/rustc" "--crate-name" "probe0" "--crate-type=lib" "--out-dir" "/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/riscv64gc-unknown-linux-gnu/release/build/miniz_oxide-3f6c078e745cfeb9/out" "--emit=llvm-ir" "--target" "riscv64gc-unknown-linux-gnu" "-" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "--sysroot" "/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-sysroot" "--remap-path-prefix" "/<<PKGBUILDDIR>>=/usr/src/rustc-1.59.0" "-Z" "force-unstable-if-unmarked"
...
[miniz_oxide 0.4.4] error[E0463]: can't find crate for `core`
[miniz_oxide 0.4.4]
[miniz_oxide 0.4.4] error: aborting due to previous error
[miniz_oxide 0.4.4]
[miniz_oxide 0.4.4] For more information about this error, try `rustc --explain E0463`.
[miniz_oxide 0.4.4]
[miniz_oxide 0.4.4] Did not run successfully: exit status: 1
[miniz_oxide 0.4.4] "/usr/bin/rustc" "--crate-name" "probe1" "--crate-type=lib" "--out-dir" "/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-std/riscv64gc-unknown-linux-gnu/release/build/miniz_oxide-3f6c078e745cfeb9/out" "--emit=llvm-ir" "--target" "riscv64gc-unknown-linux-gnu" "-" "-Wrust_2018_idioms" "-Wunused_lifetimes" "-Wsemicolon_in_expressions_from_macros" "--sysroot" "/<<PKGBUILDDIR>>/build/riscv64gc-unknown-linux-gnu/stage0-sysroot" "--remap-path-prefix" "/<<PKGBUILDDIR>>=/usr/src/rustc-1.59.0" "-Z" "force-unstable-if-unmarked"

...
XDG_SESSION_ID=4
XDG_SESSION_TYPE=unspecified
__CARGO_DEFAULT_LIB_METADATA=bootstrap
warning: `sharded-slab` (lib) generated 5 warnings
warning: `cc` (lib) generated 7 warnings (1 duplicate)
warning: `regex-syntax` (lib) generated 2 warnings
error: build failed
command did not execute successfully: "/usr/bin/cargo" "build" "--target" "riscv64gc-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "4" "-v" "-v" "--release" "--features" " llvm max_level_info" "--manifest-path" "/<<PKGBUILDDIR>>/compiler/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
expected success, got: exit status: 101
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/src/bootstrap/bootstrap.py", line 1328, in <module>
main()
File "/<<PKGBUILDDIR>>/src/bootstrap/bootstrap.py", line 1311, in main
bootstrap(help_triggered)
File "/<<PKGBUILDDIR>>/src/bootstrap/bootstrap.py", line 1297, in bootstrap
run(args, env=env, verbose=build.verbose, is_bootstrap=True)
File "/<<PKGBUILDDIR>>/src/bootstrap/bootstrap.py", line 182, in run
raise RuntimeError(err)
RuntimeError: failed to run: /<<PKGBUILDDIR>>/build/bootstrap/debug/bootstrap -j 4 build --stage 2 --config debian/config.toml --on-fail env
make[1]: *** [debian/rules:251: debian/dh_auto_build.stamp] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:175: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
```
The full log is here:
https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=riscv64&ver=1.59.0%2Bdfsg1-1&stamp=1652366563&raw=0

And I am looking at it but it will cast more time to see what happened.
and if need me to do some tests on real riscv64 boards, please let me know.

BR,
Bo



More information about the Pkg-rust-maintainers mailing list