Created attachment 912972 [details] build.log Can't build =sys-devel/dwz-0.15-r3. Im use a llvm Profile. $emerge --info '=sys-devel/dwz-0.15-r3::gentoo' Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/llvm/systemd, gcc-14, glibc-2.40-r5, 6.11.10-gentoo-dist x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.11.10-gentoo-dist-x86_64-Intel-R-_Core-TM-_i9-14900K-with-glibc2.40 KiB Mem: 65661628 total, 56775788 free KiB Swap: 8388604 total, 8388604 free Timestamp of repository gentoo: Sun, 01 Dec 2024 15:48:24 +0000 Head commit of repository gentoo: f331c90f6a4beb960d9f0dffbd83adc208668fc0 Timestamp of repository guru: Sun, 01 Dec 2024 09:33:35 +0000 Head commit of repository guru: 365d878954f83f7cdadd94fc9e0f520d745fb991 sh bash 5.2_p37 ld GNU ld (Gentoo 2.43 p3) 2.43.1 app-misc/pax-utils: 1.3.8::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo dev-build/automake: 1.17-r1::gentoo dev-build/cmake: 3.31.1::gentoo dev-build/libtool: 2.5.4::gentoo dev-build/make: 4.4.1-r100::gentoo dev-build/meson: 1.6.0::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.7_p1::gentoo, 3.13.0::gentoo dev-lang/rust: 1.82.0-r100::gentoo, 1.83.0::gentoo sys-apps/baselayout: 2.17::gentoo sys-apps/sandbox: 2.40::gentoo sys-apps/systemd: 256.9::gentoo sys-devel/binutils: 2.43-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/clang: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-devel/gcc: 14.2.1_p20241116::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/lld: 18.1.8::gentoo, 19.1.4::gentoo sys-devel/llvm: 18.1.8-r6::gentoo, 19.1.4::gentoo sys-kernel/linux-headers: 6.11::gentoo (virtual/os-headers) sys-libs/glibc: 2.40-r5::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 local_ebuilds location: /var/db/repos/local_ebuilds masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="clang -c" CBUILD="x86_64-pc-linux-gnu" CC="clang" CFLAGS="-march=raptorlake -O2 -pipe -flto=thin -Werror=odr -Werror=strict-aliasing" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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" CPP="clang-cpp" CXX="clang++" CXXFLAGS="-march=raptorlake -O2 -pipe -flto=thin -Werror=odr -Werror=strict-aliasing" 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=raptorlake -O2 -pipe -flto=thin -Werror=odr -Werror=strict-aliasing" 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 merge-wait 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=raptorlake -O2 -pipe -flto=thin -Werror=odr -Werror=strict-aliasing" GENTOO_MIRRORS="https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/" LANG="en_US.UTF-8" LD="ld.lld" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed" LEX="flex" MAKEOPTS="-j38" 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=" -Ctarget-cpu=raptorlake -Clinker-plugin-lto" SHELL="/bin/bash" STRINGS="llvm-strings" STRIP="llvm-strip" USE="X aac acl amd64 apng branding bzip2 cet clang crypt dbus dist-kernel ffmpeg flac gdbm gif gmp gstreamer gtk gtk3 iconv ipv6 jpeg jpeg2k jpegxl libnotify libproxy libtirpc llvm-libunwind lto mp3 mpeg mpfr multilib ncurses nls ogg openmp opus pam pcre pgo png policykit pulseaudio readline seccomp ssl svg systemd test-rust theora threads tiff udev udisks unicode vorbis vpx vulkan x264 x265 xattr xvid zlib" 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" 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="libinput" KERNEL="linux" L10N="en en-US de de-DE" 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-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, 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
Indeed combination of https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/dwz/files/dwz-0.15-readelf.patch and `READELF="llvm-readelf"` does not work, as llvm-readelf does not support `-wi` parameter (llvm-dwarfdump allows to extract the same value, but it would require if-else in Makefile).
Created attachment 916044 [details] build.log (amd64, 0.15-r4) Same on 0.15-r4 on musl/llvm.
Created attachment 916045 [details] emerge --info
@lanodan The 2nd part of your dwz upstream patch https://sourceware.org/pipermail/dwz/2024q4/001435.html (../files/dwz-0.15-readelf.patch in Gentoo) unfortunately breaks the build on llvm profiles. As said in #1 READELF="llvm-readelf" does not support -wi parameter so the pointer size can't be grepped afterwards. Not applying dwz-0.15-readelf.patch works as a workaround. BTW thanks for your quick error-standalone fix!
> Not applying dwz-0.15-readelf.patch works as a workaround. Or having the $READELF environment variable being set to "${CHOST}-readelf", which is what I have as a workaround here as my machines use llvm profiles. Although maybe that workaround could be done in the ebuild? Not 100% sure how that could be done correctly.
> Although maybe that workaround could be done in the ebuild? There are cases when ebuilds probe tools (like OBJCOPY or READELF) in pkg_setup for flag support and override them with binutils. Sometimes it is not very accurate (example: https://bugs.gentoo.org/947826). I think a common function (maybe in toolchain-funcs) would be useful: - Accepts arbitrary tool name - local name=$(basename "$1") - Removes `llvm-` in the name, if any - Returns ${EPREFIX}/usr/bin/${name} So that it covers the following cases: READELF=llvm-readelf READELF=/usr/lib/llvm/18/bin/llvm-readelf READELF=/usr/lib/llvm/18/bin/readelf READELF=/usr/lib/llvm/18/bin/x86_64-pc-linux-gnu-readelf And in the individual ebuilds call this function if tool does not if ! "${READELF}" --help | grep -q '^ -w '; then READELF=tool-to-binutils "${READELF}" fi (disclaimer: I'm bad at naming, placement and highly-customized toolchains, so take my words with a grain of salt)
*** Bug 948879 has been marked as a duplicate of this bug. ***