Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953109 - dev-lang/rust-1.86.0 fails to build with unreachable `pub` item
Summary: dev-lang/rust-1.86.0 fails to build with unreachable `pub` item
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Randy Barlow
URL:
Whiteboard:
Keywords:
: 953126 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-04-04 08:55 UTC by Søren Dalby Larsen
Modified: 2025-04-04 18:24 UTC (History)
7 users (show)

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


Attachments
Build log (build.log.xz,67.67 KB, application/x-xz)
2025-04-04 08:55 UTC, Søren Dalby Larsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Søren Dalby Larsen 2025-04-04 08:55:00 UTC
Created attachment 923563 [details]
Build log

I get a bunch of these:

[RUSTC-SHIM] rustc profiler_builtins libdir: "/usr/lib/rust/1.85.1/lib"
error: unreachable `pub` item
 --> library/core/src/../../portable-simd/crates/core_simd/src/masks/bitmask.rs:8:1
  |
8 | pub struct Mask<T, const N: usize>(
  | ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  | |
  | help: consider restricting its visibility: `pub(super)`
  |
  = help: or consider exporting it for use by other crates
  = note: `-D unreachable-pub` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unreachable_pub)]`

error: unreachable `pub` item
  --> library/core/src/../../portable-simd/crates/core_simd/src/masks/bitmask.rs:81:5
   |
81 |     pub fn splat(value: bool) -> Self {
   |     ---^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     help: consider restricting its visibility: `pub(super)`
Comment 1 Søren Dalby Larsen 2025-04-04 08:55:46 UTC
emerge --info '=dev-lang/rust-1.86.0::gentoo:

Portage 3.0.67 (python 3.13.2-final-0, default/linux/amd64/23.0/desktop, gcc-14, glibc-2.41-r1, 6.14.0-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.14.0-gentoo-x86_64-AMD_Ryzen_7_7840U_w-_Radeon_780M_Graphics-with-glibc2.41
KiB Mem:    63594832 total,  49361044 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 04 Apr 2025 05:20:22 +0000
Head commit of repository gentoo: fdf21762bacfceda0f3f73cb0e67cbb9fd4b2b9f

Timestamp of repository inode64-overlay: Fri, 04 Apr 2025 05:35:11 +0000
Head commit of repository inode64-overlay: 1268ca5e6ed2077be2508b69fed25e5d3812f325

sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r2::gentoo
dev-build/cmake:           3.31.6-r1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.1::gentoo
dev-lang/python:           3.12.9::gentoo, 3.13.2::gentoo
dev-lang/rust:             1.85.1::gentoo
llvm-core/clang:           19.1.7::gentoo, 20.1.2::gentoo
llvm-core/lld:             19.1.7::gentoo
llvm-core/llvm:            19.1.7::gentoo, 20.1.2::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/openrc:           0.61::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20250301::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    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

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average 8.0 --quiet-build=n"
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"
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 merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_DK.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8"
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"
RUSTFLAGS=" -C target-cpu=native"
SHELL="/usr/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cet crypt cups dbus dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg kf6compat lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf pipewire png policykit ppds pulseaudio qml qt5 qt6 readline resolveconf sdl seccomp sound spell ssl startup-notification svg test-rust theora tiff truetype udev udisks unicode upower usb vim-syntax vorbis vulcan vulkan wxwidgets x264 xattr xcb xcomposite xft xml xv xvid zlib zsh-completion" ABI_X86="64" ADA_TARGET="gcc_14" ALSA_CARDS="snd-hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon auth
Comment 2 Søren Dalby Larsen 2025-04-04 08:57:05 UTC
emerge -pqv '=dev-lang/rust-1.86.0::gentoo':

[ebuild  NS   ] dev-lang/rust-1.86.0 [1.85.1] USE="clippy rust-analyzer rust-src rustfmt system-llvm (-big-endian) -debug -dist -doc (-llvm-libunwind) -lto -test -verify-sig -wasm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2" LLVM_SLOT="(19)" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -WebAssembly -XCore -Xtensa"
Comment 3 12101111 2025-04-04 11:45:48 UTC
Upstream issue: https://github.com/rust-lang/rust/issues/138054

Workaround: change -Ctarget-cpu=native/znver5/znver4 to znver3 or remove this flag

Fix: https://github.com/rust-lang/rust/pull/138687/commits/85d15a475b392a0a090c4b0da2e14bc5f2656c13
Comment 4 Søren Dalby Larsen 2025-04-04 13:20:29 UTC
(In reply to 12101111 from comment #3)
> Upstream issue: https://github.com/rust-lang/rust/issues/138054
> 
> Workaround: change -Ctarget-cpu=native/znver5/znver4 to znver3 or remove
> this flag
> 
> Fix:
> https://github.com/rust-lang/rust/pull/138687/commits/
> 85d15a475b392a0a090c4b0da2e14bc5f2656c13

Thanks!
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-04 18:24:26 UTC
*** Bug 953126 has been marked as a duplicate of this bug. ***