Child pages
  • Building Openjdk
Skip to end of metadata
Go to start of metadata

Draft version for building openjdk

Don't run this on a separate filesystem, or you will see weird errors :)

create a source directory
pfexec mkdir /source
pfexec chown -R builduser /source

cd /source
download the sunstudio12u1-patched-ii-2010Feb-sol-x86.tar.gz
cp sunstudio* /opt
cd /opt
pfexec tar -xvzf sunstudio*

pfexec pkg install SUNWgmake SUNWj6dev SUNWant SUNWcups SUNWzip SUNWunzip SUNWxwhl SUNWxorg-headers SUNWaudh SUNWfreetype2
pfexec pkg install mercurial
pfexec pkg install gcc-43
For openjdk6 you need this extra library:
pfexec pkg install SUNWmfrun

Get the forest extension for mercurial
hg clone

Edit .hgrc in your home directory and add this:
username = First and Last Name <e-mailaddress>

hg fclone

for openjdk6

hg fclone

Create a build script:

cd /source/jdk6
env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/gnu/bin:/opt/sunstud
io12.1/bin \
gmake \
 ALT_BOOTDIR=/usr/java \
 ALT_JDK_IMPORT_PATH=/usr/java \
 ALT_CUPS_HEADERS_PATH=/usr/include \
 NO_DOCS=true \
 ALT_COMPILER_PATH=/opt/sunstudio12.1/bin \

chmod +x


The build will take quite a while to complete, when finished the builds are avaialble in the /source/jdk6/build directory

  • No labels

1 Comment

  1. Actually installing gcc-43 is not necessary, I think it installs the system/headers as a dependency which is also needed for the openjdk build.  I will have a look at the sunstudio dependencies, so you can illiminate the gcc install.