changeset 897:44639bf80d87

Add AIX-specific build instructions to README-ppc.html
author simonis
date Tue, 30 Oct 2012 19:13:18 +0100
parents a9b1de9ac332
children 06179726206f
files README-ppc.html
diffstat 1 files changed, 275 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/README-ppc.html	Wed Oct 24 18:59:08 2012 +0200
+++ b/README-ppc.html	Tue Oct 30 19:13:18 2012 +0100
@@ -25,54 +25,54 @@
 <h1>OpenJDK PowerPC Port</h1>
 
 <p>
-This file contains some information on the <a href="http://openjdk.java.net/projects/ppc-aix-port">
+This file contains some information about the <a href="http://openjdk.java.net/projects/ppc-aix-port">
 OpenJDK PowerPC Port for Linux and AIX</a>. 
 </p>
 
 <h2>Building on Linux/PPC64</h2>
 
 <p>
-Currently (i.e. all versions after revision <a
-href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/file/ppc-aix-port-b01"><em>ppc-aix-port-b01</em></a>),
+Currently, i.e. all versions after
+revision <a href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/file/ppc-aix-port-b01"><em>ppc-aix-port-b01</em></a>,
 should successfully build and run on Linux/PPC64. While the default build
-currently creates an interpreter-only version of the VM which is in general about
-an order of magnitude slower than a corresponding server VM with JIT
+currently creates an interpreter-only version of the VM which is in general
+about an order of magnitude slower than a corresponding server VM with JIT
 compiler, it is still fully functional (e.g. it passes JVM98) and can even be
-used to bootstrap itself.
+used to bootstrap itself. Our current build system is a Power6 box running SLES
+10.3 with gcc version 4.1.2 (in general, more recent Linux distributions should
+work as well).
 </p>
 
 <h3>Building with the OpenJDK Linux/PPC64 port as bootstrap JDK</h3>
 
 <p>
-Our current build system is a Power6 box running SLES 10.3 with gcc version
-4.1.2 (in general, more recent Linux distributions should work as well).  A
-precompiled build of <em>ppc-aix-port-b01</em> is available for <a
-href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/bootstrap/openjdk1.7.0-ppc-aix-port-b01.tar.bz2">download</a>.
+A precompiled build of <em>ppc-aix-port-b01</em> is available
+for <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/bootstrap/openjdk1.7.0-ppc-aix-port-linux-ppc64-b01.tar.bz2">download</a>.
 With it and together with the other build dependencies fulfilled as described
-in the main <a
-href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/raw-file/tip/README-builds.html">
+in the
+main <a href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/raw-file/tip/README-builds.html">
 README-builds.html</a> file you can build a debug version of the JDK from the
 top-level source directory with the following command line:
 </p>
 
 <pre class="terminal">
 &gt; make FT_CFLAGS=-m64 LANG=C \
-ALT_BOOTDIR=&lt;path_to&gt;/jdk1.7.0-ppc-aix-port-b01 \
-ARCH_DATA_MODEL=64 \
-HOTSPOT_BUILD_JOBS=8 \
-PARALLEL_COMPILE_JOBS=8 \
-ALT_FREETYPE_LIB_PATH=/usr/local/lib \
-ALT_FREETYPE_HEADERS_PATH=/usr/local/include \
-ANT_HOME=/usr/local/apache-ant-1.8.4 \
-VERBOSE=true \
-CC_INTERP=true \
-OPENJDK=true \
-CORE_BUILD=true \
-debug_build 2>&1 | tee build_ppc-aix-port_dbg.log
+  ALT_BOOTDIR=&lt;path_to&gt;/jdk1.7.0-ppc-aix-port-b01 \
+  ARCH_DATA_MODEL=64 \
+  HOTSPOT_BUILD_JOBS=8 \
+  PARALLEL_COMPILE_JOBS=8 \
+  ALT_FREETYPE_LIB_PATH=/usr/local/lib \
+  ALT_FREETYPE_HEADERS_PATH=/usr/local/include \
+  ANT_HOME=/usr/local/apache-ant-1.8.4 \
+  VERBOSE=true \
+  CC_INTERP=true \
+  OPENJDK=true \
+  CORE_BUILD=true \
+  debug_build 2>&1 | tee build_ppc-aix-port_dbg.log
 </pre>
 
 <p>
-After the successfull build the results can be found under
+After the build finished successfully the results can be found under
 <tt>./build/linux-ppc64-debug/</tt>. Product and fastdebug versions can be
 build with the make targets <tt>product_build</tt> and
 <tt>fastdebug_build</tt> respectively (the build results will be located under
@@ -92,7 +92,7 @@
 <tt>idlj</tt> and <tt>rmic</tt> compilers you will have to add the following
 two additional variables to the build command line to force the IBM JDK to
 fall back to the default Sun/Oracle version of the mentioned compilers (notice
-the the single quotes are crucial here to prevent the immediate expansion of
+that the single quotes are crucial here to prevent the immediate expansion of
 <tt>$(ALT_BOOTDIR)</tt>):
 </p>
 
@@ -135,7 +135,7 @@
 </p>
 
 <pre class="terminal">
-&gt; /OpenJDK/output_ppc-aix-port/bin/java -showversion HelloWorld
+&gt; build/linux-ppc64-debug/bin/java -showversion HelloWorld
 openjdk version "1.7.0-internal"
 OpenJDK Runtime Environment (build 1.7.0-internal-jvmtests_2012_07_24_22_30-b00)
 OpenJDK 64-Bit  VM (build 23.2-b04, interpreted mode)
@@ -146,27 +146,264 @@
 <h2>Building on AIX/PPC64</h2>
 
 <p>
-Currently on AIX only the HotSpot build is functional. We use xlc 10.1 on AIX 5.3
-with an IBM bootstrap JDK and the following command line from within the
-<code>hotspot/make/</code> subdirectory:
+Currently, i.e. all versions after revision <a
+href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/file/ppc-aix-port-b02"><em>ppc-aix-port-b02</em></a>,
+should successfully build and run on AIX. While the default build
+currently creates an interpreter-only version of the VM which is in general about
+an order of magnitude slower than a corresponding server VM with JIT
+compiler, it is still fully functional (e.g. it passes JVM98) and can even be
+used to bootstrap itself.
+</p>
+
+<h3>Building with the OpenJDK AIX/PPC64 port as bootstrap JDK</h3>
+
+<p>
+A precompiled build of <em>ppc-aix-port-b02</em> is available
+for <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/bootstrap/openjdk1.7.0-ppc-aix-port-aix-ppc64-b02.tar.bz2">download</a>.
+We recommend using it or a self compiled OpenJDK version for AIX as bootstrap JDK.
+</p>
+
+<h3>Building with the IBM JDK for AIX as bootstrap JDK</h3>
+
+<p>
+It is also possible to build with an <a
+href="http://www.ibm.com/developerworks/java/jdk/aix/service.html#java6">IBM
+JDK 6</a> bootstrap JDK (after all this is how we initially bootstrapped the
+port). But because the IBM JDK uses a different default implementation of the
+<tt>idlj</tt> and <tt>rmic</tt> compilers you will have to rename or
+delete <code>lib/ibmorbtools.jar</code> and add the following additional
+variable to the build command line to force the IBM JDK to fall back to the
+default Sun/Oracle version of the IDLJ compiler (notice that the the single
+quotes are crucial here to prevent the immediate expansion of
+<tt>$(ALT_BOOTDIR)</tt>):
+</p>
+
+<pre class="terminal">
+IDLJ='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar com.sun.tools.corba.se.idl.toJavaPortable.Compile'
+</pre>
+
+<h3>AIX build dependencies</h3>
+
+<p>
+Our current build system is based on AIX 5.3 in order to produce binaries which
+can be run on any AIX version higher than 5.3. However building on
+newer version of AIX should in general work equally well (from time to time we
+build on AIX 7.1 as well). It should be noticed
+that the current build infrastructure only supports the
+commercial <a href="http://www-01.ibm.com/software/awdtools/xlcpp/">XL
+C/C++</a> compilers from IBM so getting a copy of the XL C/C++ compiler suite
+10.1 (or higher) is the first prerequisite that has to be fulfilled. You also
+need to to have the "AIXwindows Application Development Toolkit for X
+Extensions" (i.e. <code>X11.adt.ext</code>) package installed on your
+system. You can check this by doing:
 </p>
 
 <pre class="terminal">
-make \
-  ALT_BOOTDIR=/sapmnt/depot/tools/gen/rs6000_64/licenseware/jse/1.6.0 \
-  ALT_OUTPUTDIR=/usr/work/oJ/builds_aix-hotspot \
-  ARCH_DATA_MODEL=64 \
-  HOTSPOT_BUILD_JOBS=8 \
+&gt; lslpp -l X11.adt.ext
+  Fileset                      Level  State      Description         
+  ----------------------------------------------------------------------------
+Path: /usr/lib/objrepos
+  X11.adt.ext                7.1.0.0  COMMITTED  AIXwindows Application
+                                                 Development Toolkit for X
+                                                 Extensions
+</pre>
+
+<p>
+There are several other build dependencies (mostly described in the
+general <a href="http://hg.openjdk.java.net/ppc-aix-port/jdk7u/raw-file/tip/README-builds.html">
+README-builds.html</a> file) which are a little more complicate to fulfill on
+AIX than on Linux platforms, but they are all freely available as described in
+the following section.
+</p>
+
+
+<h4>Mercurial &amp; Python</h4>
+
+<p>
+The first thing to install
+is <a href="http://mercurial.selenic.com">Mercurial</a>. The
+Mercurial <a href=" http://mercurial.selenic.com/wiki/Download">download
+wiki</a> contains a
+special <a href="http://mercurial.selenic.com/wiki/Download#AIX">AIX</a>
+section which links
+to <a href="http://www.lunch.org.uk/wiki/aix_packages">http://www.lunch.org.uk/wiki/aix_packages</a>. The
+site provides various <a href="http://www.lunch.org.uk/aix/rpms">RPM
+packeges</a> for AIX 5.2 and higher. Download and
+install <a href="http://www.lunch.org.uk/aix/rpms/python-2.4.6-1.aix5.2.ppc.rpm">python-2.4.6-1.aix5.2.ppc.rpm</a>
+and <a href="http://www.lunch.org.uk/aix/rpms/mercurial-2.3.1-0.aix5.2.ppc.rpm">mercurial-2.3.1-0.aix5.2.ppc.rpm</a>
+(with <code>rpm -i &lt;package-name&gt;.rpm</code>). All the "free" software
+packages will be installed by default into the <code>/opt/freeware</code>
+subdirectory under AIX which seems to be the equivalent
+to <code>/usr/local</code> on Linux platforms.
+</p>
+
+<p>
+Notice that Python has a lot of dependencies on other freeware packages
+from <code>/opt/freeware</code> and you'll have to download and install them
+first before the installation of Python succeeds. Fortunately these packages can
+be downloaded directly from IBM's
+<a href="http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html">AIX
+Toolbox for Linux Applications</a> site (if you don't have the RPM package
+manager installed already you'll first have to get
+the <a href="ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/rpm.rte">AIX
+installp image for the rpm package manager for POWER</a> and install it with
+the command '<code>installp -qacXgd rpm.rte rpm.rte
+</code>'). On my AIX box, I had to install the following additional packages:
+</p>
+
+<ul>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/bzip2/bzip2-1.0.5-3.aix5.3.ppc.rpm">bzip2-1.0.5-3.aix5.3.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/db/db-3.3.11-4.aix5.1.ppc.rpm">db-3.3.11-4.aix5.1.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gdbm/gdbm-1.8.3-5.aix5.2.ppc.rpm">gdbm-1.8.3-5.aix5.2.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/zlib/zlib-1.2.3-4.aix5.2.ppc.rpm">zlib-1.2.3-4.aix5.2.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/readline/readline-4.3-2.aix5.1.ppc.rpm">readline-4.3-2.aix5.1.ppc.rpm</a></li>
+</ul>
+
+<p>
+Python also requires OpenSSL which is available from the "AIX Toolbox for Linux
+Applications" as well, but only after signing in with a universal IBM user
+ID, which can be obtained for free
+(follow the
+link <a href="http://www.ibm.com/services/forms/preLogin.do?source=aixtbx">AIX
+Toolbox Cryptographic Content</a> on
+the <a href="http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html">IBM
+AIX Toolbox download information</a> page).
+</p>
+
+<h4>GNU Make</h4>
+
+Unfortunately, the GNU Make package available from the "AIX Toolbox for Linux
+Applications" is too old (version 3.80 vs. 3.82) for building OpenJDK so we
+have to build our own one. Fortunately, that's not too hard:
+
+<pre class="terminal">
+&gt; wget http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
+&gt; tar -xzf make-3.82.tar.gz
+&gt; cd make-3.82
+&gt; CC=xlc_r ./configure --prefix=/opt/freeware
+&gt; make
+&gt; make install
+</pre>
+
+
+<h4>Freetype, Cups and friends</h4>
+
+<p>
+Luckily, a sufficiently new version of Freetype is available from the "AIX
+Toolbox for Linux Applications" site as well. We need the Freetype development
+package which itself has dependencies as listed below:
+</p>
+
+<ul>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/freetype2/freetype2-2.3.9-1.aix5.2.ppc.rpm">freetype2-2.3.9-1.aix5.2.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/freetype2/freetype2-devel-2.3.9-1.aix5.2.ppc.rpm">freetype2-devel-2.3.9-1.aix5.2.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/zlib/zlib-devel-1.2.3-4.aix5.2.ppc.rpm">zlib-devel-1.2.3-4.aix5.2.ppc.rpm</a></li>
+  <li><a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/pkg-config/pkg-config-0.19-6.aix5.2.ppc.rpm">pkg-config-0.19-6.aix5.2.ppc.rpm</a></li>
+</ul>
+
+<p>
+Notice that the Freetype package will only install a single archive
+under <code>/opt/freeware/lib/libfreetype.a</code> but that archive contains
+both 32- and 64-bit versions of the <code>libfreetype.so</code> shared library:
+</p>
+
+<pre class="terminal">
+&gt; ar -vt -Xany /opt/freeware/lib/libfreetype.a
+rwxr-xr-x     0/0     966393 Aug 21 01:42 2009 libfreetype.so.6
+rwxr-xr-x     0/0     1048680 Aug 21 01:41 2009 libfreetype.so.6
+</pre>
+
+<p>
+During a 64-bit build, the compiler will "magically" find the right version of
+the shared library from the archive.
+</p>
+
+<p>
+Unfortunately the "AIX Toolbox for Linux Applications" site provides no Cups
+package, so I
+took <a href="ftp://www.oss4aix.org/latest/aix53/cups-devel-1.6.1-1.aix5.3.ppc.rpm">cups-devel-1.6.1-1.aix5.3.ppc.rpm</a>
+from <a href="http://www.perzl.org/aix/">http://www.perzl.org/aix/</a>, another
+great site with precompiled open source software for AIX. The Cups development
+package has a lot of dependencies, but because the OpenJDK build only needs the
+Cups header files it is enough to force the installation of the Cups
+development package with <code>rpm -i --nodeps
+cups-devel-1.6.1-1.aix5.3.ppc.rpm</code>.
+</p>
+
+<h4>Setting up the <code>PATH</code> and building</h4>
+
+<p>
+If you prepend <code>/opt/freeware/bin</code> to you <code>PATH</code>
+environment variable you should be finally able to start the build with the
+following command line:
+</p>
+
+<pre class="terminal">
+make debug_build \
+  ALT_BOOTDIR=/usr/work/openjdk/nb/rs6000_64/last_known_good/output-jdk7u/j2sdk-image \
+  ANT_HOME=/sapmnt/depot/tools/gen/java/OpenSource/Ant/1.8.0 \
+  ALT_FREETYPE_LIB_PATH=/opt/freeware/lib \
+  ALT_FREETYPE_HEADERS_PATH=/opt/freeware/include \
+  ALT_CUPS_HEADERS_PATH=/opt/freeware/include \
   VERBOSE=true \
   CC_INTERP=true \
   OPENJDK=true \
   CORE_BUILD=true \
-  all_debugcore
+  HOTSPOT_BUILD_JOBS=8 \
+  PARALLEL_COMPILE_JOBS=8 2>&1 | tee /priv/d046063/OpenJDK/output-ppc-aix-port-debug.log
 </pre>
 
 <p>
-Work is underway to fix the JDK build and once the complete OpenJDK can be
-compiled on AIX it should be capable to bootstrap itself much like on Linux.
+After the build finished successfully the results can be found under
+<tt>./build/aix-ppc64-debug/</tt>. Product and fastdebug versions can be
+build with the make targets <tt>product_build</tt> and
+<tt>fastdebug_build</tt> respectively (the build results will be located under
+<tt>./build/aix-ppc64/</tt> and <tt>./build/aix-ppc64-fastdebug/</tt>). On
+our transitional <a
+href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/index.html">ppc-aix-port
+project page</a> you can find the build logs of our regular nightly makes.
+</p>
+
+<h3>Running the OpenJDK AIX/PPC64 port</h3>
+
+<p>
+Running the freshly build VM should give the following output:
+</p>
+
+<pre class="terminal">
+&gt; build/aix-ppc64-debug/bin/java -showversion HelloWorld
+openjdk version "1.7.0-internal-debug"
+OpenJDK Runtime Environment (build 1.7.0-internal-debug-d046063_2012_10_25_12_45-b00)
+OpenJDK 64-Bit  VM (build 23.2-b04-jvmg, interpreted mode)
+
+HelloWorld
+</pre>
+
+<h4>Fonts and Fontconfig (optional)</h4>
+
+<p>
+If you want to run AWT/Swing applications you have to install
+the <a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/fontconfig/fontconfig-2.4.2-1.aix5.2.ppc.rpm">fontconfig</a>
+package from the "AIX Toolbox for Linux Applications" site as described
+before. You will also have to install at least the "AIXwindows Latin Type1
+Fonts" package (<code>X11.fnt.iso_T1</code>) because Fontconfig
+and the <code>fontconfig.properties</code> file of the OpenJDK currently rely on
+the standard Type1 Postscript fonts. If you want to use other Type 1 or
+TrueType fonts (e.g. <code>X11.fnt.ucs.ttf</code>) you'll probably have to edit
+the
+local <a href="http://www.freedesktop.org/software/fontconfig/fontconfig-user.html">Fontconfig
+configuration file</a> (under <code>/opt/freeware/etc/fonts/local.conf</code>)
+and
+the <a href="http://download.java.net/jdk8/docs/technotes/guides/intl/fontconfig.html"><code>&lt;openjdk-path&gt;/jre/lib/fontconfig.properties</code>
+</a> file of your OpenJDK image.
+</p>
+
+<p>
+Also remember that we currently dynamically link against Freetype (see build
+dependencies above) so if you copy the build results to another AIX machine you
+have to ensure that the new host has at
+least <a href="ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/freetype2/freetype2-2.3.9-1.aix5.2.ppc.rpm">freetype2-2.3.9-1.aix5.2.ppc.rpm</a>
+installed.
 </p>
 
 </body>