Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924583 - ERROR: Rust compiler rustc ....link-arg=-m32...=sse cannot compile programs.
Summary: ERROR: Rust compiler rustc ....link-arg=-m32...=sse cannot compile programs.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-14 16:42 UTC by andy
Modified: 2024-03-14 06:55 UTC (History)
3 users (show)

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


Attachments
meson log (meson-log.txt,294.79 KB, text/plain)
2024-02-14 16:52 UTC, andy
Details
attempted ebuild from IRC (HGeB.0.ebuild,16.19 KB, application/vnd.gentoo.ebuild)
2024-02-14 21:25 UTC, Eli Schwartz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2024-02-14 16:42:18 UTC
ERROR: media-libs/mesa-24.0.0::hedmos-overlay failed (configure phase).

Reproducible: Always

Steps to Reproduce:
1.use my ebuild from my overlay :https://github.com/hedmo/hedmos-overlay/blob/master/media-libs/mesa/mesa-24.0.0.ebuild
2.try to compile it.
3.
Actual Results:  
fails in configure phase with :
Compiler for C supports link arguments -Wl,-z,relro: YES 
Program intel_clc found: YES (/usr/bin/intel_clc)
../mesa-24.0.0/src/nouveau/compiler/meson.build:7: WARNING: add_languages is missing native:, assuming languages are wanted for both host and build.
Compiler for language rust for the build machine not found.

../mesa-24.0.0/src/nouveau/compiler/meson.build:7:0: ERROR: Rust compiler rustc -C linker=x86_64-pc-linux-gnu-gcc -C link-arg=-m32 -C link-arg=-mfpmath=sse cannot compile programs.

A full log can be found at /var/tmp/portage/media-libs/mesa-24.0.0/work/mesa-24.0.0-abi_x86_32.x86/meson-logs/meson-log.txt

Expected Results:  
rust should be able to compile in multilib as i have set : " ABI_X86="32 (64) (-x32)" in dev-lang/rust-1.75.0-r1:stable/1.75::gentoo

mya51 /home/hedmo # emerge --info
Portage 3.0.61 (python 3.11.8-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.38-r10, 6.7.4-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.7.4-gentoo-dist-x86_64-Intel-R-_Core-TM-_i7-9700_CPU_@_3.00GHz-with-glibc2.38
KiB Mem:    32664788 total,  26728000 free
KiB Swap:   12582908 total,  12582908 free
Head commit of repository hedmos-overlay: 022548aea0294f1b5084aeffea847487939310f3

Timestamp of repository kde: Tue, 13 Feb 2024 21:18:27 +0000
Head commit of repository kde: fa2509ad2866e804b740f6077e7b19f67e204074

Head commit of repository lto-overlay: a46a5749ee6e70bcf2317f9d6e24037779b643a8

Timestamp of repository mv: Mon, 12 Feb 2024 16:35:42 +0000
Head commit of repository mv: 29eef9ca4ad88baf12ed9de1dd801b73de4a93d0

Head commit of repository nvidia-vulkan: 6ed3389fcce3a2904b61f893a3dab017d8d36257

Timestamp of repository qt: Mon, 12 Feb 2024 16:35:44 +0000
Head commit of repository qt: b3b85b5f7f9dd4ea24223bb9fbda990ec58faba0

Timestamp of repository r7l: Mon, 12 Feb 2024 16:36:06 +0000
Head commit of repository r7l: 1dc3319699036997eeb4f57a46ad0a0dd195972b

Timestamp of repository steam-overlay: Mon, 12 Feb 2024 16:35:44 +0000
Head commit of repository steam-overlay: d984553a1549c63a93d840bd1ecbadbe54a582a8

Timestamp of repository stefantalpalaru: Tue, 13 Feb 2024 20:18:32 +0000
Head commit of repository stefantalpalaru: 6b87f297971c233d812323fc0d3dd1771bb9cb26

Timestamp of repository tatsh-overlay: Mon, 12 Feb 2024 16:36:02 +0000
Head commit of repository tatsh-overlay: 2cfd2507052ffe21e7194700b52c3b53a014ad20

Timestamp of repository thegreatmcpain: Mon, 12 Feb 2024 16:36:00 +0000
Head commit of repository thegreatmcpain: 8d7b948e32bb60115f0f311e66a10a5f50b71517

Head commit of repository gentoo: ab1d8c9e98b426c57969534e497ca538850eadec

sh bash 5.2_p26
ld GNU ld (Gentoo 2.41 p5) 2.41.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
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.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_p3::gentoo, 3.11.8_p1::gentoo, 3.12.2_p1::gentoo
dev-lang/rust:             1.75.0-r1::gentoo
dev-util/ccache:           4.9.1::gentoo
sys-apps/baselayout:       2.14-r2::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             6.5.0-r4::gentoo, 13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r10::gentoo
Repositories:

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo mv
    volatile: True

hedmos-overlay
    location: /var/db/repos/hedmos-overlay
    sync-type: git
    sync-uri: https://github.com/hedmo/hedmos-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

lto-overlay
    location: /var/db/repos/lto-overlay
    sync-type: git
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo mv
    volatile: False

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

nvidia-vulkan
    location: /var/db/repos/nvidia-vulkan
    sync-type: git
    sync-uri: https://github.com/kakra/nvidia-vulkan.git
    masters: gentoo
    volatile: False

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

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

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

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

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

x-hedmo
    location: /var/lib/local/hedmo
    masters: gentoo
    priority: 0
    volatile: True

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: 1000
    volatile: True

Installed sets: @llvm, @steam, @telephony
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake  -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=9 -fno-math-errno -fno-trapping-math -fno-plt -fuse-linker-plugin  -fstack-protector-all -fstack-clash-protection -Wall -falign-functions=32 -pipe "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/tmpfiles.d/looking-glass.conf /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/sddm/scripts/Xsetup"
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"
CXXFLAGS="-march=skylake  -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=9 -fno-math-errno -fno-trapping-math -fno-plt -fuse-linker-plugin  -fstack-protector-all -fstack-clash-protection -Wall -falign-functions=32 -pipe  "
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 5 --load-average 8"
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=skylake  -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=9 -fno-math-errno -fno-trapping-math -fno-plt -fuse-linker-plugin  -fstack-protector-all -fstack-clash-protection -Wall -falign-functions=32 -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 multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake  -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=9 -fno-math-errno -fno-trapping-math -fno-plt -fuse-linker-plugin  -fstack-protector-all -fstack-clash-protection -Wall -falign-functions=32 -pipe "
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j9"
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 dist-kernel dri dts dvd dvdr egl elogind encode exif ffmpeg flac fortran gdbm gif glamor gles gpm gstreamer gtk gui iconv icu initramfs ipv6 joystick jpeg kde kf6compat kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses networkmanager nls ofono-headset ogg opengl openmp pam pango pcre pdf pipewire pipewire-alsa plasma png policykit ppds pulseaudio qml qt5 qt6 readline screencast sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification steamvr svg test-rust tiff truetype udev udisks unicode upower usb v4l vaapi vdpau 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_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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="libinput synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel iris i965 nouveau" 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, 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, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 andy 2024-02-14 16:52:56 UTC
Created attachment 884980 [details]
meson log
Comment 2 Eli Schwartz 2024-02-14 20:27:30 UTC
(In reply to andy from comment #0)
> 1.use my ebuild from my overlay
> :https://github.com/hedmo/hedmos-overlay/blob/master/media-libs/mesa/mesa-24.
> 0.0.ebuild




Is this bug report being reported against your overlay ("Component: Overlays" rather than "Component: Current Packages") or against the ebuild in the official gentoo repos?

If the latter, please confirm that it reproduces when *not* using an overlay.
Comment 3 andy 2024-02-14 20:49:25 UTC
i report this because i think this is a bug in rust from gentoos repo and not against my custom ebuild . if i did know a similar ebuild/package in the official gentoo repo i would test that before reporting this issue.gentoo does not provide nak/nvk in media-libs/mesa yet and because of that i cannot test media-lib/mesa::gentoo if you can provide me with a similar ebuild/package from gentoos repo i will test that to of course to confirm it is my ebuild that is failing or an upstream issue.
Comment 4 Eli Schwartz 2024-02-14 21:20:44 UTC
(In reply to andy from comment #3)
> i report this because i think this is a bug in rust from gentoos repo and
> not against my custom ebuild . if i did know a similar ebuild/package in the
> official gentoo repo i would test that before reporting this issue.gentoo
> does not provide nak/nvk in media-libs/mesa yet and because of that i cannot
> test media-lib/mesa::gentoo if you can provide me with a similar
> ebuild/package from gentoos repo i will test that to of course to confirm it
> is my ebuild that is failing or an upstream issue.


So what you are saying is that this is something (nak/nvk) which has not yet been packaged for Gentoo, and there is no bug in the Gentoo repo.

This functionality is complicated to write an ebuild for. That is why it is not yet in the Gentoo repo. It is being worked on.

The fact that it is complicated to write an ebuild for does NOT mean that "rust is broken".
Comment 5 Eli Schwartz 2024-02-14 21:25:10 UTC
Created attachment 884993 [details]
attempted ebuild from IRC

From #gentoo-dev-help on IRC:


2024-01-24 07:03:48     mrduartept      I created a ebuild to compile mesa with NVK support, test with upstream code it work (besided failing to link libvulkan-radeon.so but that is unrelated to nouveau). 
2024-01-24 07:04:22     mrduartept      For some reason rust is not detected to compile the 32bit of mesa, meson.log here: http://0x0.st/HGea.txt
2024-01-24 07:04:53     mrduartept      ebuild: http://0x0.st/HGeB.0.ebuild




2024-01-24 08:14:11     ztrawhcse       the error here appears to be because an x86-64 rust is being used while specifying an x86-64 clang, but the latter has a link arg of -m32
2024-01-24 08:14:27     ztrawhcse       rust itself is producing 64-bit output and trying to link with clang -m32
2024-01-24 08:14:51     mrduartept      but why clang will not fallback to 32 bit?
2024-01-24 08:14:52     ztrawhcse       you'll need to somehow set up rust in cross compile mode in the cross file
2024-01-24 08:15:20     ztrawhcse       probably add rustc = ['rustc', '--target', '...'] or something 
2024-01-24 08:15:30     mrduartept      I know mesa have a flag for that in meson --cross-file lib32
2024-01-24 08:15:53     ztrawhcse       sorry, I don't actually use rust so I'm not familiar with the exact routine here
Comment 6 Gonçalo Negrier Duarte 2024-02-14 22:47:49 UTC
It dosent compile because of the cross/native file.
The gentoo ini file dosent have rust args included to allow compile 32 bit support (--target="i686-unknow-gnu”).
Even if I use the rust args to set the rust compile to use 32bits libraries it still failing, because the x86_64-pkg-config will use 64 bits libaries instead.
To solve this you need to use a no multilib profile.

You can use my ebuild to check the behavior: https://github.com/MrDuartePT/mrduarte-ebuilds/blob/master/media-libs/mesa/mesa-24.0.0.ebuild

Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10490

I think the one way to fix this is to make gentoo use i686-pkg-config when multilib is use in the 32bit phase. But I don’t know if that is really possible to my knowledge.
Comment 7 andy 2024-02-15 17:21:04 UTC
(In reply to Gonçalo Negrier Duarte from comment #6)
> It dosent compile because of the cross/native file.
> The gentoo ini file dosent have rust args included to allow compile 32 bit
> support (--target="i686-unknow-gnu”).
> Even if I use the rust args to set the rust compile to use 32bits libraries
> it still failing, because the x86_64-pkg-config will use 64 bits libaries
> instead.
> To solve this you need to use a no multilib profile.
> 
> You can use my ebuild to check the behavior:
> https://github.com/MrDuartePT/mrduarte-ebuilds/blob/master/media-libs/mesa/
> mesa-24.0.0.ebuild
> 
> Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10490
> 
> I think the one way to fix this is to make gentoo use i686-pkg-config when
> multilib is use in the 32bit phase. But I don’t know if that is really
> possible to my knowledge.

Correct. It does not compile in multilib and i am using steam which will conflict with mesa no multilib .If understand this correct , we need --target="i686-unknow-gnu (rust?), some sort of crossbuild like wine with mingw?.
i do not have the knowlage on this matter .
Comment 8 Gonçalo Negrier Duarte 2024-02-25 14:57:02 UTC
(In reply to andy from comment #7)
> (In reply to Gonçalo Negrier Duarte from comment #6)
> > It dosent compile because of the cross/native file.
> > The gentoo ini file dosent have rust args included to allow compile 32 bit
> > support (--target="i686-unknow-gnu”).
> > Even if I use the rust args to set the rust compile to use 32bits libraries
> > it still failing, because the x86_64-pkg-config will use 64 bits libaries
> > instead.
> > To solve this you need to use a no multilib profile.
> > 
> > You can use my ebuild to check the behavior:
> > https://github.com/MrDuartePT/mrduarte-ebuilds/blob/master/media-libs/mesa/
> > mesa-24.0.0.ebuild
> > 
> > Mesa issue: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10490
> > 
> > I think the one way to fix this is to make gentoo use i686-pkg-config when
> > multilib is use in the 32bit phase. But I don’t know if that is really
> > possible to my knowledge.
> 
> Correct. It does not compile in multilib and i am using steam which will
> conflict with mesa no multilib .If understand this correct , we need
> --target="i686-unknow-gnu (rust?), some sort of crossbuild like wine with
> mingw?.
> i do not have the knowlage on this matter .


I have done that but pkg-config seems to ignore it and still use the x86_64-unknown-gnu making the meson check fail.
Comment 9 Gonçalo Negrier Duarte 2024-03-14 06:55:52 UTC
Working ebuild in this PR: https://github.com/gentoo/gentoo/pull/35658