When emerging kodi 19.4 the build fails with the following error message (let me know if the full build log is needed): CMake Error at /usr/share/cmake/Modules/FindJava.cmake:171 (message): Error executing java -version Call Stack (most recent call first): xbmc/interfaces/swig/CMakeLists.txt:32 (find_package) 19.3-r1 worked just fine with same use flags. According to random forum post from 7 years ago, java is needed during bootstrap, but gentoo has previously used pre-bootstrapped code (?): https://forum.kodi.tv/showthread.php?tid=233523 Reproducible: Always Steps to Reproduce: 1. emerge media-tv/kodi-19.4 without java installed Actual Results: kodi fails to build Expected Results: kodi is built activated use flags: [ebuild U ~] media-tv/kodi-19.4::gentoo [19.3-r1::gentoo] USE="X alsa bluetooth bluray (caps) css dbus lcms mysql optical power-control pulseaudio (system-ffmpeg) udev udf udisks vaapi vdpau wayland xslt -airplay -cec -dav1d -eventclients -gbm -gles -libusb -lirc -mariadb -nfs (-raspberry-pi) -samba -test -upnp -upower -webserver -zeroconf" CPU_FLAGS_X86="sse sse2 sse3 sse4_1 sse4_2 -avx -avx2" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10" 0 KiB emerge --info: Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/feffe/server, gcc-11.2.0, glibc-2.33-r7, 5.15.23-gentoo-dist x86_64) ================================================================= System uname: Linux-5.15.23-gentoo-dist-x86_64-Intel-R-_Xeon-R-_CPU_W3520_@_2.67GHz-with-glibc2.33 KiB Mem: 6072628 total, 1431052 free KiB Swap: 16760828 total, 16734192 free Timestamp of repository gentoo: Sat, 05 Mar 2022 03:15:01 +0000 Head commit of repository gentoo: 9252dcaaacc8f5b6a118ec044dd87e244b0c2870 Head commit of repository feffe: a9e20d60f7038c18a76fdc561404d6be3c3400ae sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.3::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0-r6::gentoo dev-lang/python: 2.7.18_p13::gentoo, 3.9.9-r1::gentoo, 3.10.0_p1-r1::gentoo dev-lang/rust: 1.58.1::gentoo dev-util/cmake: 3.22.2::gentoo dev-util/meson: 0.60.3::gentoo sec-policy/selinux-base: 2.20210908-r1::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.4::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4::gentoo sys-devel/clang: 13.0.0::gentoo sys-devel/gcc: 11.2.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/lld: 13.0.0::gentoo sys-devel/llvm: 13.0.0::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r7::gentoo sys-libs/libselinux: 3.3::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: true sync-rsync-verify-jobs: 1 feffe location: /var/db/repos/feffe sync-type: git sync-uri: https://gitea.fulh.ax/feffe/feffe-portage-overlay.git masters: gentoo priority: 100 sync-git-verify-commit-signature: false ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -Primate-Plunge -worklog-assistant -GOG-EULA -microsoft-edge -f.lux -MTA-0.5 -PUEL -ms-teams-pre -Vivaldi -PassMark -EULA -Synology -NVIDIA-CUDA -bestcrypt -google-chrome -Sourcetrail -PAPERS-PLEASE -SPS -LOKI-EULA -CAPYBARA-EULA -NVIDIA-CODEC-SDK - geekbench -Introversion -WPS-EULA -ETQW -Steam -Q3AEULA-20000111 -ubiquiti -zi-labone -baudline -genymotion -AMD-GPU-PRO-EULA -Gamepl ay-Group-EULA -Intel-SDP -RAR -supermicro -2dboy-EULA -TIK -GIMPS -QUAKE4 -AnyDesk-TOS -BCS -TeamViewer -teamspeak3 -JoyPixels -FAH-E ULA-2014 -Microsemi -OPERA-2018 -Mojang -MakeMKV-EULA -Microsoft-vscode -ut2003 -Aseprite-EULA -Flightradar24 -teamspeak5 -Coherent-G raphics -ut2003-demo -THINKTANKS" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nehalem" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /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 /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nehalem" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--usepkg --binpkg-respect-use=y --binpkg-changed-deps=y --usepkg-exclude=sys-fs/zfs --usepkg-exclude=sys-fs/zfs- kmod" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XA UTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=nehalem" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if- modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox parallel-fetch preserve-libs protec t-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfet ch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=nehalem" GENTOO_MIRRORS="https://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.snt.utwente.nl/pub/os/linux/gentoo https://www.mirrorservice.o rg/sites/distfiles.gentoo.org/" LANG="sv_SE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="sv en" MAKEOPTS="-j9" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stat s --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X aacs acl alsa amd64 archive audit bdplus berkdb bluetooth bluray bzip2 cairo caps cjk colord conntrack corefonts crypt cryptse tup cups dbus device-mapper dist-kernel dnssec dri drm dvd egl elogind exif fcitx4 fontconfig fortran gdbm gif gpg gssapi gtk gui har dened harfbuzz hdri heif http2 hwaccel iconv icu idn iproute2 ipset ipv6 jpeg kerberos lapack lcms ldap libde265 libglvnd libkms libn otify libtirpc lz4 lzma modemmanager mp3 multilib native-headset ncurses networkmanager nftables nls nptl nss ocr ofono-headset ogg o pengl openmp optical opus pam pcre pie pkcs11 pkcs7 png policykit printsupport pulseaudio python qt qt5 raw rdp readline ruby rustfmt scanner seccomp selinux smartcard spell spice split-usr sqlite ssh ssl ssp svg systray tiff tray truetype udev udf udisks unicode us b usbredir v4l vaapi vdpau vim-syntax vnc vorbis wallpapers wayland webp widgets wifi x265 xattr xfs xft xinerama xmp xtpax zfs zimg zlib" ABI_X86="64 32" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic auth n_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoi ndex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_conf ig logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEAT URES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse s se2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isy nc itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt u blox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="sv en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd 44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LU A_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SI NGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="dummy intel i965 iris" XT ABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77F LAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAG E_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STR IP, YACC, YFLAGS
Java is required and is expressed correctly as a DEPENDS dependency. It seems you don't have Java correctly installed. What happens when you run: * java -version * java-config -L In any case, this issue isn't a problem with Kodi - it's a problem with the Java installation on your system.
aah, sorry I guess I should have checked that; You're absolutely correct. I was confused because a jre was not installed, and was not installed by emerge -uDN, but I forgot to check if jdk was installed (which it obviously was). The problem was that the system java vm was pointing to an old version that had been uninstalled. I guess for some reason portage didn't change the system java vm when upgrading from java 8 to 11. 'eselect java-vm set system 1' fixed the problem. Sorry for the noise!