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

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Apr 5 23:50:18 UTC 2018

On 4/5/18 10:57 AM, Erik Joelsson wrote:
> 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.

That seems bad, because you're kicking the bucket down the road in a way 
that will cause obscure failures because of parts of the system assuming 
a boot JDK of 10. I think it is better to  have the "boot JDK policy" 
discussion, and to arrive at a decision, and to then follow through on 
that decision, updating docs, scripts and source code accordingly.

If the policy is going to change from "use JDK N-1", that new policy 
needs to be documented.

If the policy is going to be that "use JDK N-1; you're on your own if 
you want to use JDK 9 as a boot JDK" then editing the configure script 
is surely going to be the least of the worries.

-- Jon

>> 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 jdk-dev mailing list