OpenJDK 10 zero For Mips32el java -version IncompatilveClassChangeError
William Larson
wlarsong at gmail.com
Fri Jun 5 17:27:08 UTC 2020
Hello Magnus
I got the source code from the openjdk mercurial repository following the
building.html exactly.
Here is the version numbers
DEFAULT_VERSION_MAJOR=10
DEFAULT_VERSION_MINOR=0
DEFAULT_VERSION_SECURITY=0
DEFAULT_VERSION_PATCH=0
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A
HOTSPOT_VM_DISTRO="OpenJDK"
# Might need better names for these
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
MACOSX_BUNDLE_ID_BASE="net.java.openjdk"
The JDK10 is modified with this patch for mips
https://groups.google.com/forum/#!topic/linux.debian.bugs.dist/Tmgse0HIzDc
After the above modification (note I have tried unmodified and modified
JDK10 for the x64 build with no difference in outcome)
- First I run in JDK 10
When I run this configure in jdk 10 (builds JDK for Linux x64)
bash configure --with-conf-name=buildjdk && make jdk CONF=buildjdk
It Compiles Successfully
Then I run in JDK 10
bash configure --openjdk-target=mipsel-oe-linux
--with-sysroot=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux
--with-toolchain-path=/usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/mipsel-oe-linux
--with-libffi=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux/usr/src/debug/libffi/3.0.13-r0/libffi-3.0.13
--with-jvm-variants=zero
--with-build-jdk=/opt/FaceClockJava/jdk10/build/buildjdk/jdk
--with-stdc++lib=dynamic
checking for Boot JDK... /usr/lib/jvm/java-8-oracle
checking Boot JDK version... java version "1.8.0_171" Java(TM) SE Runtime
Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build
25.171-b11, mixed mode)
checking for java in Boot JDK... ok
checking for javac in Boot JDK... ok
checking for javah in Boot JDK... ok
checking for jar in Boot JDK... ok
checking for jarsigner in Boot JDK... ok
checking if Boot JDK supports modules... no
checking if Boot JDK is 32 or 64 bits... 64
configure: Found potential Build JDK using configure arguments
configure: Potential Build JDK found at
/opt/FaceClockJava/jdk10/build/buildjdk/jdk is incorrect JDK version
(openjdk version "10-internal"); ignoring
configure: (Your Build JDK must be version 9)
checking for Build JDK... no
configure: error: Could not find a suitable Build JDK
I get this result.
I then downloaded JDK 9and did not modify it and ran
bash configure --with-conf-name=buildjdk && make jdk CONF=buildjdk
Then back in JDK10 I ran (Note the jdk9 in the --with-build-jdk)
bash configure --openjdk-target=mipsel-oe-linux
--with-sysroot=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux
--with-toolchain-path=/usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/mipsel-oe-linux
--with-libffi=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux/usr/src/debug/libffi/3.0.13-r0/libffi-3.0.13
--with-jvm-variants=zero
--with-build-jdk=/opt/FaceClockJava/jdk9/build/buildjdk/jdk
--with-stdc++lib=dynamic
and it works and compiles with
CONF=linux-mipsel-normal-zero-release make
However
CONF=linux-mipsel-normal-zero-release make images also works but when i
copy the jdk/jre from the images folder into my qemu based on the same
sysroots and the compiler it gives me
./java -version
Error occurred during initialization of boot layer
java.lang.IncompatibleClassChangeError: Implementing class
If I copy the entire jdk (the jdk folder next to images folder not the one
inside)
It works and I can even compile a HelloWorld.java on mipsel target
./java -version
openjdk version "10-internal"
OpenJDK Runtime Environment (build 10-internal+0-adhoc.will.jdk10)
OpenJDK Zero VM (build 10-internal+0-adhoc.will.jdk10, interpreted mode)
Will
On Fri, Jun 5, 2020 at 3:42 AM Magnus Ihse Bursie <
magnus.ihse.bursie at oracle.com> wrote:
> On 2020-06-05 08:06, William Larson wrote:
> > Hello David,
> >
> > When running configure
> > --with-buildjdk=./jdk/build/linux-x86_64-normal-server-release/jdk
> >
> > I get the following error
> >
> > configure: Potential Build JDK found at
> > /opt/FaceClockJava/jdk10l/build/linux-x86_64-normal-server-release/jdk is
> > incorrect JDK version (openjdk version "10-internal"); ignoring
> > configure: (Your Build JDK must be version 9)
> > checking for Build JDK... no
> > configure: error: Could not find a suitable Build JDK
> > configure exiting with result code 1
> >
> > How do I build with buildjdk10 when it's asking for 9?
> You are apparently trying to build JDK 9, not JDK 10. What does
> "make/autoconf/version-numbers" say for DEFAULT_VERSION_FEATURE? How did
> you clone the source code for JDK 10? Have you modified any files?
>
> /Magnus
>
>
> >
> >
> > On Thu, Jun 4, 2020, 9:16 PM David Holmes <david.holmes at oracle.com>
> wrote:
> >
> >> William,
> >>
> >> You need a JDK 10 build JDK not JDK 9 - as Mikael already stated and as
> >> Magnus wrote:
> >>
> >> "When we cross-compile, we need not only a Boot JDK (of version current
> >> N-1) running on the build host platform, but we also need a Build JDK,
> >> based on the current source code, running on the build host. (This is
> >> for running jmod/jlink; it needs to be up to date)."
> >>
> >> With your JDK 9 build JDK you are getting invalid jmod/jlink output
> >> files that prevent the full image from executing. But the exploded image
> >> that doesn't use all of those and so may execute okay.
> >>
> >> David
> >>
> >> On 5/06/2020 12:22 pm, William Larson wrote:
> >>> Hello David,
> >>>
> >>> I copied everything under
> >>>
> >>> build/linux-mipsel-normal-zero-release/images/jdk
> >>>
> >>> Got error
> >>>
> >>> I then tried just
> >>>
> >>>
> >>> build/linux-mipsel-normal-zero-release/images/jre
> >>>
> >>> Got the error
> >>> I even copied
> >>>
> >>> build/linux-mipsel-normal-zero-release/images/jmods
> >>>
> >>> Along side jre and jdk
> >>>
> >>> Still got the error
> >>>
> >>> I copied: (note the image folder is missing)
> >>> This is a much much bigger folder
> >>>
> >>> build/linux-mipsel-normal-zero-release/jdk
> >>>
> >>> To the target and it works albeit very slowly.
> >>>
> >>> I just want the jre ideally.
> >>>
> >>> Thanks for the help,
> >>>
> >>> Will
> >>>
> >>> On Thu, Jun 4, 2020, 7:12 PM David Holmes <david.holmes at oracle.com
> >>> <mailto:david.holmes at oracle.com>> wrote:
> >>>
> >>> Hi William,
> >>>
> >>> On 5/06/2020 10:00 am, William Larson wrote:
> >>> > Hello,
> >>> > I was able to successfully compile/build OpenJDK 10 with
> >>> following configure
> >>> >
> >>> > bash configure
> >>> > --openjdk-target=mipsel-oe-linux
> >>> >
> >> --with-sysroot=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux
> >>> >
> >>>
> >>
> --with-toolchain-path=/usr/local/oecore-i686/sysroots/i686-oesdk-linux/usr/bin/mipsel-oe-linux
> >>> >
> >>>
> >>
> --with-libffi=/usr/local/oecore-i686/sysroots/mips32el-nf-oe-linux/usr/src/debug/libffi/3.0.13-r0/libffi-3.0.13
> >>> >
> >>> > --with-jvm-variants=zero
> >>> > --with-build-jdk=./jdk9/build/buildjdk/jdk
> >>> > --with-boot-jdk=./jdk9/build/buildjdk/jdk
> >>> >
> >>> > I applied this patch to OpenJDK 10 as mips has 128 signals not
> 64
> >>> >
> >>>
> >>
> https://groups.google.com/forum/#!topic/linux.debian.bugs.dist/Tmgse0HIzDc
> >>> >
> >>> > I also Reference this mail from Magnus
> >>> >
> >>>
> >>
> https://mail.openjdk.java.net/pipermail/build-dev/2019-January/024735.html
> >>> >
> >>> > Where he suggests using a boot JDK
> >>> >
> >>> > CONF=linux-mipsel-normal-zero-release make images
> >>> >
> >>> > Works
> >>> >
> >>> > However if i copy the images to my QEMU based on the same
> sysroot
> >> and
> >>> > compiler above I get
> >>> >
> >>> > ./java -version
> >>> > Error occurred during initialization of boot layer
> >>> > java.lang.IncompatibleClassChangeError: Implementing class
> >>> >
> >>> > If I copy the JDK folder just outside of images folder
> >>> > (build/linux-mipsel-normal-zero-release/jdk) it works OK albeit
> >>> it takes a
> >>> > LONG time to print
> >>>
> >>> That is not part of the image built by "make images", it is what
> is
> >>> called the exploded image. So I'm not clear exactly what you
> copied
> >>> which did not work? Was it everything under
> >>>
> >>> build/linux-mipsel-normal-zero-release/images/jdk
> >>>
> >>> ?
> >>>
> >>> Cheers,
> >>> David
> >>>
> >>> > ./java -version
> >>> > openjdk version "10-internal"
> >>> > OpenJDK Runtime Environment (build
> 10-internal+0-adhoc.will.jdk10)
> >>> > OpenJDK Zero VM (build 10-internal+0-adhoc.will.jdk10,
> >>> interpreted mode)
> >>> >
> >>> > Why is does
> >>> > CONF=linux-mipsel-normal-zero-release make images
> >>> > not work?
> >>> >
> >>>
>
>
--
-William Larson
More information about the build-dev
mailing list