battleblow / openjdk-jdk11u

BSD port of OpenJDK 11
GNU General Public License v2.0
9 stars 8 forks source link

Unable to build on FreeBSD 12 on Power9 #91

Closed lenoil98 closed 5 years ago

lenoil98 commented 5 years ago

JDK11 does not build on power9 on FreeBSD 12 due to SIGILL.

==================================================== A new configuration has been successfully created in /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release using configure arguments '--with-boot-jdk=/usr/local/openjdk11 --disable-ccache --disable-javac-server --disable-hotspot-gtest --with-alsa=/usr/local --with-cups=/usr/local --with-fontconfig=/usr/local --with-freetype=system --with-freetype-include=/usr/local/include/freetype2 --with-freetype-lib=/usr/local/lib --with-libjpeg=system --with-giflib=system --with-giflib-include=/usr/local/include --with-giflib-lib=/usr/local/lib --with-libpng=system --with-zlib=system --with-lcms=system --x-includes=/usr/local/include --x-libraries=/usr/local/lib --with-cacerts-file=/usr/ports/java/openjdk11/files/cacerts --with-version-string=11.0.5+8-1 --with-native-debug-symbols=none --with-debug-level=release --with-toolchain-type=gcc --with-extra-ldflags='-Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9' --with-extra-cflags=-Wl,-rpath=/usr/local/lib/gcc9 --with-extra-cxxflags=-Wl,-rpath=/usr/local/lib/gcc9 --disable-warnings-as-errors --disable-dtrace --enable-aot=no --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --infodir=/usr/local/share/info/ --build=powerpc64-portbld-freebsd12.0'.

Configuration summary:

Tools summary:

Build performance summary:

The following warnings were produced. Repeated here for convenience: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead. WARNING: Ignoring value of READELF from the environment. Use command line variables instead. WARNING: Ignoring CFLAGS(-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -fno-strict-aliasing ) found in environment. Use --with-extra-cflags WARNING: Ignoring CXXFLAGS(-O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -DLIBICONV_PLUG -Wl,-rpath=/usr/local/lib/gcc9 ) found in environment. Use --with-extra-cxxflags WARNING: Ignoring LDFLAGS( -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9 ) found in environment. Use --with-extra-ldflags WARNING: Ignoring value of AR from the environment. Use command line variables instead. WARNING: Ignoring value of NM from the environment. Use command line variables instead. WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead. WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead.

===> Building for openjdk11-11.0.5+8.1 gmake[1]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1' gmake[2]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1' gmake[2]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1' gmake[2]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1' Building target 'images' in configuration 'bsd-ppc64-normal-server-release' gmake[3]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' Warning: No SCM configuration present and no .src-rev gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' Compiling 8 files for BUILD_TOOLS_LANGTOOLS gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s) Compiling 2 files for BUILD_JVMTI_TOOLS Compiling 1 files for BUILD_JFR_TOOLS gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' '# '# A fatal error has been detected by the Java Runtime Environment: '# '# SIGILL (0x4) at pc=0x0000000819c1d29c, pid=59265, tid=100146 '# '# JRE version: OpenJDK Runtime Environment (11.0.4+11) (build 11.0.4+11-1) '# Java VM: OpenJDK 64-Bit Server VM (11.0.4+11-1, mixed mode, tiered, compressed oops, serial gc, bsd-ppc64) '# Problematic frame: '# v ~StubRoutines::jbyte_disjoint_arraycopy '# '# Core dump will be written. Default location: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/javac.core '# '# An error report file with more information is saved as: '# /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hs_err_pid59265.log Compiled method (c1) 1251 135 1 java.util.Arrays::copyOfRange (63 bytes) total in heap [0x000000081a7a4210,0x000000081a7a4f68] = 3416 relocation [0x000000081a7a4370,0x000000081a7a4450] = 224 constants [0x000000081a7a4480,0x000000081a7a4500] = 128 main code [0x000000081a7a4500,0x000000081a7a4a80] = 1408 stub code [0x000000081a7a4a80,0x000000081a7a4cb0] = 560 oops [0x000000081a7a4cb0,0x000000081a7a4cb8] = 8 metadata [0x000000081a7a4cb8,0x000000081a7a4d48] = 144 scopes data [0x000000081a7a4d48,0x000000081a7a4e40] = 248 scopes pcs [0x000000081a7a4e40,0x000000081a7a4f50] = 272 dependencies [0x000000081a7a4f50,0x000000081a7a4f58] = 8 nul chk table [0x000000081a7a4f58,0x000000081a7a4f68] = 16 Could not load hsdis-ppc64.so; library not loadable; PrintAssembly is disabled '# '# If you would like to submit a bug report, please visit: '# http://bugreport.java.com/bugreport/crash.jsp '# '# '# A fatal error has been detected by the Java Runtime Environment: '# '# SIGILL (0x4) at pc=0x0000000819c1d91c, pid=59361, tid=100761 '# '# JRE version: OpenJDK Runtime Environment (11.0.4+11) (build 11.0.4+11-1) '# Java VM: OpenJDK 64-Bit Server VM (11.0.4+11-1, mixed mode, tiered, compressed oops, g1 gc, bsd-ppc64) '# Problematic frame: '# v ~StubRoutines::jbyte_disjoint_arraycopy '# '# Core dump will be written. Default location: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot/javac.core '# '# An error report file with more information is saved as: '# /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot/hs_err_pid59361.log Compiled method (c1) 1137 199 3 java.lang.String::getBytes (44 bytes) total in heap [0x000000081a367b10,0x000000081a368390] = 2176 relocation [0x000000081a367c70,0x000000081a367cb0] = 64 constants [0x000000081a367d00,0x000000081a367d80] = 128 main code [0x000000081a367d80,0x000000081a368180] = 1024 stub code [0x000000081a368180,0x000000081a368230] = 176 metadata [0x000000081a368230,0x000000081a368270] = 64 scopes data [0x000000081a368270,0x000000081a3682e0] = 112 scopes pcs [0x000000081a3682e0,0x000000081a368370] = 144 dependencies [0x000000081a368370,0x000000081a368378] = 8 nul chk table [0x000000081a368378,0x000000081a368390] = 24 Compiled method (c2) 1141 428 4 java.lang.StringLatin1::replace (196 bytes) total in heap [0x0000000841f9df10,0x0000000841f9ec80] = 3440 relocation [0x0000000841f9e070,0x0000000841f9e108] = 152 constants [0x0000000841f9e180,0x0000000841f9e200] = 128 main code [0x0000000841f9e200,0x0000000841f9e880] = 1664 stub code [0x0000000841f9e880,0x0000000841f9e998] = 280 metadata [0x0000000841f9e998,0x0000000841f9e9b8] = 32 scopes data [0x0000000841f9e9b8,0x0000000841f9eb38] = 384 scopes pcs [0x0000000841f9eb38,0x0000000841f9ec28] = 240 dependencies [0x0000000841f9ec28,0x0000000841f9ec30] = 8 handler table [0x0000000841f9ec30,0x0000000841f9ec60] = 48 nul chk table [0x0000000841f9ec60,0x0000000841f9ec80] = 32 Compiled method (nm) 1143 41 n 0 java.lang.System::arraycopy (native) total in heap [0x0000000841f84110,0x0000000841f84448] = 824 relocation [0x0000000841f84270,0x0000000841f84280] = 16 main code [0x0000000841f84280,0x0000000841f84440] = 448 oops [0x0000000841f84440,0x0000000841f84448] = 8 Compiled method (c1) 1144 182 3 java.lang.AbstractStringBuilder::append (45 bytes) total in heap [0x000000081a360e10,0x000000081a361a68] = 3160 relocation [0x000000081a360f70,0x000000081a360fe8] = 120 constants [0x000000081a361000,0x000000081a361080] = 128 main code [0x000000081a361080,0x000000081a361700] = 1664 stub code [0x000000081a361700,0x000000081a361830] = 304 metadata [0x000000081a361830,0x000000081a3618a0] = 112 scopes data [0x000000081a3618a0,0x000000081a361968] = 200 scopes pcs [0x000000081a361968,0x000000081a361a48] = 224 dependencies [0x000000081a361a48,0x000000081a361a50] = 8 nul chk table [0x000000081a361a50,0x000000081a361a68] = 24 Could not load hsdis-ppc64.so; library not loadable; PrintAssembly is disabled '# '# If you would like to submit a bug report, please visit: '# http://bugreport.java.com/bugreport/crash.jsp '# '# '# A fatal error has been detected by the Java Runtime Environment: '# '# SIGILL (0x4) at pc=0x0000000819c1df6c, pid=59372, tid=100795 '# '# JRE version: OpenJDK Runtime Environment (11.0.4+11) (build 11.0.4+11-1) '# Java VM: OpenJDK 64-Bit Server VM (11.0.4+11-1, mixed mode, tiered, compressed oops, g1 gc, bsd-ppc64) '# Problematic frame: '# v ~StubRoutines::arrayof_jbyte_disjoint_arraycopy '# '# Core dump will be written. Default location: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot/javac.core '# '# An error report file with more information is saved as: '# /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot/hs_err_pid59372.log Compiled method (c2) 1276 439 4 java.lang.AbstractStringBuilder::append (45 bytes) total in heap [0x0000000841fa0d10,0x0000000841fa1b50] = 3648 relocation [0x0000000841fa0e70,0x0000000841fa0f00] = 144 constants [0x0000000841fa0f00,0x0000000841fa1000] = 256 main code [0x0000000841fa1000,0x0000000841fa1700] = 1792 stub code [0x0000000841fa1700,0x0000000841fa1828] = 296 metadata [0x0000000841fa1828,0x0000000841fa1868] = 64 scopes data [0x0000000841fa1868,0x0000000841fa1a20] = 440 scopes pcs [0x0000000841fa1a20,0x0000000841fa1b00] = 224 dependencies [0x0000000841fa1b00,0x0000000841fa1b08] = 8 handler table [0x0000000841fa1b08,0x0000000841fa1b20] = 24 nul chk table [0x0000000841fa1b20,0x0000000841fa1b50] = 48 Compiled method (c2) 1279 439 4 java.lang.AbstractStringBuilder::append (45 bytes) total in heap [0x0000000841fa0d10,0x0000000841fa1b50] = 3648 relocation [0x0000000841fa0e70,0x0000000841fa0f00] = 144 constants [0x0000000841fa0f00,0x0000000841fa1000] = 256 main code [0x0000000841fa1000,0x0000000841fa1700] = 1792 stub code [0x0000000841fa1700,0x0000000841fa1828] = 296 metadata [0x0000000841fa1828,0x0000000841fa1868] = 64 scopes data [0x0000000841fa1868,0x0000000841fa1a20] = 440 scopes pcs [0x0000000841fa1a20,0x0000000841fa1b00] = 224 dependencies [0x0000000841fa1b00,0x0000000841fa1b08] = 8 handler table [0x0000000841fa1b08,0x0000000841fa1b20] = 24 nul chk table [0x0000000841fa1b20,0x0000000841fa1b50] = 48 Could not load hsdis-ppc64.so; library not loadable; PrintAssembly is disabled '# '# If you would like to submit a bug report, please visit: '# http://bugreport.java.com/bugreport/crash.jsp '# /usr/local/bin/bash: line 1: 59265 Abort trap (core dumped) /usr/local/openjdk11/bin/javac -g -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 -source 9 -target 9 -XDignore.symbol.file=true -g -Xlint:all,-deprecation,-options -Werror -Xprefer:source -implicit:none -d /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/buildtools/langtools_tools_classes @/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.tmp > >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.log) 2> >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.log >&2) gmake[4]: [ToolsLangtools.gmk:40: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch] Error 134 gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make' gmake[3]: [make/Main.gmk:73: buildtools-langtools] Error 2 gmake[3]: Waiting for unfinished jobs.... /usr/local/bin/bash: line 1: 59361 Abort trap (core dumped) /usr/local/openjdk11/bin/javac -g -implicit:none -d /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/tools/jvmti @/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.tmp > >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.log) 2> >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch.log >&2) gmake[4]: [gensrc/GensrcJvmti.gmk:45: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/tools/jvmti/_the.BUILD_JVMTI_TOOLS_batch] Error 134 gmake[4]: Waiting for unfinished jobs.... /usr/local/bin/bash: line 1: 59372 Abort trap (core dumped) /usr/local/openjdk11/bin/javac -g -implicit:none -d /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/buildtools/tools_classes @/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.tmp > >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.log) 2> >(/usr/bin/tee -a /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch.log >&2) gmake[4]: [gensrc/GensrcJfr.gmk:43: /usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/build/bsd-ppc64-normal-server-release/hotspot/variant-server/buildtools/tools_classes/_the.BUILD_JFR_TOOLS_batch] Error 134 gmake[4]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1/make/hotspot' gmake[3]: *** [make/Main.gmk:250: hotspot-server-gensrc] Error 2 gmake[3]: Leaving directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1'

ERROR: Build failed for target 'images' in configuration 'bsd-ppc64-normal-server-release' (exit code 2) gmake[3]: Entering directory '/usr/ports/java/openjdk11/work/openjdk-jdk11u-jdk-11.0.5-8-1'

lenoil98 commented 5 years ago

'

battleblow commented 5 years ago

The crash is happening in the bootstrap being used. How was the bootstrap in /usr/local/openjdk11 compiled? Is that something you built from ports? An installed package? Something you built yourself and installed manually?

lenoil98 commented 5 years ago

This is the bootstrap from ports. However, the build (bootstrap) works fine on my PowerMac G5.

battleblow commented 5 years ago

Ok, so you've moved it from /usr/local/bootstrap-openjdk11 to /usr/local/openjdk11 then?

The bootstrap was produced on a PowerMac G5. Which, I thought, would then be able to run on any newer Power architecture. It seems as though this is not the case? I'm not sure if this means we'll need to have multiple bootstraps or whether we just need to tweak the compiler flags to produce something that can be run on both. You might have more familiarity with that than me. Any ideas?

lenoil98 commented 5 years ago

I moved it to see if it made a difference from my initial run. However, I don't think it's the bootstrap, as i can compile java code with the bootstrap code just fine. I believe it has something to do with the code used to identify the "CPU" and declare the "ABI" in JDK11. This also applies to JDK12 and 13.

I'm still investigating!

battleblow commented 5 years ago

Does the Power9 run in little endian mode perhaps? I didn't think the switch to the ELFv2 ABI was happening until FreeBSD 13.

lenoil98 commented 5 years ago

The Power9 supports both big and little endian modes. For FreeBSD 12 it is running in big endian mode and will use little endian in FreeBSD13. I've verified that the build (bootstrap) works correctly on FreeBSD 13. FreeBSD 12 should be a bridge between the switch to ELFv2 from ELFv1. Therefore, this is as issue for FreeBSD 12.

You're correct. However, some code is already being added to ports in anticipation of the switch. I don't know what the percentage of users that will be using power8 or new processors, to the percentage of users of older power based systems. (I just wonder if there are more apps that are or will be broken by adding ELFv2 code to current ports.)

lenoil98 commented 5 years ago

For me ATT, FreeBSD 12 is stable and I'm looking to make it my main platform on my Talos Blackbird Power9 system.

MikaelUrankar commented 5 years ago

The Power9 supports both big and little endian modes. For FreeBSD 12 it is running in big endian mode and will use little endian in FreeBSD13. I've verified that the build (bootstrap) works correctly on FreeBSD 13. FreeBSD 12 should be a bridge between the switch to ELFv2 from ELFv1. Therefore, this is as issue for FreeBSD 12.

We won't change the endianness on FreeBSD13, only the abi of powerpc64.

MikaelUrankar commented 5 years ago

You're correct. However, some code is already being added to ports in anticipation of the switch. I don't know what the percentage of users that will be using power8 or new processors, to the percentage of users of older power based systems. (I just wonder if there are more apps that are or will be broken by adding ELFv2 code to current ports.)

All the apps that relies on a bootstrap (jdk, rust, ghc...) and some other ports due to difference in compiler / linker (llvm9, lld9) and compiler switch (no -minimal-toc)

MikaelUrankar commented 5 years ago

SIGILL (0x4) at pc=0x0000000819c1df6c, pid=59372, tid=100795

If you still have the coredump, can you look at the faulty instr: x/x 0x0000000819c1df6c and disassemble around the crash?

MikaelUrankar commented 5 years ago

It looks similar to: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239368

https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp#L1070

battleblow commented 5 years ago

Good catch. Curtis, can you try with a similar patch to that from openjdk8?

battleblow commented 5 years ago

Hit 'Comment' too soon.

You'd need to build a bootstrap on your PowerMac G5 with a similar patch to openjdk8 and then try the build on your Power9 box with that bootstrap. If that works I can update the bootstrap and commit such a patch to the openjdk11 (and 12, 13) ports.

lenoil98 commented 5 years ago

I created a patch similar to the openjdk8 patch and rebuild the bootstrap, but encountered new crashes with "jar" with ~StubRoutines::CRC32_updateBytes.

As I mentioned earlier there are no issues building JDK11 on FreeBSD13 using the existing bootstrap. At this time there's no an urgent need for JDK11, so I'll wait for a stable FreeBSD13.

battleblow commented 5 years ago

Curtis, if I built a couple of bootstraps, would you have time to give them a try on your POWER9 machine? It sounds like maybe there are problems with the CRC32 intrinsics as well. I'd like to try getting this working if possible though and can build a couple of bootstraps which different features disabled and see if we hit on something that works.

lenoil98 commented 5 years ago

Yes. I’ll be happy to test the bootstraps.

battleblow commented 5 years ago

First attempt is up, although it will take a couple of hours for the mirrors to pick it up. Once it's available, please download the bootstrap from http://distcache.FreeBSD.org/local-distfiles/glewis/bootstrap-openjdk11/bootstrap-openjdk11-powerpc64-11.0.5.tar.xz and apply the patches to the openjdk11 port at

https://bz-attachments.freebsd.org/attachment.cgi?id=208537&action=diff&format=raw&headers=1

If the port compiles with that combination on your POWER9 then I'll commit the patches and update the bootstrap port as well. If it doesn't work please let me know and I'll make a more aggressive attempt at removing references to mfdscr.

lenoil98 commented 5 years ago

The bootstrap and patch works!

battleblow commented 5 years ago

Thanks for the feedback Curtis! I'll work on getting this committed this week. I'll likely need to build new bootstraps for the other architectures, so that will take a little while.

battleblow commented 5 years ago

I've committed the patch and bootstrap to the FreeBSD ports system