>>> Configuring source in /var/tmp/portage/dev-java/eclipse-ecj-4.21/work ... >>> Source configured. >>> Compiling source in /var/tmp/portage/dev-java/eclipse-ecj-4.21/work ... * Compiling ... ./org/eclipse/jdt/internal/compiler/apt/model/TypeElementImpl.java:36: error: cannot find symbol import javax.lang.model.element.RecordComponentElement; ^ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no_multilib_hardened-j4-20220118-021045 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-9.3.1 [2] x86_64-pc-linux-gnu-11.2.1 * clang/llvm (if any): clang version 13.0.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/13/bin /usr/lib/llvm/13 13.0.0 Python 3.9.10 Available Ruby profiles: [1] ruby26 (with Rubygems) [2] ruby27 (with Rubygems) [3] ruby30 (with Rubygems) * Available Rust versions: [1] rust-1.58.0 * GENTOO_VM=openjdk-bin-11 CLASSPATH="" JAVA_HOME="/opt/openjdk-bin-11.0.13_p8" JAVACFLAGS="-source 11 -target 11" COMPILER="" The following VMs are available for generation-2: *) AdoptOpenJDK 11.0.13_p8 [openjdk-bin-11] 2) AdoptOpenJDK 8.312_p07 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 [2] openjdk-bin-11 system-vm The Glorious Glasgow Haskell Compilation System, version 8.10.4 php cli: HEAD of ::gentoo commit 9c36997e331cbfbdbbb57ddbc74e946ea197f270 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Thu Jan 20 03:21:51 2022 +0000 2022-01-20 03:21:50 UTC emerge -qpvO dev-java/eclipse-ecj [ebuild N ] dev-java/eclipse-ecj-4.21 USE="ant -doc -source"
Created attachment 762780 [details] emerge-info.txt
Created attachment 762781 [details] dev-java:eclipse-ecj-4.21:20220120-042155.log
Created attachment 762782 [details] emerge-history.txt
Created attachment 762783 [details] environment
Created attachment 762784 [details] etc.portage.tar.bz2
Created attachment 762785 [details] logs.tar.bz2
*** Bug 832171 has been marked as a duplicate of this bug. ***
I think this might work with OpenJDK 17 but _not_ 11.
I just encountered this same bug with eclipse-ecj-4.22 using openjdk-bin:11 to (fail to) build it. I wouldn't be surprised if this did succeed with JDK 17, since records were first introduced in version 14 of Java. However, since I can't seem to switch to version 17 through eselect, I can't check for myself if it'll build.
Workaround that makes it compile after recompiling openjdk (though I'm not sure if its correct or not): /etc/portage/profile/package.use.mask: dev-java/openjdk:17 -gentoo-vm /etc/portage/package.use: dev-java/openjdk:17 gentoo-vm /etc/portage/env/java17.conf: JAVA_PKG_FORCE_VM="openjdk-17" /etc/portage/package.env: dev-java/eclipse-ecj java17.conf