[jdk11u-dev] It is no longer possible to build jdk11u with a jdk10 boot JDK and --with-jtreg
Severin Gehwolf
sgehwolf at redhat.com
Wed Jun 5 16:44:27 UTC 2024
Hi,
Thanks for bringing this up!
On Wed, 2024-06-05 at 09:53 +0200, Frederic Thevenet wrote:
> Hi,
>
> The build guide over on openjdk.org states that the "the boot JDK for
> building JDK major version N should be a JDK of major version N-1".
> This, however, appears to no longer be possible for 11u since 11.0.24+3
> under certain circumstances.
> Starting with the backport of 8314495[2], 'configure' now enforces that
> the version of jtreg passed using '--with-jtreg' is 7.3.1 or higher as
> it now requires jtreg 7.3.1 [1] and fails if this is not the case.
> Jtreg 7.x, however, requires jdk11 or higher.
>
> As a result, when attempting to build jdk11u from the latest tag with a
> jdk 10 bootJDK, you'll either be presented with the following error when
> running configure with jtreg 6.x:
> "configure: error: jtreg version is too old, at least version 7.3.1 is
> required"
>
> Or the following error when using jtreg 7.3.1:
> "checking jtreg version number... Error: LinkageError occurred while
> loading main class com.sun.javatest.regtest.Main
> java.lang.UnsupportedClassVersionError:
> com/sun/javatest/regtest/Main has been compiled by a more recent version
> of the Java Runtime (class file version 55.0), this version of the Java
> Runtime only recognizes class file versions up to 54.0"
>
> As a result, it is only possible to successfully run configure using
> jdk11 as the bootJDK, which is in direct contradiction with the
> statement from the openjdk build guide, so I think it is important that
> things are clarified in one way or another.
I believe it's fine to require a JDK 11 boot JDK for running tests. The
build itself should work fine with JDK 10 and the result could then be
used to use "make run-test" workflow.
Feel free to open a JDK 11 specific bug to fix the configure check that
if --with-jtreg is being used the boot JDK needs to be 11.
Thanks,
Severin
More information about the jdk-updates-dev
mailing list