Problems with non Oracle boot JDKs and class file version 52
Erik Joelsson
erik.joelsson at oracle.com
Fri Dec 7 04:42:44 PST 2012
On 2012-12-07 13:06, David Holmes wrote:
> On 7/12/2012 8:31 PM, Erik Joelsson wrote:
>> How is configure picking up a jdk6?
>
> AFAIK it was the Java found first in the path.
>
For me, configure rejects jdk6 since we AFAIK require jdk7.
>> I'm not able to reproduce this for lack of access to an icedtea jdk7
>
> No Ubuntu systems? You can use bussund0416.us.oracle.com
I'm on ubuntu, but it's too old to have jdk7 on it.
>
>> installation. Any chance a "LOG=debug JOBS=1" log could be provided?
>
> Here's the failing command (edited for presentation):
>
> /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Xms64M -Xmx1100M
> -XX:PermSize=32m -XX:MaxPermSize=160m -XX:ThreadStackSize=1536 \
>
> -Xbootclasspath/a:/java/embedded/users/dh198349/build-infra/builds/b00/se-linux-i586-ea/jdk/classes
> \
>
> "-Xbootclasspath/p:/java/embedded/users/dh198349/build-infra/builds/b00/se-linux-i586-ea/langtools/dist/bootstrap/lib/javac.jar"
> -jar
> /java/embedded/users/dh198349/build-infra/builds/b00/se-linux-i586-ea/langtools/dist/bootstrap/lib/javac.jar
> \
> -XDprocess.packages -proc:only \
> -processor com.sun.tools.javac.sym.CreateSymbols \
>
> -Acom.sun.tools.javac.sym.Jar=/java/embedded/users/dh198349/build-infra/builds/b00/se-linux-i586-ea/images/lib/rt.jar
> \
>
> -Acom.sun.tools.javac.sym.Dest=/java/embedded/users/dh198349/build-infra/builds/b00/se-linux-i586-ea/images/symbols/META-INF/sym/rt.jar
> \
> java.applet java.awt java.awt.color java.awt.datatransfer
> java.awt.dnd java.awt.event java.awt.font java.awt.geom java.awt.im
> java.awt.im.spi java.awt.image java.awt.image.renderable
> java.awt.print java.beans java.beans.beancontext java.io java.lang
> ...
> com.sun.servicetag com.oracle.net com.oracle.nio
> Error occurred during initialization of VM
> java/lang/UnsupportedClassVersionError: sun/misc/PostVMInitHook :
> Unsupported major.minor version 52.0
>
> ----
>
> Now PostVMInitHook is a class from the closed/Oracle repo. So here is
> what I think is happening - this closed class gets referenced but
> because we are on an OpenJDK build it is not found in rt.jar, but is
> found in our freshly built jdk/classes - hence the jdk7 VM tries to
> load a JDK 8 class and fails.
>
> So it would seem that an OpenJDK VM can not be used to bootstrap the
> Oracle JDK.
>
> Not sure there is anything we can do about that except "don't do that".
>
> David
> -----
>
That's what I was suspecting, that open boot cannot bootstrap Oracle
JDK. Interesting that we get that far before it falls apart. This looks
like it's the generation of symbol files for ct.sym. I tried to
reproduce this by building an openjdk only image myself and then using
it as boot for a closed build, but that didn't fail.
Configure should try to detect if the bootjdk is unlikely to work at least.
/Erik
>>
>> /Erik
>>
>> On 2012-12-07 00:35, David Holmes wrote:
>>> I've now seen two people encounter problems trying to build Profiles
>>> using the new build system, when their boot JDK is the locally
>>> installed IcedTea openjdk distribution (7 in one case and 6 in
>>> another).
>>>
>>> The error occurs creating jar files eg
>>>
>>> Creating resources.jar
>>> Error occurred during initialization of VM
>>> java/lang/UnsupportedClassVersionError: sun/misc/PostVMInitHook :
>>> Unsupported major.minor version 52.0
>>>
>>> Are we using bootclasspath tricks that only work on Oracle JDK?
>>>
>>> David
>>>
More information about the build-infra-dev
mailing list