cross-compile openjdk 11u to Android device

David Holmes david.holmes at oracle.com
Tue Jul 7 11:41:37 UTC 2020


Hi,

The discuss list is the wrong place to ask this question, so I'm 
redirecting to the mobile-dev list, as within the context of the mobile 
project is only place where cross-compilation of this kind might be 
supported.

http://openjdk.java.net/projects/mobile/

Cheers,
David
-----

On 7/07/2020 8:55 pm, Wow Lucky wrote:
> I am trying to cross-compile openjdk 11u to aarch64. I am using following
> command:
> *bash configure --openjdk-target=aarch64-linux-android21
> --disable-warnings-as-errors CC=aarch64-linux-android21-clang
> CXX=aarch64-linux-android21-clang++*
> 
> but i am getting output errors below:
> *checking for aarch64-linux-android21-clang...
> /mnt/c/Users/ACER/downloads/NDK/build/tools/toolchain/bin/aarch64-linux-android21-clang*
> *checking resolved symbolic links for CC... no symlink*
> *configure: The C compiler (located as
> /mnt/c/Users/ACER/downloads/NDK/build/tools/toolchain/bin/aarch64-linux-android21-clang)
> does not seem to be the required gcc compiler.*
> *configure: The result from running with --version was: ""*
> *configure: error: A gcc compiler is required. Try setting
> --with-tools-dir.*
> *configure exiting with result code 1*
> (all text in file)
> 
> But if i use
> */mnt/c/Users/ACER/downloads/NDK/build/tools/toolchain/bin/aarch64-linux-android21-clang
> --version*
> The output is
> *Android (6454773 based on r365631c2) clang version 9.0.8
> (https://android.googlesource.com/toolchain/llvm-project
> <https://android.googlesource.com/toolchain/llvm-project>
> 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)*
> *Target: aarch64-unknown-linux-android21*
> *Thread model: posix*
> *InstalledDir: /mnt/c/Users/ACER/downloads/NDK/build/tools/toolchain/bin*
> 
> I don't know how to fix this error.
> 


More information about the discuss mailing list