Cross-compile openjdk for aarch64 ARM architecture
Bob Vandette
bob.vandette at oracle.com
Sun Sep 9 14:29:48 UTC 2018
The repositories mentioned in the instructions have been changed to the following:
hg clone http://hg.openjdk.java.net/mobile/jdk9/
Please try these sources.
Bob.
> On Sep 9, 2018, at 10:17 AM, Mohammed Bey Ahmed Khernache <mohbeyinfo at gmail.com> wrote:
>
> Hello,
> I am trying to cross-compile openjdk for my board (Snapdragon 810) which
> has aarch64 ARM architecture, under Android OS.
> I am following the following web page:
> http://openjdk.java.net/projects/mobile/android.html
>
> I cross-compiled libffi and libfreetype.
>
> 1) the link given to clone openjdk from Github is no longer available. Is
> there someone who has a copy or knows another link?
> 2) I tried to dowlonad jdk9, but when I reach the step of compilation "make
> images" in the web page above,
> The configure command options:
> -------------------------------------------------------------------------------------------------
> ./configure --enable-option-checking=fatal
> --openjdk-target=aarch64-oe-linux --disable-warnings-as-errors
> --enable-headless-only --with-jdk-variant=normal
> --with-jvm-variants=zero --with-debug-level=release
> --with-devkit=$ANDROID_DEVKIT --with-libffi-include=$LIBFFI_DIR/include
> --with-libffi-lib=/root/jdk9mobile/libffi-3.2.1/arm-unknown-linux-androideabi/lib
> --with-freetype-lib=$FREETYPE_DIR/lib
> --with-freetype-include=$FREETYPE_DIR/include/freetype2
> -------------------------------------------------------------------------------------------------
> I got compilation errors!
> --------------------------------------------------------------------------------------------------
> Building target 'default (exploded-image)' in configuration
> 'linux-aarch64-normal-zero-release'
> Compiling 117 files for BUILD_java.compiler.interim
> javac: invalid flag: --module-path
> Usage: javac <options> <source files>
> use -help for a list of possible options
> javac: no source files
> Usage: javac <options> <source files>
> use -help for a list of possible options
> CompileInterimLangtools.gmk:86: recipe for target
> '/root/jdk9mobile/jdk-5812849b5027/build/linux-aarch64-normal-zero-release/buildtools/interim_langtools_modules/java.compiler.interim/_the.BUILD_java.compiler.interim_batch'
> failed
> make[3]: ***
> [/root/jdk9mobile/jdk-5812849b5027/build/linux-aarch64-normal-zero-release/buildtools/interim_langtools_modules/java.compiler.interim/_the.BUILD_java.compiler.interim_batch]
> Error 2
> make/Main.gmk:76: recipe for target 'interim-langtools' failed
> make[2]: *** [interim-langtools] Error 1
>
> ERROR: Build failed for target 'default (exploded-image)' in configuration
> 'linux-aarch64-normal-zero-release' (exit code 2)
>
> === Output from failing command(s) repeated here ===
> * For target
> buildtools_interim_langtools_modules_java.compiler.interim__the.BUILD_java.compiler.interim_batch:
> javac: invalid flag: --module-path
> Usage: javac <options> <source files>
> use -help for a list of possible options
> javac: no source files
> Usage: javac <options> <source files>
> use -help for a list of possible options
>
> * All command lines available in
> /root/jdk9mobile/jdk-5812849b5027/build/linux-aarch64-normal-zero-release/make-support/failure-logs.
> === End of repeated output ===
>
> === Make failed targets repeated here ===
> CompileInterimLangtools.gmk:86: recipe for target
> '/root/jdk9mobile/jdk-5812849b5027/build/linux-aarch64-normal-zero-release/buildtools/interim_langtools_modules/java.compiler.interim/_the.BUILD_java.compiler.interim_batch'
> failed
> make/Main.gmk:76: recipe for target 'interim-langtools' failed
> === End of repeated output ===
>
> Hint: Try searching the build log for the name of the first failed target.
> Hint: See doc/building.html#troubleshooting for assistance.
>
> /root/jdk9mobile/jdk-5812849b5027/make/Init.gmk:291: recipe for target
> 'main' failed
> make[1]: *** [main] Error 1
> /root/jdk9mobile/jdk-5812849b5027/make/Init.gmk:186: recipe for target
> 'default' failed
> make: *** [default] Error 2
> --------------------------------------------------------------------------------------------------
>
> Is there any solution to this error?
> Or, is there any other solution to cross-compile openjdk for aarch64 ARM
> architecture?
>
> Thank you in advance.
> Best regards
More information about the mobile-dev
mailing list