Thursday, October 11, 2018

Building OpenJDK 10 on Solaris 11 SPARC

As promised here are the instructions for OpenJDK 10 on Solaris 11 SPARC.
This follows on from previous posts:
As you know you can only download SPARC version from Oracle, so if you want to make sure you use the same Java build on both platforms then here is a setup guide.

  • At this time you require Oracle Solaris Studio 12.4 and other versions will not work at this time.
  • Do not build on a NFS drive, since will be very slow. 
    • Download code to NFS drive and create a link which points to local filesystem
  • Only builds on Solaris 11.3.
# cd /home/andrew/openjdk  
# export PATH=/opt/developerstudio124/bin:/usr/bin:/usr/sbin:/usr/gnu/bin:/usr/sfw/bin    
-Skip next line if you have code already
# hg clone   

# cd jdk10
-Create a link to local filesystem if on NFS drive
# mkdir /var/tmp/build-openjdk10
# ln -s /var/tmp/build-openjdk10 build
-Skip next line if you have code already
# bash

-Check you have installed:
# pkg list pkg list developer/gcc-48 developer/gcc-4/gcc-c++-48 developer/gcc-4/gcc-c-48 developer/gcc-4/gcc-common-48 developer/gcc-4/gcc-gfortran-48 developer/gcc-4/gcc-gobjc-48 developer/java/jdk-8 developer/versioning/mercurial-27 developer/build/pkg-config library/mmheap
NAME (PUBLISHER)                                  VERSION                    IFO
developer/build/pkg-config                        0.23-      i--
developer/gcc-4/gcc-c++-48                        4.8.2-     i--
developer/gcc-4/gcc-c-48                          4.8.2-     i--
developer/gcc-4/gcc-common-48                     4.8.2-     i--
developer/gcc-4/gcc-gfortran-48                   4.8.2-     i--
developer/gcc-4/gcc-gobjc-48                      4.8.2-     i--
developer/gcc-48                                  4.8.2-     i--
developer/java/jdk-8                                   i--
developer/versioning/mercurial-27                 4.1.3-     i--
system/library/mmheap                             0.5.11-     i--

# bash configure  
# gmake
-You may get some warning errors but this looks like a bug with dtrace and not java!
Compiling 4 files for BUILD_JIGSAW_TOOLS
Stopping sjavac server
Finished building target 'default (exploded-image)' in configuration 'solaris-sparcv9-normal-server-release'

# gmake images     
# ./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)

Formatting: I now use for code formatting.

No comments: