The Java class files installed by dev-java/ant-core-1.10.9-r4 are on version 53.0 because the package depends on >=virtual/jdk-1.9:* rather than >=1.8. This will cause the following error when merging ebuilds that strictly depend on virtual/jdk:1.8 (instead of >=virtual/jdk-1.8:*) and rely on dev-java/ant-core for the build process. These ebuilds always use JDK 1.8 as the build VM. JDK 1.8 only supports class file versions up to 52.0, so in this situation, Ant cannot run properly to build the project: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:473) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601) Example ebuilds that depend on virtual/jdk:1.8 (instead of >=virtual/jdk-1.8:*) and dev-java/ant-core, and cannot be built by dev-java/ant-core-1.10.9-r4 include: - dev-java/jna-4.2.2-r3 - dev-java/commons-lang-2.6-r2 The build log for each ebuild will be attached below in separate comments.
Created attachment 779693 [details] dev-java/jna-4.2.2-r3 build.log
Created attachment 779696 [details] dev-java/commons-lang-2.6-r2 build.log
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b24498c7e502a18bac9b4f42e94bf479bb96a34c commit b24498c7e502a18bac9b4f42e94bf479bb96a34c Author: Florian Schmaus <flow@gentoo.org> AuthorDate: 2022-05-21 18:17:55 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-05-21 18:17:55 +0000 dev-java/ant-core: lower min Java to 8 again Turns out that raising ant-core's min Java requirement to 9, while fixing bug #831290, renders ant unable to build pure Java 8 packages (of which we have a few, most prominently jna), see bug #846782. We go back to Java 8 again, until we find a better solution. Bug: https://bugs.gentoo.org/846782 Bug: https://bugs.gentoo.org/831290 Signed-off-by: Florian Schmaus <flow@gentoo.org> .../ant-core/{ant-core-1.10.9-r4.ebuild => ant-core-1.10.9-r5.ebuild} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
*** Bug 831290 has been marked as a duplicate of this bug. ***
~dev-java/ant-core-1.10.5 is gone. re-tested with dev-java/ant-1.10.14-r3, compiled with jdk:21 then changed system-vm to openjdk-bin:8 and emerged dev-lang/tuprolog-3.2.0-r1 without errors. Closing.