Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906872 - media-libs/mesa-23.1.0 fails to build on a system using clang-16
Summary: media-libs/mesa-23.1.0 fails to build on a system using clang-16
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-20 19:52 UTC by jon R-B
Modified: 2023-09-29 02:33 UTC (History)
0 users

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


Attachments
mesa-23.1.0 buildlog with +opencl (build.log.gz,199.71 KB, application/gzip)
2023-05-21 11:54 UTC, jon R-B
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jon R-B 2023-05-20 19:52:42 UTC
While upgrading mesa ( 23.0.3-r1 -> 23.1.0 ) the build process would always fail at:

FAILED: src/gallium/frontends/rusticl/libmesa_rust_gen.rlib
rustc -C linker=clang-16 --color=always --crate-type rlib --edition=2021 -C relocation-model=pic --crate-name mesa_rust_gen --emit dep-info=src/gallium/frontends/rusticl/mesa_rust_gen.d --emit link -Aclippy::all -Anon_snake_case -Anon_camel_case_types -Anon_upper_case_globals -o src/gallium/frontends/rusticl/libmesa_rust_gen.rlib -l static=gallium -l static=libclc -l dylib=drm -l dylib=LLVM-16 -l dylib=m -l dylib=z -l dylib=zstd -l dylib=clang-cpp -l dylib=LLVM-16 -l dylib=LLVMSPIRVLib -l dylib=z -l dylib=m -l dylib=zstd -l dylib=SPIRV-Tools-opt -l dylib=SPIRV-Tools -l dylib=SPIRV-Tools-link -L src/gallium/auxiliary -L src/compiler/clc -L /usr/lib64 -L /usr/lib/llvm/16/lib64 src/gallium/frontends/rusticl/rusticl_mesa_bindings.rs
error: failed to build archive: Unknown attribute kind (86) (Producer: 'LLVM16.0.4' Reader: 'LLVM 15.0.7')


OpenCL is rust-based and rust is built with llvm-15  and thus attempting to build mesa with llvm-16 will fail due to incompatibilities

recommend ebuild is updated to force llvm-15 if +opencl is set (or bump rust to llvm-16) 

Reproducible: Always
Comment 1 jon R-B 2023-05-20 19:54:16 UTC
emerge --info
Portage 3.0.47 (python 3.11.3-final-0, default/linux/amd64/17.1/desktop, gcc-13, glibc-2.37-r3, 6.2.9-gentoo x86_64)
=================================================================
System uname: Linux-6.2.9-gentoo-x86_64-AMD_Ryzen_5_1600_Six-Core_Processor-with-glibc2.37
KiB Mem:    32830988 total,   5369376 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 20 May 2023 19:18:58 +0000
Head commit of repository gentoo: d2bfb2e39efde76e2dd95eaafd1d5ce80b6cc9ee

Timestamp of repository steam-overlay: Sat, 13 May 2023 11:46:52 +0000
Head commit of repository steam-overlay: bf7d62bb64bab869d28122d6afe6ee081f542bb3

sh bash 5.2_p15-r2
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.1-r1::gentoo
dev-lang/python:           3.10.11::gentoo, 3.11.3::gentoo
dev-lang/rust:             1.69.0-r1::gentoo
dev-util/cmake:            3.26.4-r1::gentoo
dev-util/meson:            1.1.0::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.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_p20230513::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo, 16.0.4::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.4::gentoo
sys-devel/make:            4.4.1::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: git
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-git-verify-commit-signature: true

local
    location: /var/db/repos/local
    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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O3 -pipe -march=x86-64-v3  -mtune=native -flto=thin"
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"
CXX="clang++"
CXXFLAGS="-O3 -pipe -march=x86-64-v3  -mtune=native -flto=thin"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=5.0 --with-bdeps y"
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="-O3 -pipe -march=x86-64-v3  -mtune=native"
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 metadata-transfer 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="-O3 -pipe -march=x86-64-v3  -mtune=native"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind"
LEX="flex"
LINGUAS="en en_GB uk"
MAKEOPTS="-j8"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
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"
RANLIB="llvm-ranlib"
SHELL="/bin/bash"
USE="X a52 aac acl acpi aiglx alsa amd64 bash-completion binddist branding bzip2 cairo cblas-external cdda cdr clang cleartype cli corefonts crypt dri dts elogind encode eselect-ldso evdev exif ffmpeg flac fortran gcc64 gdbm gegl gif gles1 gles2 gpm graphite gstreamer gtk gui iconv icu imlib introspection ipv6 jpeg lcms libnotify libtirpc llvm-libunwind lto mad mng mp3 mp4 mpeg multilib ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pango pcre pdf pgo pipewire png ppds pulseaudio python qt5 readline samba screencast sdl seatd seccomp smbclient sound spell split-usr ssl startup-notification svg test-rust threads tiff truetype type1 udev udisks unicode upower usb vorbis vulkan wayland wxwidgets xattr xcb xft xml xulrunner xv xvid zlib" ABI_X86="64 32" 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="f16c mmx mmxext popcnt sse sse2 sse3 sse4a ssse avx sse4_2 sse4_1 ssse3" CURL_SSL="gnutls" 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 efi-32" INPUT_DEVICES="keyboard mouse libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" 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" RUBY_TARGETS="ruby31" VIDEO_CARDS="vesa amdgpu radeonsi" 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, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Mike Gilbert gentoo-dev 2023-05-21 01:01:36 UTC
Please attach a full build log and change the status to UNCONFIRMED.
Comment 3 jon R-B 2023-05-21 11:54:59 UTC
Created attachment 862078 [details]
mesa-23.1.0 buildlog with +opencl
Comment 4 jon R-B 2023-05-21 11:55:52 UTC
done 
This was with +opencl  

I have confirmed it builds with -opencl
Comment 5 Arniii 2023-08-23 19:02:31 UTC
got the same error at mesa-23.1.6
Comment 6 Matt Turner gentoo-dev 2023-09-29 02:33:32 UTC
Is this still a problem with 23.1.8 or 23.2.1?