Ebuild removes some required mesa-amber libraries and makes mesa-amber use main mesa's libraries. This completely breaks it, at least for i965 driver Also, this makes amber ebuild require to build main mesa even on old legacy systems' it targets. Maybe having :amber slot would be better than having separate packages Reproducible: Always Steps to Reproduce: 1. emerge =mesa-9999 2. emerge mesa-amber 3. try use mesa-amber and get segfault Actual Results: mesa-amber libglapi.so is incompatible with main mesa and lib[GLX,EGL]_amber.so cannot find required symbols, causing null pointer call Expected Results: Ebuild should install working mesa-amber copy, not removing required libraries and prevent conflicts other way Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0, gcc-14, glibc-2.40-r5, 6.12.0-g43fb83c17ba2-dirty x86_64) ================================================================= System uname: Linux-6.12.0-g43fb83c17ba2-dirty-x86_64-Intel-R-_Core-TM-_i5-7400_CPU_@_3.00GHz-with-glibc2.40 KiB Mem: 16250772 total, 3875860 free KiB Swap: 33554428 total, 33554428 free Timestamp of repository gentoo: Thu, 21 Nov 2024 00:45:00 +0000 Head commit of repository gentoo: 6de20154d8222e5a4087641d13655d658e6973b0 Timestamp of repository palemoon: Tue, 05 Nov 2024 21:33:16 +0000 Head commit of repository palemoon: 61533a5c155dcc5adc8bc8401f1b278dfa286877 Head commit of repository trinity-official: 399a9b9043efb6db31ccd1c26312313e974d28bb sh bash 5.2_p37 ld GNU ld (Gentoo 2.42 p6) 2.42.0 distcc 3.4 x86_64-pc-linux-gnu [enabled] app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.30.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.5.2::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 2.7.18_p16-r2::gentoo, 3.12.7_p1::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.54.2::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.42-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/clang: 18.1.8::gentoo sys-devel/gcc: 13.3.1_p20241025::gentoo, 14.2.1_p20241116::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 18.1.8::gentoo sys-devel/llvm: 18.1.8-r1::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::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-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: local location: /usr/local/overlay masters: gentoo trinity-official volatile: True palemoon location: /var/db/repos/palemoon sync-type: git sync-uri: https://github.com/gentoo-mirror/palemoon.git masters: gentoo volatile: False trinity-official location: /var/db/repos/trinity-official sync-type: git sync-uri: https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging-gentoo.git masters: gentoo volatile: False Binary Repositories: gentoobinhost priority: 1 sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64 Installed sets: @xorg-x11 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE MSttfEULA hplip-plugin MPEG-4 unRAR RAR" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -pipe -fno-semantic-interposition -mfpmath=sse -fno-plt -funsafe-loop-optimizations -UFORTIFY_SOURCE -fno-stack-protector -fno-plt -march=skylake -mtune=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/trinity/14/env /usr/trinity/14/share/config /usr/trinity/14/shutdown /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d" CXXFLAGS="-O3 -pipe -fno-semantic-interposition -mfpmath=sse -fno-plt -funsafe-loop-optimizations -UFORTIFY_SOURCE -fno-stack-protector -fno-plt -march=skylake -mtune=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -pipe" 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="-O3 -pipe -fno-semantic-interposition -mfpmath=sse -fno-plt -funsafe-loop-optimizations -UFORTIFY_SOURCE -fno-stack-protector -fno-plt -march=skylake -mtune=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distcc 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 sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O3 -pipe -fno-semantic-interposition -mfpmath=sse -fno-plt -funsafe-loop-optimizations -UFORTIFY_SOURCE -fno-stack-protector -fno-plt -march=skylake -mtune=skylake -mabm --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=6144 -pipe" GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" LINGUAS="ru en" MAKEFLAGS="-j80 -l10" MAKEOPTS="-j80 -l10" 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=skylake" SHELL="/bin/bash" USE="acl alsa amd64 apng bzip2 cet compile-locales crypt custom-cflags elogind encode exec-static-trampoline flac gdbm hash-sysv-compat hwlib iconv ipv6 jack jpeg libtirpc lm-sensors lzma mp3 multilib ncurses nls openmp pam pcre readline samba seccomp ssl static-libs test-rust tiff unicode vorbis webp xattr xcb xcomposite xinerama xrandr xscreensaver zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="AArch64 AMDGPU ARM BPF X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12 python2_7" RUBY_TARGETS="ruby32" SANE_BACKENDS="hp" VIDEO_CARDS="i965 intel zink" 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, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Created attachment 912724 [details] Ebuild with workaround Proposed workaround keeping mesa-amber in separate package: move conflicting libs to /opt/mesa-amber and add rpath with patchelf Tested on i965 driver: both mesa versions works and can be switched with environment variable, starting xorg with amber works too, but driver selected in /usr/share/glvnd/egl_vendor.d/ needs to be compatible with xorg DRI driver selection (Option "DRI" "foo" in xorg.conf's Device secion)
/opt isn't necessarily correct either, imo. USE=-gbm should fix at least some parts of loading, and glapi can be built static which should fix other parts. I was able to get Sway to seem to work that way, but I haven't had time to debug X11 further yet - it was still segfaulting for me on my Intel 945G test box (a 32-bit MacBook1,1). I'm not sure if it would be possible to rename libgbm to libgbm_amber or such, to make gbm work again. I believe this is the way forward, but I'm also trying to work with upstream to see what they think the best way to approach this is.
(This also came up at https://bugs.gentoo.org/943297#c2, but it's unrelated to the original bug there.)
24.2.0 is where the incompatibility was most pronounced: https://gitlab.freedesktop.org/mesa/mesa/-/commit/93511c1c5c5fb60166c806d417e4b4378bf1fb31 But it likely stopped working at the 23.0.0 branchpoint: https://gitlab.freedesktop.org/mesa/mesa/-/commit/1026d29344192755dd340d6ac13a9674189d2d61
(In reply to A. Wilcox (awilfox) from comment #2) > /opt isn't necessarily correct either, imo. > > USE=-gbm should fix at least some parts of loading, and glapi can be built > static which should fix other parts. I was able to get Sway to seem to work > that way, but I haven't had time to debug X11 further yet - it was still > segfaulting for me on my Intel 945G test box (a 32-bit MacBook1,1). > > I'm not sure if it would be possible to rename libgbm to libgbm_amber or > such, to make gbm work again. I believe this is the way forward, but I'm > also trying to work with upstream to see what they think the best way to > approach this is. Maybe better using /usr/lib64/mesa? But i'm not sure how to handle multilib in that case. renaming libgbm to libgbm_amber will prevent using amber libgbm directly. For x11 on 945, it may segfaults without DRI=i915c xorg.conf option (because amber patch renames i915 to i915c). On KBL GT2 it tries to load iris_dri and crashes without correct DRI option, it seems, dri driver may be forced in xorg-intel driver
I don't have the ability/capacity to test and maintain mesa-amber. If it's going to continue to exist in ::gentoo, it needs a maintainer.