Created attachment 922559 [details] Build log for llvm-runtimes/offload-20.1.1 Suspected issue was due to mold or LTO. I disabled those for this package and ran into the same issue, using default linker and no LTO. Therefore, it isn't a mold or LTO issue. emerge --info output: Portage 3.0.67 (python 3.13.2-final-0, default/linux/amd64/23.0/hardened, gcc-14, glibc-2.41-r1, 6.12.6-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.12.6-gentoo-x86_64-12th_Gen_Intel-R-_Core-TM-_i7-12700K-with-glibc2.41 KiB Mem: 131672380 total, 90404344 free KiB Swap: 62498812 total, 62498812 free Timestamp of repository gentoo: Mon, 24 Mar 2025 20:35:29 +0000 Head commit of repository gentoo: 1796c69fc43da5102ecf762834625809d212ad9f Timestamp of repository guru: Mon, 24 Mar 2025 10:05:15 +0000 Head commit of repository guru: f6c723bc8c4887177cf82e651eea01434316eddb Timestamp of repository librewolf: Sat, 22 Mar 2025 06:50:55 +0000 Head commit of repository librewolf: dc6bc24d78429252bf0c9cb83c0e71e990fde9e1 Timestamp of repository tatsh-overlay: Mon, 24 Mar 2025 10:05:14 +0000 Head commit of repository tatsh-overlay: 38d62cd7dae3f45afbabe1a4b3ddf2ad308aa25b Timestamp of repository wayland-desktop: Wed, 19 Mar 2025 21:04:16 +0000 Head commit of repository wayland-desktop: a257d5b684e1ef0021732b1f6f4b98da1810ba3b sh dash 0.5.12-r1 ld GNU ld (Gentoo 2.44 p1) 2.44.0 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.71-r7::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo, 1.17-r2::gentoo dev-build/cmake: 3.31.6-r1::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.7.0::gentoo dev-lang/perl: 5.40.1::gentoo dev-lang/python: 3.12.9::gentoo, 3.13.2::gentoo, 3.13.2-r100::gentoo dev-lang/rust: 1.83.0-r2::gentoo, 1.84.0-r1::gentoo, 1.84.1-r1::gentoo, 1.85.0-r1::gentoo, 1.85.1::gentoo llvm-core/clang: 19.1.7::gentoo, 20.1.1::gentoo llvm-core/lld: 19.1.7::gentoo, 20.1.1::gentoo llvm-core/llvm: 19.1.7::gentoo, 20.1.1::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/openrc: 0.60.1::gentoo sys-apps/sandbox: 2.46::gentoo sys-devel/binutils: 2.44::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 14.2.1_p20250301::gentoo sys-devel/gcc-config: 2.12.1::gentoo sys-kernel/linux-headers: 6.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.41-r1::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False librewolf location: /var/db/repos/librewolf sync-type: git sync-uri: https://github.com/gentoo-mirror/librewolf.git masters: gentoo volatile: False local location: /var/db/repos/local 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 wayland-desktop location: /var/db/repos/wayland-desktop sync-type: git sync-uri: https://github.com/gentoo-mirror/wayland-desktop.git masters: gentoo volatile: False Binary Repositories: gentoobinhost priority: 1 sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE FREE OSI-APPROVED -EULA WTFPL bh-luxi bungie-marathon free-noncomm freedist intel-ucode lha linux-fw-redistributable" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=alderlake -mabm -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=25600 -O3 -pipe -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=alderlake -mabm -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=25600 -O3 -pipe -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" DISTDIR="/var/tmp/dist" EMERGE_DEFAULT_OPTS="-ajvD" 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=alderlake -mabm -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=25600 -O3 -pipe -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live candy clean-logs collision-protect config-protect-if-modified distlocks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr" FFLAGS="-march=alderlake -mabm -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=25600 -O3 -pipe -flto=8 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -fuse-ld=mold -Wl,-s -Wl,-z,pack-relative-relocs -Wl,-z,combreloc" LEX="reflex" MAKEOPTS="-j41 -l20" PKGDIR="/var/tmp/pkg" 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=native -C opt-level=3" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bzip2 cairo cdda cdr cet crypt cups custom-cflags dbus device-mapper dracut dri drm dts dvd dvdr elogind encode exif ffmpeg flac gdbm gif gles2 gpm grub gtk gui hardened harfbuzz iconv icu ipv6 jemalloc jit jpeg kf6compat lcms libnotify libtirpc lto lua lvm mad man mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf pgo pic pie pipewire png policykit ppds pulseaudio python qml qt5 qt6 readline savedconfig sdl seccomp sound spell ssl ssp startup-notification svg symlink test-rust threads tiff truetype udev udisks unicode upower usb verify-sig vorbis vulkan wayland widgets wxwidgets x264 xattr xcb xft xml xtpax xv xvid xwayland zlib" ABI_X86="32 64" ADA_TARGET="gcc_14" 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 sha 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 libinput joystick vmmouse" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_SLOT="19" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-1 lua5-4" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads quadmath" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_13" PYTHON_TARGETS="python3_12 python3_13" RUBY_TARGETS="ruby34" VIDEO_CARDS="intel" 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, SIZE, STRINGS, STRIP, YACC, YFLAGS ================================================================= Package Settings ================================================================= llvm-runtimes/offload-20.1.0::gentoo was built with the following: USE="debug verify-sig -ompt -test" ABI_X86="(64)" LLVM_TARGETS="-AMDGPU -NVPTX" CFLAGS="-march=alderlake -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk -O3 -pipe -Werror=odr -Werror=strict-aliasing" CXXFLAGS="-march=alderlake -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk -O3 -pipe -Werror=odr -Werror=strict-aliasing"
Rebuild llvm-core/llvm with GNU ld to confirm, please.
(In reply to Michał Górny from comment #1) > Rebuild llvm-core/llvm with GNU ld to confirm, please. Confirmed, this occurs even after rebuilding llvm-core/llvm with GNU ld.
I suppose as the next step you could try building offload with GCC, or rebuilding LLVM with GCC and building offload with Clang, to figure out which of these packages is being messed up by Clang (possibly both).
(In reply to Michał Górny from comment #3) > I suppose as the next step you could try building offload with GCC, or > rebuilding LLVM with GCC and building offload with Clang, to figure out > which of these packages is being messed up by Clang (possibly both). Attempted building Offload with forced GCC and no Mold. Same symbols reported as undefined. Attempted building LLVM with forced GCC and no Mold, then building Offload with forced GCC and no Mold. Same symbols reported as undefined. I hope this information is useful.