UKOUG Technology Conference

Friday, September 07, 2018

Building OpenJDK 10 on Solaris 11 x86_64

Well, as we all know Oracle are not allowing the release a binary version of Java 9,10 and may be 11 on Oracle Solaris x64 at this time (SPARC version downloadable). We can all guess why but I hope that they will release a x86 version soon.

Anyway, if you want to keep up with everyone else you can build the OpenJDK version. It builds under Oracle Solaris x64 and SPARC (saying that having problem with SPARC version at this time). Full build information is here
Setup:
  • 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.
# cd /usr/tmp   
# export PATH=/opt/developerstudio124/bin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/sfw/bin    
# hg clone http://hg.openjdk.java.net/jdk10/jdk10   
# cd jdk10   

# bash get_source.sh  
# Repositories: corba jaxp jaxws langtools jdk hotspot nashorn  
          jaxp:  hg clone http://hg.openjdk.java.net/jdk10/jdk10/jaxp jaxp  
         corba:  hg clone http://hg.openjdk.java.net/jdk10/jdk10/corba corba  
...  
             .:  no changes found  
       nashorn:  no changes found  
           jdk:  no changes found  
       hotspot:  no changes found  
   
# bash configure  
Running generated-configure.sh  
configure: Configuration created at Thu Sep 6 12:55:24 BST 2018.  
configure: configure script generated at timestamp 1504441177.  
checking for basename... /usr/bin/basename  
checking for bash... /usr/bin/bash    
...   
====================================================  
The existing configuration has been successfully updated in  
/var/tmp/jdk10/build/solaris-x86_64-normal-server-release  
using default settings.  
   
Configuration summary:  
* Debug level:  release  
* HS debug level: product  
* JDK variant:  normal  
* JVM variants:  server  
* OpenJDK target: OS: solaris, CPU architecture: x86, address length: 64  
* Version string: 10-internal+0-adhoc.andrew.jdk10 (10-internal)  
  
Tools summary:  
* Boot JDK:    java version "1.8.0_172" Java(TM) SE Runtime Environment (build 1.8.0_172-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode) (at /usr/jdk/instances/jdk1.8.0)  
* 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:  16  
* Memory limit:  16384 MB  

# gmake  
Building target 'default (exploded-image)' in configuration 'solaris-x86_64-normal-server-release'  
Creating support/modules_libs/java.base/libjsig.so from 1 file(s)  
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 support/modules_cmds/jdk.xml.ws/wsimport 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  
Updating support/src.zip  
...     
Creating support/classlist.jar  
Creating images/jmods/jdk.jlink.jmod  
Creating images/jmods/java.base.jmod  
Creating jdk jimage  
Creating jre jimage  
WARNING: Using incubator modules: jdk.incubator.httpclient  
WARNING: Using incubator modules: jdk.incubator.httpclient  
Stopping sjavac server  
Finished building target 'images' in configuration 'solaris-x86_64-normal-server-release' 

# ./build/*/images/jdk/bin/java -version  
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)  


I will hopeful post updates on OpenJDK 11 later.

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

No comments: