Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925416 - media-libs/mesa-24.0.1[-llvm] fails to compile: ld.lld: error: undefined symbol: ac_rtld_open because of missing virtual/libelf dependency
Summary: media-libs/mesa-24.0.1[-llvm] fails to compile: ld.lld: error: undefined symb...
Status: RESOLVED FIXED
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: 2024-02-24 12:25 UTC by Kostadin Shishmanov
Modified: 2024-02-28 20:28 UTC (History)
0 users

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


Attachments
build log compressed with xz (build.log.xz,47.67 KB, application/x-xz)
2024-02-24 12:25 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2024-02-24 12:25:30 UTC
Created attachment 885853 [details]
build log compressed with xz

media-libs/mesa-24.0.1 fails to compile because having USE=-llvm makes the ebuild not pull in virtual/libelf, when manually installed the build finishes fine.

FAILED: src/gallium/targets/va/libgallium_drv_video.so 
clang++  -o src/gallium/targets/va/libgallium_drv_video.so src/gallium/targets/va/libgallium_drv_video.so.p/target.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libgallium_drv_video.so -Wl,--whole-archive src/gallium/frontends/va/libva_st.a -Wl,--no-whole-archive -march=native -O2 -pipe -flto=thin -Werror=odr -fno-lto -fno-lto -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,--sort-common src/gallium/auxiliary/libgalliumvlwinsys.a src/util/libmesa_util.a src/util/libmesa_util_sse41.a src/util/blake3/libblake3.a src/c11/impl/libmesa_util_c11.a src/gallium/auxiliary/libgalliumvl.a src/compiler/nir/libnir.a src/compiler/libcompiler.a src/gallium/auxiliary/libgallium.a src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a src/loader/libloader.a src/util/libxmlconfig.a src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a src/gallium/winsys/sw/dri/libswdri.a src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a src/amd/compiler/libaco.a src/gallium/drivers/radeonsi/libradeonsi_gfx7.a src/gallium/drivers/radeonsi/libradeonsi_gfx8.a src/gallium/drivers/radeonsi/libradeonsi_gfx9.a src/gallium/drivers/radeonsi/libradeonsi_gfx10.a src/gallium/drivers/radeonsi/libradeonsi_gfx103.a src/gallium/drivers/radeonsi/libradeonsi_gfx11.a src/gallium/drivers/radeonsi/libradeonsi_gfx115.a src/gallium/drivers/radeonsi/libradeonsi.a src/gallium/winsys/radeon/drm/libradeonwinsys.a src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a src/amd/vpelib/liblibvpe.a.a -Wl,--version-script /var/tmp/portage/media-libs/mesa-24.0.1/work/mesa-24.0.1-abi_x86_64.amd64/src/gallium/targets/va/va.sym -Wl,--dynamic-list /var/tmp/portage/media-libs/mesa-24.0.1/work/mesa-24.0.1/src/gallium/targets/va/../dri.dyn -Wl,--gc-sections -Wl,--build-id=sha1 /usr/lib/libdrm.so /usr/lib/libz.so -pthread -lm /usr/lib/libzstd.so /usr/lib/libxcb-sync.so /usr/lib/libxcb-present.so /usr/lib/libxshmfence.so /usr/lib/libxcb-xfixes.so /usr/lib/libxcb-dri3.so /usr/lib/libexpat.so /usr/lib/libxcb.so /usr/lib/libxcb-randr.so /usr/lib/libdrm_radeon.so /usr/lib/libdrm_amdgpu.so /usr/lib/libX11-xcb.so /usr/lib/libX11.so /usr/lib/libxcb-dri2.so -Wl,--end-group
ld.lld: error: undefined symbol: ac_rtld_open
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_create_compute_state) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_launch_grid) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_debug.c
>>>               libradeonsi.a.p/si_debug.c.o:(si_add_split_disasm) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced 2 more times

ld.lld: error: undefined symbol: ac_rtld_get_section_by_name
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_create_compute_state) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_launch_grid) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_debug.c
>>>               libradeonsi.a.p/si_debug.c.o:(si_add_split_disasm) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced 1 more times

ld.lld: error: undefined symbol: ac_rtld_close
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_create_compute_state) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_compute.c
>>>               libradeonsi.a.p/si_compute.c.o:(si_launch_grid) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced by si_debug.c
>>>               libradeonsi.a.p/si_debug.c.o:(si_print_annotated_shader) in archive src/gallium/drivers/radeonsi/libradeonsi.a
>>> referenced 36 more times

ld.lld: error: undefined symbol: ac_rtld_upload
>>> referenced by si_state_draw.cpp
>>>               libradeonsi_gfx9.a.p/si_state_draw.cpp.o:(bool si_update_shaders<(amd_gfx_level)11, (si_has_tess)0, (si_has_gs)0, (si_has_ngg)0>(si_context*)) in archive src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
>>> referenced by si_state_draw.cpp
>>>               libradeonsi_gfx103.a.p/si_state_draw.cpp.o:(bool si_update_shaders<(amd_gfx_level)13, (si_has_tess)0, (si_has_gs)0, (si_has_ngg)0>(si_context*)) in archive src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
>>> referenced by si_state_draw.cpp
>>>               libradeonsi_gfx11.a.p/si_state_draw.cpp.o:(bool si_update_shaders<(amd_gfx_level)14, (si_has_tess)0, (si_has_gs)0, (si_has_ngg)1>(si_context*)) in archive src/gallium/drivers/radeonsi/libradeonsi_gfx11.a
>>> referenced 26 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Kostadin Shishmanov 2024-02-24 12:25:44 UTC
Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.0/musl/clang, [unavailable], musl-1.2.3-r8, 6.6.17-gentoo x86_64)
=================================================================
System uname: Linux-6.6.17-gentoo-x86_64-13th_Gen_Intel-R-_Core-TM-_i5-13600KF-with-libc
KiB Mem:    16233124 total,   2731236 free
KiB Swap:   16232444 total,  14842620 free
Timestamp of repository gentoo: Sat, 24 Feb 2024 11:20:39 +0000
Head commit of repository gentoo: 264879c97ac75b3300b0946b7519c40b66c51f3a

sh bash 5.1_p16-r6
ld LLD 17.0.6 (compatible with GNU linkers)
app-misc/pax-utils:       1.3.7::gentoo
app-shells/bash:          5.1_p16-r6::gentoo
dev-build/autoconf:       2.71-r6::gentoo, 2.72-r1::gentoo
dev-build/automake:       1.16.5-r2::gentoo
dev-build/cmake:          3.27.9::gentoo
dev-build/libtool:        2.4.7-r1::gentoo
dev-build/make:           4.4.1-r1::gentoo
dev-build/meson:          1.3.0-r2::gentoo
dev-lang/perl:            5.38.2-r1::gentoo
dev-lang/python:          3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:            1.74.1::local
sys-apps/baselayout:      2.14-r2::gentoo
sys-apps/openrc:          0.53::gentoo
sys-apps/sandbox:         2.38::gentoo
sys-devel/clang:          17.0.6::gentoo
sys-devel/lld:            17.0.6::gentoo
sys-devel/llvm:           17.0.6::gentoo
sys-kernel/linux-headers: 6.6::gentoo (virtual/os-headers)
sys-libs/musl:            1.2.3-r8::gentoo
Repositories:

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

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

Binary Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-march=native -O2 -pipe -flto=thin -Werror=odr"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=native -O2 -pipe -flto=thin -Werror=odr"
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="-march=native -O2 -pipe -flto=thin -Werror=odr"
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 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=native -O2 -pipe -flto=thin -Werror=odr"
GENTOO_MIRRORS="     https://mirror.telepoint.bg/gentoo      http://tux.rainside.sk/gentoo/     http://gentoo.mirror.root.lu/     ftp://tux.rainside.sk/gentoo/     http://ftp.vectranet.pl/gentoo/ "
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias"
LANG="en_GB.UTF-8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,--sort-common"
LEX="flex"
MAKEOPTS="-j20"
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"
READELF="llvm-readelf"
RUSTFLAGS="-C target-cpu=native -C opt-level=3 -C link-arg=-Wl,-O1,--sort-common,--as-needed"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X aac acl acpi activities amd64 branding bzip2 cairo cdr clang cli crypt dbus declarative dri dvdr encode exif flac flatpak fortran gdbm gif gtk gui iconv icu jpeg kde kwallet lcms libnotify libtirpc llvm-libunwind lzma mad mng mp3 mp4 mpeg ncurses networkmanager nls ogg opengl openmp pam pango pcre pdf pic pipewire plasma png policykit ppds pulseaudio qml qt5 readline screencast sdl seccomp sound split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xv zlib zstd" 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" ELIBC="musl" 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" 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" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, SIZE, YACC, YFLAGS
Comment 2 Larry the Git Cow gentoo-dev 2024-02-28 20:26:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b8373dbaa67d89e86ab951d2f47b76cc9ccd0a4

commit 0b8373dbaa67d89e86ab951d2f47b76cc9ccd0a4
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2024-02-28 20:25:23 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2024-02-28 20:26:41 +0000

    media-libs/mesa: Depend on libelf for radeonsi
    
    Closes: https://bugs.gentoo.org/925416
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 media-libs/mesa/mesa-9999.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Comment 3 Matt Turner gentoo-dev 2024-02-28 20:28:11 UTC
Thanks! I found that this had been reported at least 4 times upstream before a fix landed /o\

The upstream fix is https://gitlab.freedesktop.org/mesa/mesa/-/commit/d9f15f8d9ba5f920b77132e5b688f1f08cf8db04

We now depend on libelf unconditionally for VIDEO_CARDS=radeonsi in mesa-24.0.2.