Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907492 - No way to pick rust compiler used in build (was: gnome-base/librsvg-2.56.1 failed to compile)
Summary: No way to pick rust compiler used in build (was: gnome-base/librsvg-2.56.1 fa...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Rust Project
URL:
Whiteboard:
Keywords:
: 922135 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-05-31 16:04 UTC by anna
Modified: 2024-02-11 14:03 UTC (History)
5 users (show)

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


Attachments
build.log (librsvg-2.56.1.build.log,215.06 KB, text/x-log)
2023-05-31 16:04 UTC, anna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anna 2023-05-31 16:04:41 UTC
gnome-base/librsvg-2.56.1 fails to emerge

Reproducible: Always

Steps to Reproduce:
emerge



[ebuild     U ] gnome-base/librsvg-2.56.1 [2.55.1] USE="introspection vala -debug -gtk-doc" ABI_X86="32 (64) (-x32)"

Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.37-r3, 6.3.4-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.3.4-gentoo-x86_64-AMD_Ryzen_9_7950X_16-Core_Processor-with-glibc2.37
KiB Mem:    31954500 total,  15506036 free
KiB Swap:  134217724 total, 110896900 free
Timestamp of repository gentoo: Wed, 31 May 2023 14:30:01 +0000
Head commit of repository gentoo: 13f33160ea46e58614a7819975d6a51ca03c2aa8
Timestamp of repository guru: Tue, 30 May 2023 22:01:56 +0000
Head commit of repository guru: 82d2c734e03514ff82127786a6a1ef6712b0fdf4

Timestamp of repository hering-overlay: Mon, 29 May 2023 18:33:37 +0000
Head commit of repository hering-overlay: 7a22411e489a798aabb69ecdc159b27047bfb854

Timestamp of repository menelkir: Mon, 29 May 2023 18:33:49 +0000
Head commit of repository menelkir: fd1523a489bba325e50dbaa1a5b4874d81b4287c

Head commit of repository plex-overlay: b8e287158812e42feefb6ff025184ed4d151be43

Timestamp of repository steam-overlay: Mon, 29 May 2023 18:33:34 +0000
Head commit of repository steam-overlay: 830880f83b2a88e579fb9d56a33620ce2b39a63c

Timestamp of repository torbrowser: Mon, 29 May 2023 18:33:35 +0000
Head commit of repository torbrowser: 316a0ef539b05b609ae375886fb09249423db369

Timestamp of repository usenet-overlay: Mon, 29 May 2023 18:33:49 +0000
Head commit of repository usenet-overlay: 234b92194f8a3c55aebf7dac3a5bebc1dab18460

Head commit of repository brother-overlay: 0d059637b01926488e1eedfa078323f6e48a6130

sh bash 5.2_p15-r3
ld GNU ld (Gentoo 2.40 p5) 2.40.0
ccache version 4.8 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r3::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.36.1-r2::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.3::gentoo, 3.12.0_beta1_p4::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-lang/rust-bin:         1.69.0::gentoo
dev-util/ccache:           4.8-r2::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.47.1::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.4::gentoo
sys-devel/gcc:             13.1.1_p20230527::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.4::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r3::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-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

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

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

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

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

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

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

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

brother-overlay
    location: /usr/local/portage/brother-overlay
    sync-type: git
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 9999
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=znver3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
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 /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=znver3"
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 -pipe -march=znver3"
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 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 -pipe -march=znver3"
GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/ http://gentoo-mirror.flux.utah.edu/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j33"
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 acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kwallet lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl nvidia ogg opengl openmp pam pango pcre pdf pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" 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" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 avx512bw avx512cd avx512dq avx512f avx512vbmi avx512vl f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" CURL_SSL="nss" 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" GRUB_PLATFORMS="efi-64" 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_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby30 ruby31" VIDEO_CARDS="nvidia" 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, 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 anna 2023-05-31 16:04:58 UTC
Created attachment 862975 [details]
build.log
Comment 2 Matt Turner gentoo-dev 2023-05-31 16:15:21 UTC
> error[E0463]: can't find crate for `core`
>  |
>   = note: the `i686-unknown-linux-gnu` target may not be installed
>   = help: consider downloading the target with `rustup target add i686-unknown-linux-gnu`

Can you show the output of `emerge dev-lang/rust -vp` (or `emerge dev-lang/rust-bin -vp` if you use the binary version)?
Comment 3 anna 2023-05-31 16:23:06 UTC
These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.50 s.

[ebuild   R    ] dev-lang/rust-1.69.0-r1:stable/1.69::gentoo  USE="-clippy -debug -dist -doc (-llvm-libunwind) (-miri) -nightly (-parallel-compiler) -profiler -rust-analyzer -rust-src -rustfmt -system-bootstrap -system-llvm -test -verify-sig -wasm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2" LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -AVR -BPF -Hexagon -Lanai -MSP430 -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-31 16:25:37 UTC
Disabling all the forced targets may be related.
Comment 5 anna 2023-05-31 16:34:16 UTC
I haven't changed any of the default USE flags for rust

global USE:

USE="pulseaudio cups udev dbus policykit udisks nvidia kde qt5 qt6 -amdgpu wayland vulkan"

package.use folder: 

anna@eurekapyros /etc/portage/package.use $ cat * | grep rust
>=virtual/rust-1.64.0 abi_x86_32
# required by virtual/rust-1.64.0::gentoo
>=dev-lang/rust-bin-1.64.0 abi_x86_32
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-31 16:37:00 UTC
Oh they're not forced on for rust? Huh, okay
Comment 7 Matt Turner gentoo-dev 2023-05-31 17:52:51 UTC
(In reply to anna from comment #3)
> These are the packages that would be merged, in order:
> 
> Calculating dependencies... done!
> Dependency resolution took 1.50 s.
> 
> [ebuild   R    ] dev-lang/rust-1.69.0-r1:stable/1.69::gentoo  USE="-clippy
> -debug -dist -doc (-llvm-libunwind) (-miri) -nightly (-parallel-compiler)
> -profiler -rust-analyzer -rust-src -rustfmt -system-bootstrap -system-llvm
> -test -verify-sig -wasm" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse2"
> LLVM_TARGETS="(X86) -AArch64 -AMDGPU -ARM -AVR -BPF -Hexagon -Lanai -MSP430
> -Mips -NVPTX -PowerPC -RISCV -Sparc -SystemZ -WebAssembly -XCore" 0 KiB
> 
> Total: 1 package (1 reinstall), Size of downloads: 0 KiB

This shows ABI_X86="(64) -32 (-x32)"

(In reply to anna from comment #5)
> I haven't changed any of the default USE flags for rust
> 
> global USE:
> 
> USE="pulseaudio cups udev dbus policykit udisks nvidia kde qt5 qt6 -amdgpu
> wayland vulkan"
> 
> package.use folder: 
> 
> anna@eurekapyros /etc/portage/package.use $ cat * | grep rust
> >=virtual/rust-1.64.0 abi_x86_32
> # required by virtual/rust-1.64.0::gentoo
> >=dev-lang/rust-bin-1.64.0 abi_x86_32

And here you're setting abi_x86_32 on rust-*bin*, not rust.
Comment 8 anna 2023-05-31 19:26:04 UTC
that paste didn't make it entirely clear, my apologies, those are all from zz-autounmask

here's the whole segment:

>=virtual/rust-1.64.0 abi_x86_32
# required by virtual/rust-1.64.0::gentoo
# required by gnome-base/librsvg-2.54.5::gentoo
# required by x11-libs/gtk+-2.24.33::gentoo
# required by net-dialup/ppp-2.4.9-r8::gentoo[gtk]
# required by net-misc/networkmanager-1.40.0::gentoo[ppp]
# required by kde-frameworks/networkmanager-qt-5.98.0::gentoo
# required by kde-plasma/powerdevil-5.25.5::gentoo[wireless]
# required by kde-plasma/plasma-meta-5.25.5::gentoo
# required by @selected
# required by @world (argument)
>=dev-lang/rust-bin-1.64.0 abi_x86_32
# required by media-tv/kodi-19.4-r4::gentoo
# required by kodi (argument)

so, if these packages are requiring USE flags that put things in an inconsistent state, that seems like it needs to be addressed
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-31 19:28:56 UTC
The problem is, really, Rust needs proper "LLVM-style" (or Python-style) treatment.

Rust could even be slotted, and we have the same problems from slotting already, because we have rust-bin and rust, and while ebuilds can depend on rust, they can't ensure the right rust is used.

So, right now, we suffer all the pain of slotting (dep issues, needing machinery in ebuild) but without the benefits of being able to use multiple Rust versions.
Comment 10 Matt Turner gentoo-dev 2023-05-31 19:38:05 UTC
If I understand correctly, the problem is

- dev-lang/rust-bin is installed with ABI_X86="64 32'
- As a result, virtual/rust[abi_x86_32] is satisfied
- But dev-lang/rust is installed with only ABI_X86="64"
- We don't have a way (like Python or LLVM does) to choose the appropriate Rust compiler in the ebuild if multiple are available

Possible workarounds for this situation are

- Enable ABI_X86=32 for dev-lang/rust (and potentially emerge -C dev-lang/rust-bin)
- emerge -C dev-lang/rust to ensure that rust-bin[abi_x86_32] is the rust compiler chosen
Comment 11 anna 2023-05-31 20:01:59 UTC
I was able to solve the specific problem with librsvg by adding this to a file in package.use/ 

dev-lang/rust abi_x86_64 abi_x86_32

I don't think the _64 version does anything. There are issues with some other packages but I'm not sure they're related so I can bring those up in another ticket as necessary. I'm also not sure if this solution will cause other problems yet.
Comment 12 Matt Turner gentoo-dev 2023-05-31 20:13:02 UTC
(In reply to anna from comment #11)
> I was able to solve the specific problem with librsvg by adding this to a
> file in package.use/ 
> 
> dev-lang/rust abi_x86_64 abi_x86_32
> 
> I don't think the _64 version does anything.

It doesn't, since it's forced on. That's what the parentheses mean in ABI_X86="(64) -32 (-x32)"

> There are issues with some
> other packages but I'm not sure they're related so I can bring those up in
> another ticket as necessary. I'm also not sure if this solution will cause
> other problems yet.

If anything this will solve other problems.

Unless you have some reason to have both dev-lang/rust and dev-lang/rust-bin installed, I'd remove one; and if you do have a reason to have both I'd ensure they have the same USE flags set.
Comment 13 Matt Turner gentoo-dev 2023-05-31 20:13:53 UTC
Reassigning to rust@. Nothing gnome@ can do here.
Comment 14 Enne Eziarc 2023-05-31 21:37:01 UTC
FWIW there's no need to reinstall the compiler - I'm able to reproduce the failure and subsequently work around it by running `eselect rust set rust-bin-1.69.0`.

Maybe rust should follow other eselect users and migrate to app-alternatives/*? The presence of a :stable slot seems to be vestigal (just checked, even the -9999 in layman uses it) and without that there's not much reason to keep the current complexity around.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-31 21:40:06 UTC
(In reply to Enne Eziarc from comment #14)
> FWIW there's no need to reinstall the compiler - I'm able to reproduce the
> failure and subsequently work around it by running `eselect rust set
> rust-bin-1.69.0`.
> 
> Maybe rust should follow other eselect users and migrate to
> app-alternatives/*? The presence of a :stable slot seems to be vestigal
> (just checked, even the -9999 in layman uses it) and without that there's
> not much reason to keep the current complexity around.

It'd be better go in the other direction and properly slot it, given we've already had to deal with conflicts/alignment and it's a bit painful, and that won't scale as Rust usage grows (especially if e.g. the kernel needs older versions, etc).
Comment 16 BonezTheGoon 2024-02-04 19:21:01 UTC
(In reply to anna from comment #11)
> I was able to solve the specific problem with librsvg by adding this to a
> file in package.use/ 
> 
> dev-lang/rust abi_x86_64 abi_x86_32
> 
> I don't think the _64 version does anything. There are issues with some
> other packages but I'm not sure they're related so I can bring those up in
> another ticket as necessary. I'm also not sure if this solution will cause
> other problems yet.

This fixed things for me today.  Thanks!
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-11 14:03:17 UTC
*** Bug 922135 has been marked as a duplicate of this bug. ***