changeset 894:cdab3bfb573b ppc-aix-port-b01

Updated README-ppc.html to reflect the current project status
author simonis
date Thu, 26 Jul 2012 17:58:52 +0200
parents 82498bce2953
children e0dcb402d603
files README-ppc.html
diffstat 1 files changed, 105 insertions(+), 63 deletions(-) [+]
line wrap: on
line diff
--- a/README-ppc.html	Tue Jul 17 19:10:16 2012 +0200
+++ b/README-ppc.html	Thu Jul 26 17:58:52 2012 +0200
@@ -32,99 +32,141 @@
 <h2>Building on Linux/PPC64</h2>
 
 <p>
-Currently, after the initial check-in, the JDK will build on
-Linux/PPC64. However, the created JVM will be not functional (i.e. java will
-crash instantly with an "Unimplemented" error) because many of platfrom
-dependent functions are implemented as empty stubs.
+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
+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 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) and an 
-<a href="http://www.ibm.com/developerworks/java/jdk/linux/download.html#java7">IBM JDK 7</a> bootstrap JDK. 
-We've installed the general build dependecies as described 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. We then build the debug and product version of the
-JDK with the following command lines:
+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>.
+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">
+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=/sapmnt/depot/tools/gen/linuxppc64/licenseware/jse/1.7.0 \
-ALT_OUTPUTDIR=/priv/d046063/OpenJDK/output_ppc-aix-port_dbg \
-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 \
-IDLJ='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar com.sun.tools.corba.se.idl.toJavaPortable.Compile' \
-RMIC='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar sun.rmi.rmic.Main' \
-VERBOSE=true \
-HOTSPOT_TARGET=all_debugcore \
-CC_INTERP=true \
-OPENJDK=true \
-CORE_BUILD=true \
-debug_build 2>&1 | tee /priv/d046063/OpenJDK/output_ppc-aix-port_dbg.log
-</pre>
-
-A complete build log is availabele here: <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/build-logs/output_ppc-aix-port_dbg.log">output_ppc-aix-port_dbg.log</a>.
-
-<pre class="terminal">
-&gt; make FT_CFLAGS=-m64 LANG=C \
-ALT_BOOTDIR=/sapmnt/depot/tools/gen/linuxppc64/licenseware/jse/1.7.0 \
-ALT_OUTPUTDIR=/priv/d046063/OpenJDK/output_ppc-aix-port_opt \
+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 \
-IDLJ='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar com.sun.tools.corba.se.idl.toJavaPortable.Compile' \
-RMIC='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar sun.rmi.rmic.Main' \
 VERBOSE=true \
-HOTSPOT_TARGET=all_productcore \
 CC_INTERP=true \
 OPENJDK=true \
 CORE_BUILD=true \
-product_build 2>&1 | tee /priv/d046063/OpenJDK/output_ppc-aix-port_opt.log
+debug_build 2>&1 | tee build_ppc-aix-port_dbg.log
 </pre>
 
-A complete build log is availabele here: <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/build-logs/output_ppc-aix-port_opt.log">output_ppc-aix-port_opt.log</a>.
+<p>
+After the successfull build 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
+<tt>./build/linux-ppc64/</tt> and <tt>./build/linux-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>Building with the IBM JDK for Linux/PPC64 as bootstrap JDK</h3>
 
 <p>
-Until we integrate and fix all the missing stubs the following or a similar error will occur when the VM will be started:
+It is also possible to build with an <a
+href="http://www.ibm.com/developerworks/java/jdk/linux/download.html#java7">IBM
+JDK 7</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 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
+<tt>$(ALT_BOOTDIR)</tt>):
 </p>
 
 <pre class="terminal">
-&gt; /priv/d046063/OpenJDK/output_ppc-aix-port_dbg-debug/bin/java -version
-# To suppress the following error report, specify this argument
-# after -XX: or in .hotspotrc:  SuppressErrorAt=/icache_ppc.cpp:31
-#
-# A fatal error has been detected by the Java Runtime Environment:
-#
-#  Internal Error (/sapmnt/ld9502/a/priv/d046063/OpenJDK/ppc-aix-port/jdk7u/hotspot/src/cpu/ppc/vm/icache_ppc.cpp:31), pid=15473, tid=4398067565120
-#  Error: Unimplemented()
-#
-# JRE version: 7.0
-# Java VM: OpenJDK 64-Bit  VM (23.2-b04-jvmg interpreted mode linux- )
-# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
-#
-# An error report file with more information is saved as:
-# /sapmnt/ld9502/a/priv/d046063/OpenJDK/ppc-aix-port/jdk7u/hs_err_pid15473.log
-#
-# If you would like to submit a bug report, please visit:
-#   http://bugreport.sun.com/bugreport/crash.jsp
-#
-Current thread is 4398067565120
-Dumping core ...
-Aborted
+IDLJ='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar com.sun.tools.corba.se.idl.toJavaPortable.Compile'
+RMIC='$(ALT_BOOTDIR)/bin/java -cp $(ALT_BOOTDIR)/lib/tools.jar sun.rmi.rmic.Main'
+</pre>
+
+<p>
+We successfully used build <tt>pxp6470-20110827_01</tt> of the IBM JDK but
+there have been <a
+href="http://mail.openjdk.java.net/pipermail/ppc-aix-port-dev/2012-July/thread.html#21">reports</a>
+on the <a
+href="http://mail.openjdk.java.net/mailman/listinfo/ppc-aix-port-dev">ppc-aix-port-dev</a>
+mailing list that newer version of the IBM JDK (starting with build <tt>pxp6470sr1-20120330_01(SR1)</tt>) require some additional
+tweaking. Neil Richards advised in that mail thread to "<em>Just rename lib/ibmorbtools.jar to be something else.
+As the tools.jar tries to chain onto a file of that name, and that file
+contains the rmicext.properties files with the IBM-impl settings, moving
+that file off to one side should consistently cause rmic invocations to
+use the OpenJDK rmic IIOP generator.
+Approaching things this way would also mean one would not need to use
+the RMIC setting.
+(NB: One still need to use the IDLJ setting to use the OpenJDK idlj
+implementation, especially as moving the ibmorbtools.jar file aside also
+eliminates the IBM idlj implementation from the classpath).</em>"
+</p>
+
+<p>
+For historical reasons two old build logs of a debug and a product build
+bootstrapped with the IBM JDK are still available for inspection: <a
+href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/build-logs/output_ppc-aix-port_dbg.log">output_ppc-aix-port_dbg.log</a>,
+<a
+href="http://cr.openjdk.java.net/~simonis/ppc-aix-port/build-logs/output_ppc-aix-port_opt.log">output_ppc-aix-port_opt.log</a>.
+</p>
+
+<h3>Running the OpenJDK Linux/PPC64 port</h3>
+
+<p>
+Running the freshly build VM should give the following output:
+</p>
+
+<pre class="terminal">
+&gt; /OpenJDK/output_ppc-aix-port/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)
+
+HelloWorld
 </pre>
 
 <h2>Building on AIX/PPC64</h2>
 
 <p>
-TBD.
+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:
+</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 \
+  VERBOSE=true \
+  CC_INTERP=true \
+  OPENJDK=true \
+  CORE_BUILD=true \
+  all_debugcore
+</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.
 </p>
 
 </body>