[OmniOS-discuss] Fwd: Java on Intel/OmniOS

Peter Tribble peter.tribble at gmail.com
Tue Nov 7 15:17:58 UTC 2017


Forwrding to the list, as it doesn't seem to be setting reply-to.

---------- Forwarded message ----------
From: Peter Tribble <peter.tribble at gmail.com>
Date: Tue, Nov 7, 2017 at 3:15 PM
Subject: Re: [OmniOS-discuss] Java on Intel/OmniOS
To: John D Groenveld <jdg117 at elvis.arl.psu.edu>




On Tue, Nov 7, 2017 at 12:50 AM, John D Groenveld <jdg117 at elvis.arl.psu.edu>
wrote:

> In message <20171107005541.5a90eefd at sleipner.datanom.net>, Michael
> Rasmussen wr
> ites:
> >At work we run our jira installation on RHEL 7 using the provided
> >OpenJDK 8.0 from Redhat. Using OpenJDK is certified on all Atlassian
> >products.
>
> Very cool.
> Anyone got a good OpenJDK 8 build recipe for OmniOS?
>

I sent one to the list about a year ago. Here it is, updated for a more
recent jdk update:

So the following should work. Apart from the benefit in OmniOS having a
current
JDK, I wanted to be sure we could build from scratch just in case the Oracle
binaries stopped working for any reason.

This is on a vanilla r151014, updated to current. I'm Primary Administrator
and the
java bootstrap is the java7 that ships with omnios. If you build with
Studio then
it's a little easier as that's assumed to be the compiler on SunOS (OI have
a patched
openjdk that uses gcc).

To get the sources:


wget http://hg.openjdk.java.net/jdk8u/jdk8u/archive/jdk8u141-b15.tar.bz2
foreach file ( corba hotspot jaxp jaxws langtools jdk nashorn )
wget http://hg.openjdk.java.net/jdk8u/jdk8u/${file}/archive/
jdk8u141-b15.tar.bz2 -O ${file}-jdk8u141-b15.tar.bz2
end
bzcat jdk8u141-b15.tar.bz2 | tar xf -
mv jdk8u-jdk8u141-b15 openjdk8u141
foreach file ( corba hotspot jaxp jaxws langtools jdk nashorn )
bzcat ${file}-jdk8u141-b15.tar.bz2 | tar xf -
mv ${file}-jdk8u141-b15 openjdk8u141/$file
end


Install the 64-bit pkgsrc bootstrap
https://pkgsrc.joyent.com/install-on-illumos/

Install appropriate pkgsrc and omnios packages.
There was a little trial and error to get this list...

pfexec pkg install developer/build/gnu-make system/header
system/header/header-audio developer/macro/cpp developer/object-file
developer/gnu-binutils

pfexec pkg install sunstudio12.1

pfexec /opt/local/bin/pkgin -y update
pfexec /opt/local/bin/pkgin -y install libX11 libXrender renderproto
libXext libXtst libXt xproto xextproto inputproto kbproto cups freetype2

Fix up some errant stupidities:

pfexec mv /usr/bin/gobjcopy /usr/bin/not-gobjcopy-honestly
pfexec ln -s /opt/local/include/X11 /usr/include
pfexec ln -s /opt/local/lib/libX11.so* /usr/lib/amd64
pfexec ln -s /opt/local/lib/libXext.so* /usr/lib/amd64
pfexec ln -s /opt/local/lib/libXrender.so* /usr/lib/amd64

[Note: the gobjcopy thing is the only true magic here. You don't need the
X11
symlinks for configure, but the build will fail as it doesn't seem to pass
along the
locations of the X11 libs and includes correctly.]

cd to the openjdk8u141 directory from your download.

env PATH=/opt/sunstudio12.1/bin:/usr/bin:/usr/sbin bash ./configure
--with-milestone=fcs --with-update-version=141 --with-build-number=b15
--enable-unlimited-crypto --x-includes=/opt/local/include
--x-libraries=/opt/local/lib --with-cups=/opt/local
--with-freetype-include=/opt/local/include/freetype2
--with-freetype-lib=/opt/local/lib

env PATH=/opt/sunstudio12.1/bin:/usr/bin:/usr/sbin gmake all

and the built image is in

build/solaris-x86_64-normal-server-release/images/j2sdk-image

Then there's a little tinkering with sunpkcs11-solaris.cfg, and you'll need
a full copy of cacerts, but otherwise you should be good to go.


-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20171107/2c880c93/attachment.html>


More information about the OmniOS-discuss mailing list