How to build openjdk mobile project android platform successfully and how does the mobile project adapt to bionic C ?
guoge (A)
guoge1 at huawei.com
Fri Aug 24 08:13:11 UTC 2018
Hi mobile-dev,
I want to build an android openjdk from the mobile project.(http://hg.openjdk.java.net/mobile/jdk9/)
I followed the guide(http://openjdk.java.net/projects/mobile/android.html) but failed in the "make images" phase.
I tried two versions of NDK toolchains(android-ndk32-r10b-linux-x86_64 and android-ndk-r10e-linux-x86_64) and the followings are the configure and make images command outputs, could you help figure out why the project can't be built successfully?
In addition, could you tell me how the mobile project adapts to the bionic C when bionic C lacks some functions the openjdk needs(such as ucontext.h, getpwuid_r etc.)?
Thanks.
android-ndk-r10b
--------------------------------------------------------------------------
configure:
Configuration summary:
* Debug level: release
* HS debug level: product
* JDK variant: normal
* JVM variants: zero
* OpenJDK target: OS: android, CPU architecture: arm, address length: 32
* Version string: 9-internal+0-adhoc.zhangfan.mobile-jdk9 (9-internal)
Tools summary:
* Boot JDK: java version "1.8.0_192-ea" Java(TM) SE Runtime Environment (build 1.8.0_192-ea-b04) Java HotSpot(TM) 64-Bit Server VM (build 25.192-b04, mixed mode) (at /home/zhangfan/tools/openjdk-builds/jdk1.8.0_192)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 4.6 (at /home/zhangfan/code/dev/jdk9mobile/android-ndk-r10b/generated-toolchains/android-arm-toolchain/bin/arm-linux-androideabi-gcc)
* C++ Compiler: Version 4.6 (at /home/zhangfan/code/dev/jdk9mobile/android-ndk-r10b/generated-toolchains/android-arm-toolchain/bin/arm-linux-androideabi-g++)
make images:
/home/zhangfan/code/dev/jdk9mobile/mobile-jdk9/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:79:22: fatal error: ucontext.h: No such file or directory
compilation terminated.
android-ndk-r10e
--------------------------------------------------------------------------
configure:
Configuration summary:
* Debug level: release
* HS debug level: product
* JDK variant: normal
* JVM variants: zero
* OpenJDK target: OS: android, CPU architecture: arm, address length: 32
* Version string: 9-internal+0-adhoc.zhangfan.mobile-jdk9 (9-internal)
Tools summary:
* Boot JDK: java version "1.8.0_192-ea" Java(TM) SE Runtime Environment (build 1.8.0_192-ea-b04) Java HotSpot(TM) 64-Bit Server VM (build 25.192-b04, mixed mode) (at /home/zhangfan/tools/openjdk-builds/jdk1.8.0_192)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 4.8 (at /home/zhangfan/code/dev/jdk9mobile/android-ndk-r10e/generated-toolchains/android-arm-toolchain/bin/arm-linux-androideabi-gcc)
* C++ Compiler: Version 4.8 (at /home/zhangfan/code/dev/jdk9mobile/android-ndk-r10e/generated-toolchains/android-arm-toolchain/bin/arm-linux-androideabi-g++)
make images:
/home/zhangfan/code/dev/jdk9mobile/mobile-jdk9/hotspot/src/os/linux/vm/perfMemory_linux.cpp: In function 'char* get_user_name(uid_t)':
/home/zhangfan/code/dev/jdk9mobile/mobile-jdk9/hotspot/src/os/linux/vm/perfMemory_linux.cpp:458:66: error: 'getpwuid_r' was not declared in this scope
int result = getpwuid_r(uid, &pwent, pwbuf, (size_t)bufsize, &p);
Best Regards,
Guoge
More information about the mobile-dev
mailing list