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 http://bitbucket.org/pmezard/hgforest-crew

Edit .hgrc in your home directory and add this:
[ui]
username = First and Last Name <e-mailaddress>
[extensions]
forest=/source/hgforest-crew/forest.py

hg fclone http://hg.openjdk.java.net/jdk7/jdk7

for openjdk6

hg fclone http://hg.openjdk.java.net/jdk6/jdk6

Create a build script:

build.sh

#!/bin/bash
cd /source/jdk6
unset CLASSPATH
unset JAVA_HOME
env -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/ccs/bin:/usr/gnu/bin:/opt/sunstud
io12.1/bin \
 LANG=C \
gmake \
 ALT_BOOTDIR=/usr/java \
 ALT_JDK_IMPORT_PATH=/usr/java \
 ALT_CUPS_HEADERS_PATH=/usr/include \
 ALLOW_DOWNLOADS=true \
 ARCH_DATA_MODEL=64 \
 NO_DOCS=true \
 ALT_COMPILER_PATH=/opt/sunstudio12.1/bin \
 HOTSPOT_BUILD_JOBS=1

chmod +x build.sh

./build.sh

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

Labels:
  1. Nov 08, 2010

    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.