RFR: JDK-8200083: Bump bootjdk used for JDK 11 at Oracle to JDK 10

Erik Joelsson erik.joelsson at oracle.com
Thu Apr 5 17:57:27 UTC 2018


On 2018-04-05 09:15, Jonathan Gibbons wrote:
> I think one aspect of this discussion that is important and has been 
> overlooked is that there is no clear statement (specification?) 
> anywhere of the requirements for building OpenJDK. Since forever, the 
> unwritten rule has been N-1 [*] and that assumption has become 
> pervasive. And, as we have seen in this discussion, there are many 
> consequences to changing that assumption.
>
I agree that this should be well defined. This practice is currently 
documented in the build documentation in doc/building.md. (See the 
relevant text quoted below.) It is also enforced by configure, with no 
workaround short of editing the script.
> I think that the decision to change the policy about the boot JDK is 
> too important to hide in an edit in an Oracle-only build configuration 
> file.
>
The intention of my second suggested patch was basically to keep 
allowing JDK 9 in configure for a while but being pretty sure it would 
stop working eventually. I don't like doing it that way. It's much 
better with a clear fail early error in configure, but the first 
suggested patch, that did just that, met such hard resistance and not a 
single positive review.
> To be clear, I'm not advocating here for any specific value of N-1, 
> N-2, etc,  I'm just saying the policy should be recorded in a more 
> public place than make/conf/jib-profiles.js, and should implicitly 
> apply to all folk wanting to build OpenJDK in the standard way, and 
> not be just about "building JDK 11 at Oracle".
>
Is the building doc a good enough place? If not, please suggest 
something better.

```
Paradoxically, building OpenJDK requires a pre-existing JDK. This is 
called the
"boot JDK". The boot JDK does not have to be OpenJDK, though. If you are
porting OpenJDK to a new platform, chances are that there already exists
another JDK for that platform that is usable as boot JDK.

The rule of thumb is that the boot JDK for building JDK major version *N*
should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 
would be
suitable as boot JDK. However, OpenJDK should be able to "build itself", 
so an
up-to-date build of the current OpenJDK source is an acceptable 
alternative. If
you are following the *N-1* rule, make sure you've got the latest update
version, since JDK 8 GA might not be able to build JDK 9 on all platforms.

Early in the release cycle, version *N-1* may not yet have been released. In
that case, the preferred boot JDK will be version *N-2* until version *N-1*
is available.
```

/Erik



More information about the build-dev mailing list