All openjdk packages fail to build on clang-only systems with multiple issues each. I'll go through the issues in the following comments. emerge --info !!! No gcc found. You probably need to 'source /etc/profile' !!! to update the environment of this terminal and possibly !!! other terminals also. Portage 3.0.65 (python 3.12.3-final-0, targets/desktop, [unavailable], musl-1.2.4-r2, 6.6.38-gentoo x86_64) ================================================================= System uname: Linux-6.6.38-gentoo-x86_64-AMD_Ryzen_7_5700X_8-Core_Processor-with-libc KiB Mem: 16309072 total, 11927728 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sat, 13 Jul 2024 19:00:00 +0000 Head commit of repository gentoo: 7e765ff32ffbeb961cfc0732a456911ef540a05d Head commit of repository clang-musl: 4651ba04bc8e8d93ac06540864f8ddab2996c2cf Timestamp of repository guru: Fri, 12 Jul 2024 17:48:59 +0000 Head commit of repository guru: f614aeb0833c8ef8e2fa7351c4b73b729862f8b4 Timestamp of repository haskell: Fri, 12 Jul 2024 07:49:09 +0000 Head commit of repository haskell: b379138997e27d5ad7a17a3f2738ece89ddc742a Timestamp of repository libressl: Fri, 12 Jul 2024 07:49:10 +0000 Head commit of repository libressl: 2253f50093d59a79cf8d7645a716fa8bb07461b3 sh bash 5.2_p26-r6 ld LLD 17.0.6 (compatible with GNU linkers) app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p26-r6::gentoo dev-build/autoconf: 2.13-r8::gentoo, 2.71-r7::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.1::gentoo dev-java/java-config: 2.3.3-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.11.9-r1::libressl, 3.12.3-r1::libressl dev-lang/rust: 1.77.1::libressl sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.54.2::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-r1::gentoo (virtual/os-headers) sys-libs/musl: 1.2.4-r2::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-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 3 sync-rsync-extra-opts: clang-musl location: /var/db/repos/clang-musl sync-type: git sync-uri: https://github.com/clang-musl-overlay/clang-musl-overlay.git masters: gentoo volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False haskell location: /var/db/repos/haskell sync-type: git sync-uri: https://github.com/gentoo-mirror/haskell.git masters: gentoo volatile: False libressl location: /var/db/repos/libressl sync-type: git sync-uri: https://github.com/gentoo-mirror/libressl.git masters: gentoo 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/23.0/x86-64_musl_llvm ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="clang -c" CBUILD="x86_64-pc-linux-musl" CC="clang" CFLAGS="-march=native -O3 -pipe -flto=thin" CHOST="x86_64-pc-linux-musl" 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/sandbox.d" CPP="clang-cpp" CXX="clang++" CXXFILT="llvm-cxxfilt" CXXFLAGS="-march=native -O3 -pipe -flto=thin" 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 -O3 -pipe -flto=thin" 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 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 -O3 -pipe -flto=thin" GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/" INSTALL_MASK="charset.alias /usr/share/locale/locale.alias" LANG="en_US.UTF-8" LD="ld.lld" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,-O2 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j16 -l16" 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 link-arg=-Wl,-z,pack-relative-relocs" SHELL="/bin/bash" STRINGS="llvm-strings" STRIP="llvm-strip" USE="X a52 aac acl acpi alsa amd64 apparmor avif branding bzip2 cairo cet clang crypt cups dbus djvu dri dts egl elogind encode evdev exif fbcon ffmpeg flac flatpak fontconfig gif git gles2 gles2-only gnome-keyring gpm gstreamer gtk gui hardened hwloc iconv icu imagemagick ipv6 jpeg keyring kf6compat lcms libass libedit libnotify libproxy libsamplerate libtirpc llvm-libunwind lm-sensors lto lv2 mad magic man mng mp3 mp4 mpeg mpris ncurses nls ogg openal opencl opengl openmp openssl opus pam pango pcre pdf pgo pic pie pipewire png policykit postscript ppds pulseaudio qt5 readline screencast sdl seccomp sound spell sqlite ssl ssp startup-notification svg svg2 syslog test-rust tiff truetype udev udisks uefi unicode usb vaapi vorbis vpx vulkan wayland webp x264 xattr xft xml xtpax xxhash zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" ALSA_CARDS="emu10k1" 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 sse4a ssse3 vpclmulqdq" 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" LLVM_TARGETS="AMDGPU BPF" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeonsi" 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, 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 I'm using custom local profile which emerge --info isn't reflecting: local:musl/llvm/hardened/desktop
> All openjdk packages fail to build on clang-only systems with multiple issues each. I'll go through the issues in the following comments. Please file one bug per issue, as it's easier to manage. Thanks.
Created attachment 897632 [details, diff] Fixes upstream configure file
Configure: Package needs this patch to successfully configure on clang-only system. Ideally upstream needs to fix configure file for versions 11,17,21. Configure will search for c++filt which isn't present on clang-only systems. sys-devel/llvm-toolchain-symlinks package need cxxfilt added in ebuild so the proper symlink is created. As a temporary workaround, a symlink can be created manually. It probably wouldn't hurt either for CXXFILT="llvm-cxx-filt" to be set in make.defaults for llvm profiles. I don't know about lld:18 but for lld:17, this ldflag -Wl,--undefined-version needs added to ebuilds or compilation will fail. A cxx-stdlib check also needs added to ebuild to check for libc++. If libc++ is being used, linking must be dynamic or compilation will fail. With the default static linking, package will try to link libstdc++ and libgcc. I have already fixed this package (openjdk:21) on my system with all of the above fixes and it builds perfectly. The same concepts need to be applied to versions 11 & 17 also. I can undo my changes one by one if you really need to see build errors.
Sorry, I didn't see your reply when i add the additional comments