Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924301 - dev-lang/rust-1.75.0-r1[lto] fails to compile on arm64 - error: could not compile memchr
Summary: dev-lang/rust-1.75.0-r1[lto] fails to compile on arm64 - error: could not com...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-02-11 16:58 UTC by Leonid Kopylov
Modified: 2024-09-10 16:37 UTC (History)
7 users (show)

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


Attachments
build.log.xz (build.log.xz,691.13 KB, application/x-xz)
2024-02-11 16:58 UTC, Leonid Kopylov
Details
ICE message (rustc-ice-2024-02-13T14_09_40-31847.txt.xz,2.59 KB, application/x-xz)
2024-02-13 15:13 UTC, Morton Pellung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid Kopylov 2024-02-11 16:58:13 UTC
# emerge --info '=dev-lang/rust-1.75.0-r1::gentoo'
Portage 3.0.61 (python 3.12.2-final-0, default/linux/arm64/17.0/desktop/gnome/systemd/merged-usr, gcc-13, glibc-2.38-r10, 6.7.4-gentoo-arm64 aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.7.4-gentoo-arm64-aarch64-with-glibc2.38
KiB Mem:    32817312 total,  12882784 free
KiB Swap:    8388604 total,   8376572 free
Timestamp of repository gentoo: Sun, 11 Feb 2024 14:30:01 +0000
Head commit of repository gentoo: da496f7f1be8a85bcbeeeaf3aa0a7df5ab704312
Timestamp of repository EmilienMottet: Sat, 10 Feb 2024 11:03:20 +0000
Head commit of repository EmilienMottet: 15d643286d040dc3a9a13c5950deacd1de951a28

Timestamp of repository HomeAssistantRepository: Sat, 03 Feb 2024 17:33:21 +0000
Head commit of repository HomeAssistantRepository: 29dc9d73ec2d0eec9058768d6bdddf7387fbe951

Timestamp of repository darkelf: Mon, 15 Jan 2024 16:18:29 +0000
Head commit of repository darkelf: 4c323552d606189b00b24d5d01eff3af9623f742

Timestamp of repository guru: Sun, 11 Feb 2024 12:18:26 +0000
Head commit of repository guru: e2c168dda0152325dfa0ea45b19f6670a2f3f44c

Timestamp of repository inode64-overlay: Sun, 11 Feb 2024 10:48:22 +0000
Head commit of repository inode64-overlay: f36d2c9e1afab07d21276c8e6b2cadb5d3574f8b

Timestamp of repository kde: Sat, 10 Feb 2024 11:03:19 +0000
Head commit of repository kde: 80cf12c1ac128ee0a00b99fedd18cfca83ec70cd

Timestamp of repository pentoo: Sat, 10 Feb 2024 05:18:13 +0000
Head commit of repository pentoo: a62764524035bd2eac7947772347692ffeeb4f01

sh bash 5.2_p26
ld GNU ld (Gentoo 2.41 p5) 2.41.0
ccache version 4.9.1 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.3::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.8::gentoo, 3.12.2::gentoo
dev-lang/rust:             1.74.1::gentoo
dev-lang/rust-bin:         1.74.1::gentoo
dev-util/ccache:           4.9.1::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-apps/systemd:          255.3::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             12.3.1_p20240112::gentoo, 13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r10::gentoo
Repositories:

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

EmilienMottet
    location: /var/db/repos/EmilienMottet
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/EmilienMottet.git
    masters: gentoo
    volatile: False

HomeAssistantRepository
    location: /var/db/repos/HomeAssistantRepository
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/HomeAssistantRepository.git
    masters: gentoo
    volatile: False

darkelf
    location: /var/db/repos/darkelf
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/darkelf.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

inode64-overlay
    location: /var/db/repos/inode64-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/inode64-overlay.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/arm64/binpackages/17.0/arm64

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA geekbench Microsoft-vscode TeamViewer Vivaldi"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /opt/zookeeper-bin/conf /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.1/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/apache2-php8.3/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cgi-php8.3/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/cli-php8.3/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/fpm-php8.3/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/php/phpdbg-php8.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
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="-march=native -O2 -pipe -fomit-frame-pointer"
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 multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="https://mirror.isoc.org.il/pub/gentoo/ https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/"
LANG="en_US.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j6"
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="X a52 aac accessibility acl acpi alsa arm64 audit bash-completion berkdb bidi bluetooth branding brotli btrfs bzip2 cairo cdda cdr cli colord crypt cryptsetup cups curl dbus designer device-mapper doc dri dts dvdr eds emacs encode evdev evo examples exif experimental ffmpeg flac fortran fuse gamepad gdbm gif git gmp gnome gnome-keyring gnome-online-accounts gnome-shell gnutls go gpg gpm gstreamer gtk gtk-doc gui hscolour html http iconv icu idn introspection iodbc ipv6 jack java jemalloc joystick jpeg json kde kerberos keyring lcms ldap libnotify libtirpc lua lvm lz4 lzma lzo mad man mbedtls mng mongodb mp3 mp4 mpeg multimedia mysql nas nautilus ncurses netlink network networkmanager nfs nls nss odbc offensive ogg opengl openmp openssl pam pango pcap pcre pdf perl pkcs11 plasma plugins png policykit postgres ppds pulseaudio python qml qt5 qt6 readline redis samba sasl screencast sdl seccomp semantic-desktop snmp sound source speech spell sqlite ssl startup-notification svg symlink sysprof systemd tcl telemetry test-rust threads tiff tk tools tracker truetype udev udisks unicode upower usb utils v4l vala vim-syntax vnc vorbis vulkan wayland webengine webkit webp wxwidgets x264 xattr xcb xft xinerama xml xv xvid yaml zeroconf zip zlib zsh-completion zstd" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words stage" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 asimddp v8" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev joystick libinput" KERNEL="linux" L10N="en en-US he ru" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_11 python3_12" RUBY_TARGETS="ruby31 ruby32 ruby33" VIDEO_CARDS="virgl" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

# emerge -pqv '=dev-lang/rust-1.75.0-r1::gentoo'
[ebuild     U ] dev-lang/rust-1.75.0-r1 [1.74.1] USE="clippy dist doc lto profiler rust-analyzer rust-src rustfmt (-big-endian) -debug (-llvm-libunwind) (-miri) -nightly (-parallel-compiler) -system-bootstrap -system-llvm -test -verify-sig -wasm" LLVM_TARGETS="(AArch64) -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -X86 -XCore -Xtensa"
Comment 1 Leonid Kopylov 2024-02-11 16:58:33 UTC
Created attachment 884746 [details]
build.log.xz
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-12 10:27:28 UTC
Caused by:
  process didn't exit successfully: `CARGO=/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rust-stage0/bin/cargo CARGO_CRATE_NAME=pkg_config CARGO_MANIFEST_DIR=/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/vendor/pkg-config CARGO_PKG_AUTHORS='Alex Crichton <alex@alexcrichton.com>' CARGO_PKG_DESCRIPTION='A library to run the pkg-config system tool at build time in order to be used in
  Cargo build scripts.
  ' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=pkg-config CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/rust-lang/pkg-config-rs' CARGO_PKG_RUST_VERSION=1.30 CARGO_PKG_VERSION=0.3.27 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=3 CARGO_PKG_VERSION_PATCH=27 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/build/aarch64-unknown-linux-gnu/stage2-tools/release/deps:/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/build/aarch64-unknown-linux-gnu/stage2/lib' /var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/build/bootstrap/debug/rustc --crate-name pkg_config /var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/vendor/pkg-config/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 debug-assertions=off -Zunstable-options --check-cfg 'values(feature)' --check-cfg 'names()' --check-cfg 'values()' -C metadata=13f5ba3fd8dd7c11 -C extra-filename=-13f5ba3fd8dd7c11 --out-dir /var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/build/aarch64-unknown-linux-gnu/stage2-tools/release/deps -C linker=aarch64-unknown-linux-gnu-gcc -L dependency=/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/build/aarch64-unknown-linux-gnu/stage2-tools/release/deps --cap-lints warn -Z binary-dep-depinfo` (exit status: 101)
thread 'rustc' panicked at compiler/rustc_const_eval/src/interpret/place.rs:633:57:
index out of bounds: the len is 1 but the index is 4294967040
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic_bounds_check
   3: <rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::write_immediate_no_validate::<rustc_const_eval::interpret::place::PlaceTy>
   4: <rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::eval_rvalue_into_place
   5: rustc_const_eval::const_eval::eval_queries::eval_in_interpreter
   6: rustc_const_eval::const_eval::eval_queries::eval_to_allocation_raw_provider
      [... omitted 2 frames ...]
   7: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
   8: rustc_const_eval::const_eval::eval_queries::eval_to_const_value_raw_provider
      [... omitted 2 frames ...]
   9: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
  10: <rustc_middle::ty::context::TyCtxt>::const_eval_global_id
  11: <rustc_middle::ty::context::TyCtxt>::const_eval_resolve
  12: <rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::push_stack_frame
  13: rustc_const_eval::const_eval::eval_queries::eval_in_interpreter
  14: rustc_const_eval::const_eval::eval_queries::eval_to_allocation_raw_provider
      [... omitted 2 frames ...]
  15: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
  16: rustc_const_eval::const_eval::eval_queries::eval_to_const_value_raw_provider
      [... omitted 2 frames ...]
  17: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
  18: <rustc_middle::ty::context::TyCtxt>::const_eval_global_id
  19: <rustc_middle::ty::context::TyCtxt>::const_eval_resolve
  20: <rustc_const_eval::interpret::eval_context::InterpCx<rustc_const_eval::const_eval::machine::CompileTimeInterpreter>>::push_stack_frame
  21: rustc_const_eval::const_eval::eval_queries::eval_in_interpreter
  22: rustc_const_eval::const_eval::eval_queries::eval_to_allocation_raw_provider
      [... omitted 2 frames ...]
  23: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
  24: rustc_const_eval::const_eval::eval_queries::eval_to_const_value_raw_provider
      [... omitted 2 frames ...]
  25: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_middle::ty::ParamEnvAnd<rustc_middle::mir::interpret::GlobalId>, rustc_middle::query::erase::Erased<[u8; 24]>>>
  26: <rustc_middle::ty::context::TyCtxt>::const_eval_global_id
  27: <rustc_middle::ty::context::TyCtxt>::const_eval_resolve
  28: <rustc_middle::mir::consts::Const>::try_eval_scalar_int
  29: <rustc_middle::mir::consts::Const>::try_eval_bits
  30: <rustc_const_eval::transform::promote_consts::Validator>::validate_local
  31: <core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_const_eval::transform::promote_consts::Candidate>> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find::check<rustc_const_eval::transform::promote_consts::Candidate, &mut rustc_const_eval::transform::promote_consts::validate_candidates::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<rustc_const_eval::transform::promote_consts::Candidate>>
  32: <alloc::vec::Vec<rustc_const_eval::transform::promote_consts::Candidate> as alloc::vec::spec_from_iter::SpecFromIter<rustc_const_eval::transform::promote_consts::Candidate, core::iter::adapters::filter::Filter<core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_const_eval::transform::promote_consts::Candidate>>, rustc_const_eval::transform::promote_consts::validate_candidates::{closure#0}>>>::from_iter
  33: <rustc_const_eval::transform::promote_consts::PromoteTemps as rustc_middle::mir::MirPass>::run_pass
  34: rustc_mir_transform::pass_manager::run_passes_inner
  35: rustc_mir_transform::mir_promoted
      [... omitted 1 frame ...]
  36: rustc_borrowck::mir_borrowck
      [... omitted 1 frame ...]
  37: rustc_interface::passes::analysis
      [... omitted 1 frame ...]
  38: <rustc_interface::queries::QueryResult<&rustc_middle::ty::context::GlobalCtxt>>::enter::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}::{closure#2}::{closure#6}>
  39: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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: please attach the file at `/var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/vendor/memchr/rustc-ice-2024-02-11T16_22_27-21317.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -Z unstable-options -C linker=aarch64-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:
#0 [eval_to_allocation_raw] const-evaluating + checking `core::num::<impl usize>::MAX`
#1 [eval_to_const_value_raw] simplifying constant for the type system `core::num::<impl usize>::MAX`  |  = note: this failure-note originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)

#2 [eval_to_allocation_raw] const-evaluating + checking `core::num::<impl usize>::BITS`
#3 [eval_to_const_value_raw] simplifying constant for the type system `core::num::<impl usize>::BITS`
#4 [eval_to_allocation_raw] const-evaluating + checking `arch::all::memchr::USIZE_BYTES`
#5 [eval_to_const_value_raw] simplifying constant for the type system `arch::all::memchr::USIZE_BYTES`
#6 [mir_promoted] promoting constants in MIR for `arch::all::memchr::<impl at /rust/deps/memchr/src/arch/all/memchr.rs:40:1: 40:9>::find_raw`
#7 [mir_borrowck] borrow-checking `arch::all::memchr::<impl at /rust/deps/memchr/src/arch/all/memchr.rs:40:1: 40:9>::find_raw`
#8 [analysis] running analysis passes on this crate
end of query stack

Did not run successfully: exit status: 101

... and so on
Comment 3 matoro archtester 2024-02-12 22:28:08 UTC
system-llvm and system-bootstrap seem to have no effect, issue still occurs.
Comment 4 matoro archtester 2024-02-12 23:42:12 UTC
This is caused by USE=lto, goes away without
Comment 5 Randy Barlow 2024-02-13 03:25:12 UTC
Thank you for the bug report!

I see that the Rust error output is asking us to file a ticket with rust, and it asked us to attach the contents of the file /var/tmp/notmpfs/portage/dev-lang/rust-1.75.0-r1/work/rustc-1.75.0-src/vendor/memchr/rustc-ice-2024-02-11T16_22_27-21317.txt to the ticket.

Do you think you could share that file? If you don't have the file from the exact original build but are able to reproduce the failure, the file might have a different name since it appears to encode a timestamp.
Comment 6 Randy Barlow 2024-02-13 03:25:52 UTC
(In reply to matoro from comment #4)
> This is caused by USE=lto, goes away without

Hello! Can I assume this means that you've been able to reproduce this issue as well? Is it also an aarch64 system?
Comment 7 Morton Pellung 2024-02-13 15:13:43 UTC
Created attachment 884866 [details]
ICE message

Reproduced under Qemu 8.1.5 aarch64 system chroot with

[ebuild     U ~] dev-lang/rust-1.75.0-r1:stable/1.75::gentoo [1.74.1:stable/1.74::gentoo] USE="lto (-big-endian) -clippy -debug -dist -doc (-llvm-libunwind) (-miri) -nightly (-parallel-compiler) -profiler -rust-analyzer -rust-src -rustfmt -system-bootstrap -system-llvm -test -verify-sig -wasm" LLVM_TARGETS="(AArch64) -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -X86 -XCore -Xtensa" 0 KiB

Requested ICE file attached
Comment 8 matoro archtester 2024-02-13 17:54:00 UTC
(In reply to Randy Barlow from comment #6)
> (In reply to matoro from comment #4)
> > This is caused by USE=lto, goes away without
> 
> Hello! Can I assume this means that you've been able to reproduce this issue
> as well? Is it also an aarch64 system?

Yes, this is specific to LTO on aarch64.
Comment 9 Randy Barlow 2024-02-15 02:29:03 UTC
I appear to lack permissions to set metadata on the ticket, but I opened https://github.com/rust-lang/rust/issues/121124 upstream about this.

If someone has time and interest, it would probably be helpful if we could test the latest HEAD on the upstream master branch with LTO enabled on one of the affected architectures.

Perhaps we can soon add a -9999 package for Rust to make this kind of testing easier.
Comment 10 Larry the Git Cow gentoo-dev 2024-02-15 13:56:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d17ee4b1582bb4355ca6437be4accf980fa8eda

commit 4d17ee4b1582bb4355ca6437be4accf980fa8eda
Author:     Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
AuthorDate: 2024-02-14 23:06:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-15 13:52:42 +0000

    profiles/arch/arm64/package.use.mask: Mask lto for ~dev-lang/rust-1.75.0
    
    Bug: https://bugs.gentoo.org/924301
    Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/arm64/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 11 Randy Barlow 2024-02-15 22:57:06 UTC
In the upstream ticket, it sounds like using lto = "fat" (which is what our ebuild does) is not recommended. They seem to suggest trying lto = "thin" which they say is more tested.

I see that we merged some changes that flip this to a hard off for 1.75, which is fine, so I think I might go suggest this change in the 1.76.0 PR that's open right now and maybe we can try again there (I do still think lto off by default is sensible, since it is generally off by default across all packages in Gentoo IME).
Comment 12 Randy Barlow 2024-02-15 23:02:01 UTC
Alright, I proposed thin LTO at https://github.com/gentoo/gentoo/pull/35272/files#r1491767742 for Rust 1.76.0.

How do we feel about waiting for 1.76.0 to get merged to test LTO on these platforms again, vs. making a new 1.75.0-r* to try with 1.75? I'm happy to make a new 1.75 if we want that.
Comment 13 Randy Barlow 2024-02-23 00:09:52 UTC
Upstream would like to know if this issue is reproducible with nightly Rust using LLVM 18: https://github.com/rust-lang/rust/issues/121124#issuecomment-1952228591

If anyone here who is able to reproduce this can check that, that would be lovely.
Comment 14 matoro archtester 2024-02-23 00:57:50 UTC
(In reply to Randy Barlow from comment #13)
> Upstream would like to know if this issue is reproducible with nightly Rust
> using LLVM 18:
> https://github.com/rust-lang/rust/issues/121124#issuecomment-1952228591
> 
> If anyone here who is able to reproduce this can check that, that would be
> lovely.

I don't think this is feasible to check until we have dev-lang/rust-9999 wired up.
Comment 15 Randy Barlow 2024-02-23 02:05:00 UTC
(In reply to matoro from comment #14)
> I don't think this is feasible to check until we have dev-lang/rust-9999
> wired up.

I agree that that would make it much easier to check, but it may be possible to check by git cloning upstream and setting lto = "fat" in the config.toml manually (i.e., outside of the ebuild system). Certainly more work, but if anyone has the appetite I think they'd appreciate it.
Comment 16 matoro archtester 2024-03-09 18:21:43 UTC
Still present on 1.76.0, please extend mask.
Comment 17 Larry the Git Cow gentoo-dev 2024-03-10 01:59:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4fea4d54461547fd1af6fb60796b99778a3d694

commit c4fea4d54461547fd1af6fb60796b99778a3d694
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-10 01:48:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-10 01:48:12 +0000

    profiles/arch: broaden the Rust LTO mask for arm64 & powerpc
    
    matoro reports 1.76.0 is still hosed.
    
    Bug: https://bugs.gentoo.org/924301
    Bug: https://bugs.gentoo.org/924396
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/arm64/package.use.mask   | 2 +-
 profiles/arch/powerpc/package.use.mask | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 18 Larry the Git Cow gentoo-dev 2024-03-21 02:24:29 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7f3dfefc2ab978d5d38b50d1e061c4a530d85f8

commit d7f3dfefc2ab978d5d38b50d1e061c4a530d85f8
Author:     Randy Barlow <randy@electronsweatshop.com>
AuthorDate: 2024-03-17 03:00:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-21 02:22:02 +0000

    dev-lang/rust: Disable LTO by default and use thin
    
    We've had a few issues with lto on, and it isn't on by default generally
    among Gentoo packages, so this commit flips it to be off by default.
    
    Additionally, in an upstream ticket[0] it was suggested to use thin LTO
    rather than fat LTO, so this commit makes that adjustment as well.
    
    [0] https://github.com/rust-lang/rust/issues/121124
    
    [sam: Note that there's a risk of miscompilations with non-thin LTO, per the
    upstream bug(s).]
    
    Bug: https://bugs.gentoo.org/924301
    Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
    Closes: https://github.com/gentoo/gentoo/pull/35796
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/rust/{rust-1.76.0.ebuild => rust-1.76.0-r1.ebuild} | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Comment 19 Eli Schwartz gentoo-dev 2024-09-10 16:37:35 UTC
masked, reported upstream, nothing more to do here.