Summary: | dev-lang/rust-1.67.1: build failure on sparc | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | Georgy Yakovlev <gyakovlev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matoro_bugzilla_gentoo, rust, sparc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | Sparc64 | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=907426 https://github.com/rust-lang/rust/issues/108117 https://github.com/rust-lang/rust/issues/108426 https://bugs.gentoo.org/show_bug.cgi?id=909531 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log.xz
rust-1.67.1-update-io-lifetimes-sparc.patch build.log.xz (with io-lifetimes patch applied, panics) |
Description
Sam James
2023-02-12 04:36:15 UTC
rust-1.66.1 built OK earlier today still, but 1.67.1 still fails: ``` Compiling thread_local v1.1.4 Running `CARGO=/usr/lib/rust/1.66.1/bin/cargo CARGO_CRATE_NAME=thread_local CARGO_MANIFEST_DIR=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/thread_local CARGO_PKG_AUTHORS='Amanieu d '\''Antras <amanieu@gmail.com>' CARGO_PKG_DESCRIPTION='Per-object thread-local storage' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=Apache-2.0/MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=thread_local CARGO_PKG_R EPOSITORY='https://github.com/Amanieu/thread_local-rs' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=1.1.4 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps:/usr/lib/rust/1.66.1/lib:' /usr/lib/rust/1.66.1/bin/rustc --crate-name thread_local --edition=2018 /var/ tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/thread_local/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,li nk -C embed-bitcode=no -C debuginfo=0 -C metadata=26710c566bab6db7 -C extra-filename=-26710c566bab6db7 --out-dir /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps -L depen dency=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps --extern once_cell=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps/libonce_c ell-6a5aeca511d94c84.rmeta --cap-lints warn -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings` Running `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/build/serde-4e0a2a0cb6ca93a4/build-script-build` [io-lifetimes 1.0.1] error[E0554]: `#![feature]` may not be used on the stable release channel [io-lifetimes 1.0.1] --> <anon>:1:1 [io-lifetimes 1.0.1] | [syn 1.0.102] cargo:rustc-cfg=syn_disable_nightly_tests [io-lifetimes 1.0.1] 1 | #![feature(rustc_attrs)] [io-lifetimes 1.0.1] | ^^^^^^^^^^^^^^^^^^^^^^^^ [io-lifetimes 1.0.1] [io-lifetimes 1.0.1] error: aborting due to previous error [io-lifetimes 1.0.1] [io-lifetimes 1.0.1] For more information about this error, try `rustc --explain E0554`. Running `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/build/crossbeam-utils-9ff9d7466bcba17e/build-script-build` [crossbeam-utils 0.8.14] cargo:rerun-if-changed=no_atomic.rs Running `CARGO=/usr/lib/rust/1.66.1/bin/cargo CARGO_CRATE_NAME=crossbeam_utils CARGO_MANIFEST_DIR=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/crossbeam-utils CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='Utilities for concurrent programming' CARGO_PKG_HOMEPAGE='https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-utils' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=crossbeam-utils CARGO_PKG_REPOSITORY='https://github.com/crossbeam-rs/crossbeam' CARGO_PKG_RUST_VERSION=1.38 CARGO_PKG_VERSION=0.8.14 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=8 CARGO_PKG_VERSION_PATCH=14 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps:/usr/lib/rust/1.66.1/lib:' OUT_DIR=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/build/crossbeam-utils-6052ffd12f39f54e/out /usr/lib/rust/1.66.1/bin/rustc --crate-name crossbeam_utils --edition=2018 /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/crossbeam-utils/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=0 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=9194386cfaa21414 -C extra-filename=-9194386cfaa21414 --out-dir /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps -L dependency=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps --extern cfg_if=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/deps/libcfg_if-9aa51f748880c7c0.rmeta --cap-lints warn -Wrust_2018_idioms -Wunused_lifetimes -Wsemicolon_in_expressions_from_macros -Dwarnings` Running `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/build/proc-macro2-8af358632bd2dc12/build-script-build` [proc-macro2 1.0.46] cargo:rerun-if-changed=build.rs [io-lifetimes 1.0.1] error[E0554]: `#![feature]` may not be used on the stable release channel [io-lifetimes 1.0.1] --> <anon>:1:12 [io-lifetimes 1.0.1] | [io-lifetimes 1.0.1] 1 | #![feature(wasi_ext)] [io-lifetimes 1.0.1] | ^^^^^^^^ [io-lifetimes 1.0.1] [io-lifetimes 1.0.1] error[E0635]: unknown feature `wasi_ext` [io-lifetimes 1.0.1] --> <anon>:1:12 [io-lifetimes 1.0.1] | [io-lifetimes 1.0.1] 1 | #![feature(wasi_ext)] [io-lifetimes 1.0.1] | ^^^^^^^^ [io-lifetimes 1.0.1] Running `/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/bootstrap/debug/build/serde_json-90e04f238a2768f1/build-script-build` [io-lifetimes 1.0.1] error: aborting due to 2 previous errors [io-lifetimes 1.0.1] ``` I think we need: 1. https://github.com/sunfishcode/io-lifetimes/commit/7836dafaeeb5ec172a309ac1e5a0a6e45c3592fc 2. https://github.com/sunfishcode/io-lifetimes/commit/105d597e998bc986455e4d1dfe8e5a27aa72af60 Created attachment 864001 [details, diff] rust-1.67.1-update-io-lifetimes-sparc.patch With the attached rust-1.67.1-update-io-lifetimes-sparc.patch, I can get further, but Rust then panics during the build. It panics while building 'typenum': """ Running `CARGO=/usr/lib/rust/1.66.1/bin/cargo CARGO_CRATE_NAME=typenum CARGO_MANIFEST_DIR=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/typenum CARGO_PKG_AUTHORS='Paho Lurie-Gregg <p aho@paholg.com>:Andre Bogus <bogusandre@gmail.com>' CARGO_PKG_DESCRIPTION='Typenum is a Rust library for type-level numbers evaluated at compile time. It currently supports bits, unsigned integers, and signed integers. It also provides a type-level array of type-level numbers, but its implementation is incomplete.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=typenum CARGO_PKG_REPOSITORY='https://github.com/paholg/typenum' CARGO_P KG_RUST_VERSION=1.37.0 CARGO_PKG_VERSION=1.16.0 CARGO_PKG_VERSION_MAJOR=1 CARGO_PKG_VERSION_MINOR=16 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/tmp/portage/dev-lang/rust-1.67.1/w ork/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/release/deps:/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2/lib' OUT_DIR=/var/tmp/portage/ dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/sparc64-unknown-linux-gnu/release/build/typenum-4caef7fd8c5b580d/out TYPENUM_BUILD_CONSTS=/var/tmp/portage/dev-lang/rust -1.67.1/work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/sparc64-unknown-linux-gnu/release/build/typenum-4caef7fd8c5b580d/out/consts.rs TYPENUM_BUILD_OP=/var/tmp/portage/dev-lang/rust-1.67.1 /work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/sparc64-unknown-linux-gnu/release/build/typenum-4caef7fd8c5b580d/out/op.rs /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build /bootstrap/debug/rustc --crate-name typenum --edition=2018 /var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/vendor/typenum/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,f uture-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Zunstable-options --check-cfg 'values(feature, "const-generics", "force_unix_path_separator", " i128", "no_std", "scale-info", "scale_info", "strict")' --check-cfg 'names()' --check-cfg 'values()' -C metadata=e29679aa90b52506 -C extra-filename=-e29679aa90b52506 --out-dir /var/tmp/portage/dev-lang/rust-1 .67.1/work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/sparc64-unknown-linux-gnu/release/deps --target sparc64-unknown-linux-gnu -C linker=sparc64-unknown-linux-gnu-gcc -L dependency=/var/tm p/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-src/build/sparc64-unknown-linux-gnu/stage2-tools/sparc64-unknown-linux-gnu/release/deps -L dependency=/var/tmp/portage/dev-lang/rust-1.67.1/work/rustc-1.67.1-s rc/build/sparc64-unknown-linux-gnu/stage2-tools/release/deps --cap-lints warn -Csymbol-mangling-version=v0 -Zunstable-options '--check-cfg=values(bootstrap)' '--check-cfg=values(parallel_compiler)' '--check-c fg=values(release)' '--check-cfg=values(no_btreemap_remove_entry)' '--check-cfg=values(crossbeam_loom)' '--check-cfg=values(span_locations)' '--check-cfg=values(rustix_use_libc)' -Zmacro-backtrace -Csplit-deb uginfo=off -Z binary-dep-depinfo` warning: `log` (lib) generated 13 warnings warning: `ryu` (lib) generated 28 warnings thread 'rustc' panicked at 'expected expression', compiler/rustc_expand/src/base.rs:176:18 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: <rustc_expand::base::Annotatable>::expect_expr 3: <rustc_expand::expand::AstFragmentKind>::expect_from_annotatables::<alloc::vec::Vec<rustc_expand::base::Annotatable>> 4: <rustc_expand::expand::MacroExpander>::fully_expand_fragment 5: <rustc_expand::expand::MacroExpander>::expand_crate 6: <rustc_session::session::Session>::time::<core::result::Result<rustc_ast::ast::Crate, rustc_errors::ErrorGuaranteed>, rustc_interface::passes::configure_and_expand::{closure#1}> 7: rustc_interface::passes::configure_and_expand 8: <rustc_interface::queries::Queries>::expansion 9: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorGuar anteed>> 10: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run _compiler::{closure#1}>::{closure#0}::{closure#0}> 11: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorGuaranteed>, rustc_driver::run_compiler::{closure#1}>::{cl osure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.67.1 (d5a82bbd2 2023-02-07) (gentoo) running on sparc64-unknown-linux-gnu note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -Z unstable-options -C linker=sparc64-unknown-linux-gnu-gcc -C symbol-mangling-version=v0 -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -Z binary-dep-depinfo -Z tls-model=initial-exec note: some of the compiler flags provided by cargo are hidden query stack during panic: end of query stack """ (In reply to Sam James from comment #2) > Created attachment 864001 [details, diff] [details, diff] > rust-1.67.1-update-io-lifetimes-sparc.patch > > With the attached rust-1.67.1-update-io-lifetimes-sparc.patch, I can get > further, but Rust then panics during the build. > > It panics while building 'typenum': 1. https://github.com/rust-lang/rust/issues/108117 2. https://github.com/rust-lang/rust/issues/108426 (especially https://github.com/rust-lang/rust/issues/108426#issuecomment-1485903975) I've no idea yet what this actually means (not looked into it at all) - sounds like we're maybe doing an extra stage of bootstap which upstream don't recommend/test regularly? Someone in the latter bug (2.) does mention https://github.com/rust-lang/rust/commit/2f9f097cb8b6c27a7e0d7a916e6911fc1f5ecd81 fixes it... Created attachment 864002 [details]
build.log.xz (with io-lifetimes patch applied, panics)
I just tested, that commit is right on the money and does the trick perfectly. $ rustc --version --verbose rustc 1.67.1 (d5a82bbd2 2023-02-07) (gentoo) binary: rustc commit-hash: d5a82bbd26e1ad8b7401f6a718a9c57c96905483 commit-date: 2023-02-07 host: sparc64-unknown-linux-gnu release: 1.67.1 LLVM version: 15.0.7 Will try and work my way up to current rust now. since this commit is in 1.68.0 already I guess we only need it in 1.67.1 and create missing -bin tarballs. I'll try adding/testing it on 1.67.1 asap too on catbus. catbus /var/db/repos/gentoo/dev-lang/rust # rustc -Vv rustc 1.67.1 (d5a82bbd2 2023-02-07) (gentoo) binary: rustc commit-hash: d5a82bbd26e1ad8b7401f6a718a9c57c96905483 commit-date: 2023-02-07 host: sparc64-unknown-linux-gnu release: 1.67.1 LLVM version: 15.0.6 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7326a8be2705cb45c516f5ec8ef034a19d7d2a1 commit c7326a8be2705cb45c516f5ec8ef034a19d7d2a1 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2023-06-20 19:50:15 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2023-06-20 19:50:46 +0000 dev-lang/rust-bin: keyword 1.67.1-r2 for ~sparc Bug: https://bugs.gentoo.org/893996 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust-bin/Manifest | 1 + dev-lang/rust-bin/rust-bin-1.67.1-r2.ebuild | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c7f958559b2c7561e95f915b7ed287a56333361 commit 3c7f958559b2c7561e95f915b7ed287a56333361 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2023-06-20 18:18:58 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2023-06-20 19:50:46 +0000 dev-lang/rust: add 1.67.1 patch for sparc build failures Bug: https://bugs.gentoo.org/893996 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust/files/1.67.1-rustc_expand.patch | 1427 ++++++++++++++++++++ .../{rust-1.67.1.ebuild => rust-1.67.1-r1.ebuild} | 1 + 2 files changed, 1428 insertions(+) thanks for finding commit btw! I tried combined patch before for io-lifetimes too, no dice obviously. catbus ~ # rustc -Vv rustc 1.68.2 (9eb3afe9e 2023-03-27) (gentoo) binary: rustc commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0 commit-date: 2023-03-27 host: sparc64-unknown-linux-gnu release: 1.68.2 LLVM version: 15.0.6 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4149cdfd8bc8e520f7ee6ef2611d58ce2fd8517 commit b4149cdfd8bc8e520f7ee6ef2611d58ce2fd8517 Author: Georgy Yakovlev <gyakovlev@gentoo.org> AuthorDate: 2023-06-20 21:15:57 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2023-06-20 21:16:21 +0000 dev-lang/rust-bin: keyword 1.68.2-r1 for ~sparc Bug: https://bugs.gentoo.org/893996 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> dev-lang/rust-bin/Manifest | 1 + dev-lang/rust-bin/rust-bin-1.68.2-r1.ebuild | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) ok we are past that failure. closing. if we encounter another one - it will be a new bug. hopefully bootstrap until 1.70.0 is clear. thanks again for finding exact commit. |