RFR: 8333282: Better warning if newly build JDK fails to run

Erik Joelsson erikj at openjdk.org
Thu May 30 16:28:02 UTC 2024


On Thu, 30 May 2024 15:02:38 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> If the newly built JDK fails to run ("DOA"), we will get a strange error message about jdk.compiler-gendata errors from make. The reason is not at all obvious.
> 
> Instead, we should make a simple check that we can actually use the new JDK before starting to use it for the first time, and report clearly to the user if this is not the case.

This doesn't look right to me. Why is the verification checking `javac` specifically? I would have thought checking `java` would be the natural launcher of choice. We use the buildjdk for multiple things, and the jdk.compiler/javadoc gendata targets aren't guaranteed to be the first ones to run. There is generate-link-opt-data, buildtools-modules as well as any jmod target.

Looking deeper into this, it seems we introduced the target `runnable-buildjdk` at some point, but forgot to update a bunch of other places to just use this target so we have this pattern of checking CREATE_BUILDJDK and CREATING_BUILDJDK repeated for multiple different targets which should probably just be using `runnable-buildjdk` as prereq. The `runnable-buildjdk` target would also be the right place to inject this verification, but for that to work, we need to fix all the other targets that should be depending on it.

-------------

PR Review: https://git.openjdk.org/jdk/pull/19484#pullrequestreview-2088797438


More information about the build-dev mailing list