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 <[email protected] <mailto:[email protected]>> 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?
     >

Reply via email to