Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893996 - dev-lang/rust-1.67.1: build failure on sparc
Summary: dev-lang/rust-1.67.1: build failure on sparc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-12 04:36 UTC by Sam James
Modified: 2023-07-02 16:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,280.01 KB, application/x-xz)
2023-02-12 04:36 UTC, Sam James
Details
rust-1.67.1-update-io-lifetimes-sparc.patch (file_893996.txt,26.27 KB, patch)
2023-06-17 04:12 UTC, Sam James
Details | Diff
build.log.xz (with io-lifetimes patch applied, panics) (build.log.xz,280.89 KB, application/x-xz)
2023-06-17 04:18 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-12 04:36:15 UTC
Created attachment 850416 [details]
build.log.xz

I think the error is:
```
[io-lifetimes 1.0.2] error[E0635]: unknown feature `wasi_ext`
[io-lifetimes 1.0.2]  --> <anon>:1:12
[io-lifetimes 1.0.2]   |
[io-lifetimes 1.0.2] 1 | #![feature(wasi_ext)]
[io-lifetimes 1.0.2]   |            ^^^^^^^^
[io-lifetimes 1.0.2]
[io-lifetimes 1.0.2] error: aborting due to previous error
```

----

# emerge --info
Portage 3.0.43 (python 3.10.9-final-0, default/linux/sparc/17.0/64ul/systemd/merged-usr, gcc-11, glibc-2.36-r5, 5.15.69-gentoo sparc64)
=================================================================
System uname: Linux-5.15.69-gentoo-sparc64-sun4v-with-glibc2.36
KiB Mem:   531346544 total, 501180624 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 12 Feb 2023 02:46:56 +0000
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.9-r1::gentoo, 3.11.1-r1::gentoo
dev-lang/rust:             1.66.1::gentoo
dev-lang/rust-bin:         1.65.0::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            0.64.1::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          252.4-r1::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo, 2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.1_p20221209::gentoo, 12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="sparc"
ACCEPT_LICENSE="@FREE"
CBUILD="sparc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=ultrasparc -pipe"
CHOST="sparc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -mcpu=ultrasparc -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -mcpu=ultrasparc -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -mcpu=ultrasparc -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl big-endian bzip2 cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc llvm-libunwind ncurses nls nptl openmp pam pcre readline sparc ssl systemd test-rust udev unicode xattr zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="fbdev mga r128 radeon dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-15 00:37:18 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
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 04:12:56 UTC
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
"""
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 04:15:45 UTC
(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...
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 04:18:04 UTC
Created attachment 864002 [details]
build.log.xz (with io-lifetimes patch applied, panics)
Comment 5 matoro archtester 2023-06-19 22:57:54 UTC
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.
Comment 6 Georgy Yakovlev archtester gentoo-dev 2023-06-20 18:10:15 UTC
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.
Comment 7 Georgy Yakovlev archtester gentoo-dev 2023-06-20 19:45:05 UTC
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
Comment 8 Larry the Git Cow gentoo-dev 2023-06-20 19:51:40 UTC
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(+)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2023-06-20 19:55:42 UTC
thanks for finding commit btw!

I tried combined patch before for io-lifetimes too, no dice obviously.
Comment 10 Georgy Yakovlev archtester gentoo-dev 2023-06-20 21:08:26 UTC
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
Comment 11 Larry the Git Cow gentoo-dev 2023-06-20 21:16:45 UTC
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(-)
Comment 12 Georgy Yakovlev archtester gentoo-dev 2023-06-20 21:20:06 UTC
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.