Wednesday, October 10, 2018

Building OpenJDK 11 on Solaris 11 x86_64

Following on my last blog "Building OpenJDK10 on Solaris 11" I have added instructions for OpenJDK 11 on Oracle Solaris x64 (SPARC version downloadable).
  • At this time you require Oracle Solaris Studio 12.4 and other versions will not work at this time, but again hopefully soon.
  • Do not build on a NFS drive, since will be very slow. 
  • Only builds on Solaris 11.3.
    •  WARNING: You need Autoconf 2.69 but Solaris 11.3 only has 2.68
  • You need to have OpenJDK 10 installed. i.e. "/var/tmp/build-openjdk10/solaris-x86_64-normal-server-release/images/jdk/bin"
# cd /usr/tmp  
# export PATH=/var/tmp/build-openjdk10/solaris-x86_64-normal-server-release/images/jdk/bin:/opt/developerstudio124/bin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/sfw/bin    
# hg clone http://hg.openjdk.java.net/jdk/jdk11  
# cd jdk11

Note: I install latest autoconf and remove Solaris version using sfe.opencsw.org:
  # pkg set-publisher -G '*' -g http://sfe.opencsw.org/localhosts11 localhosts11
  # pkg install -v developer/build/gnu/autoconf
  # pkg uninstall developer/build/autoconf
  # autoconf -V
  autoconf (GNU Autoconf) 2.69

# bash configure  
....
====================================================
The existing configuration has been successfully updated in
/usr/tmp/jdk11/build/solaris-x86_64-normal-server-release
using default settings.

Configuration summary:
* Debug level:    release
* HS debug level: product
* JVM variants:   server
* JVM features:   server: 'aot cds cmsgc compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services vm-structs' 
* OpenJDK target: OS: solaris, CPU architecture: x86, address length: 64
* Version string: 11-internal+0-adhoc.andrew.jdk11 (11-internal)

Tools summary:
* Boot JDK:       openjdk version "10-internal" OpenJDK Runtime Environment (build 10-internal+0-adhoc.andrew.jdk10) OpenJDK 64-Bit Server VM (build 10-internal+0-adhoc.andrew.jdk10, mixed mode)  (at /var/tmp/build-openjdk10/solaris-x86_64-normal-server-release/images/jdk)
* Toolchain:      solstudio (Oracle Solaris Studio)
* C Compiler:     Version 5.13 (at /opt/developerstudio124/bin/cc)
* C++ Compiler:   Version 5.13 (at /opt/developerstudio124/bin/CC)

Build performance summary:
* Cores to use:   4
* Memory limit:   16382 MB

WARNING: The result of this configuration has overridden an older
configuration. You *should* run 'make clean' to make sure you get a
proper build. Failure to do so might result in strange build problems.

# gmake  
Building target 'default (exploded-image)' in configuration 'solaris-x86_64-normal-server-release'
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
Creating hotspot/variant-server/tools/adlc/adlc from 13 file(s)
Compiling 2 files for BUILD_JVMTI_TOOLS
Creating hotspot/variant-server/tools/dtrace-gen-offsets/dtraceGenOffsets from 1 file(s)
....     
Creating support/modules_libs/jdk.sctp/libsctp.so from 3 file(s)
Creating support/modules_libs/jdk.security.auth/libjaas.so from 1 file(s)
Compiling 4 files for BUILD_JIGSAW_TOOLS
Stopping sjavac server
Finished building target 'default (exploded-image)' in configuration 'solaris-x86_64-normal-server-release'

# gmake images     
Building target 'images' in configuration 'solaris-x86_64-normal-server-release'
Compiling 31 files for BUILD_JRTFS
Creating support/modules_libs/java.base/jrt-fs.jar
...     
Creating support/demos/image/jfc/TransparentRuler/TransparentRuler.jar
Creating jdk image
Stopping sjavac server
Finished building target 'images' in configuration 'solaris-x86_64-normal-server-release'

# ./build/*/images/jdk/bin/java -version  
openjdk version "11-internal" 2018-09-25
OpenJDK Runtime Environment (build 11-internal+0-adhoc.andrew.jdk11)
OpenJDK 64-Bit Server VM (build 11-internal+0-adhoc.andrew.jdk11, mixed mode)


I will hopeful post updates on OpenJDK 11 on SPARC and Solaris 11.4 sometime.

Formatting: I now use http://codeformatter.blogspot.co.uk for code formatting.

1 comment:

Unknown said...

Thank you for posting this! Any chance we could get a copy of your build for JDK11 on Solaris 11.3 for x64....or where a build might otherwise be available?