Building jdk11 for arm-vfp-sflt

Alex Kashchenko akashche at redhat.com
Thu Oct 4 12:33:48 UTC 2018


Hi,

On 10/04/2018 08:04 AM, Aleksei Voitylov wrote:
> Simon,
> 
> this list is for aarch32-port project 
> (http://hg.openjdk.java.net/aarch32-port/). I'm confused because it does 
> not have JDK11 support integrated just yet (Andrey posted the RFR just 
> recently).
> 
> If what you are trying to build is jdk/jdk or jdk/jdk11, I can report 
> that we are testing and supporting this architecture upstream. Works for 
> us perfectly. If you are ready to wait a little we are about to release 
> Liberica JDK 11 GA binaries for the Pi, which is currently under 
> extensive testing. Could you report the gcc compiler version, configure 
> options and the exact issue you are seeing?

I see the following problem that may or may not be related to Simon's 
one. When cross-compiling 
https://hg.openjdk.java.net/jdk-updates/jdk11u/file/76072a077ee1 with 
the following toolchain:

arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
4.8.4-2ubuntu1~14.04.1' 
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs 
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.8 --enable-shared --enable-linker-build-id 
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.8.4 
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--enable-gnu-unique-object --disable-libmudflap --disable-libitm 
--disable-libquadmath --enable-plugin --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross/jre 
--enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf-cross 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf-cross 
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib 
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 
--with-float=hard --with-mode=thumb --disable-werror 
--enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=arm-linux-gnueabihf 
--program-prefix=arm-linux-gnueabihf- 
--includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)


and the following configure arguments:

--openjdk-target=arm-linux-gnueabihf --with-jvm-variants=server 
--with-sysroot=/opt/sysroot/ --with-toolchain-path=/opt/sysroot/ 
--enable-unlimited-crypto=yes --disable-warnings-as-errors 
--disable-hotspot-gtest --with-abi-profile=arm-vfp-hflt 
--with-native-debug-symbols=none --with-debug-level=release 
--with-stdc++lib=static --with-boot-jdk=/opt/bootjdk/ 
--with-build-jdk=/opt/bootjdk/ --with-cacerts-file=/opt/cacerts 
--with-freetype-include=/opt/sysroot/usr/include/freetype2/ 
--with-freetype-lib=/opt/sysroot/usr/lib/arm-linux-gnueabihf/ 
--with-version-pre=ojdkbuild --with-version-security=0 
--with-version-build=28 --with-version-opt= --with-log=info 
--with-extra-cflags='-I/opt/sysroot/usr/include/c++/4.8 
-I/opt/sysroot/usr/include/arm-linux-gnueabihf/c++/4.8' 
--with-extra-cxxflags='-I/opt/sysroot/usr/include/c++/4.8 
-I/opt/sysroot/usr/include/arm-linux-gnueabihf/c++/4.8'


jvm crashes on startup with:

#  SIGILL (0x4) at pc=0xb41cdbe4, pid=13597, tid=13598
#
# JRE version:  (11.0+28) (build )
# Java VM: OpenJDK Server VM (11-ojdkbuild+28, mixed mode, g1 gc, linux-)
# Problematic frame:
# j  java.lang.ThreadGroup.add(Ljava/lang/ThreadGroup;)V+20 java.base


The same setup worked fine for jdk10 (setup details and resulting 
binaries: https://github.com/ojdkbuild/contrib_jdk10u-aarch32-ci ).


If I use newer toolchain:

arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 
5.4.0-6ubuntu1~16.04.9' 
--with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ 
--prefix=/usr --program-suffix=-5 --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix --libdir=/usr/lib 
--enable-nls --with-sysroot=/ --enable-clocale=gnu 
--enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-libitm --disable-libquadmath --enable-plugin 
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk 
--enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross/jre 
--enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf-cross 
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib 
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 
--with-float=hard --with-mode=thumb --disable-werror --enable-multilib 
--enable-checking=release --build=x86_64-linux-gnu 
--host=x86_64-linux-gnu --target=arm-linux-gnueabihf 
--program-prefix=arm-linux-gnueabihf- 
--includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)


then I don't see the problem - resulting binary starts fine.

Native builds also work fine for me, but I haven't tried older 
toolchains (tried only gcc 5.4 and gcc 8.2 so far).

> 
> -Aleksei
> 
> 
> On 03/10/2018 23:55, Simon Nash wrote:
>> I have built the jdk11 GA sources using the abi profile arm-vfp-hflt. 
>> This works for jdk9u. My jdk11 build completes without errors but the 
>> resulting JDK image doesn't run (testing on an RPi 3 with Raspbian 
>> Jessie). Depending on how I launch bin/java, I get either SIGILL or 
>> SIGSEGV in a intepreter codelet. Has anyone else been able to build 
>> and run jdk11 for arm-vfp-hflt?
>>
>> Simon
> 


-- 
-Alex


More information about the aarch32-port-dev mailing list