doc/building.html
changeset 49159 436f1e03fd04
parent 48743 ba52fa7bbf14
child 49234 3375a8039fde
equal deleted inserted replaced
49158:f62d1d1c2d9c 49159:436f1e03fd04
    42 <li><a href="#oracle-solaris-studio">Oracle Solaris Studio</a></li>
    42 <li><a href="#oracle-solaris-studio">Oracle Solaris Studio</a></li>
    43 <li><a href="#microsoft-visual-studio">Microsoft Visual Studio</a></li>
    43 <li><a href="#microsoft-visual-studio">Microsoft Visual Studio</a></li>
    44 <li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
    44 <li><a href="#ibm-xl-cc">IBM XL C/C++</a></li>
    45 </ul></li>
    45 </ul></li>
    46 <li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
    46 <li><a href="#boot-jdk-requirements">Boot JDK Requirements</a><ul>
    47 <li><a href="#jdk-8-on-linux">JDK 8 on Linux</a></li>
    47 <li><a href="#getting-jdk-binaries">Getting JDK binaries</a></li>
    48 <li><a href="#jdk-8-on-windows">JDK 8 on Windows</a></li>
       
    49 <li><a href="#jdk-8-on-macos">JDK 8 on macOS</a></li>
       
    50 <li><a href="#jdk-8-on-aix">JDK 8 on AIX</a></li>
       
    51 </ul></li>
    48 </ul></li>
    52 <li><a href="#external-library-requirements">External Library Requirements</a><ul>
    49 <li><a href="#external-library-requirements">External Library Requirements</a><ul>
    53 <li><a href="#freetype">FreeType</a></li>
    50 <li><a href="#freetype">FreeType</a></li>
    54 <li><a href="#cups">CUPS</a></li>
    51 <li><a href="#cups">CUPS</a></li>
    55 <li><a href="#x11">X11</a></li>
    52 <li><a href="#x11">X11</a></li>
   362 <h3 id="ibm-xl-cc">IBM XL C/C++</h3>
   359 <h3 id="ibm-xl-cc">IBM XL C/C++</h3>
   363 <p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
   360 <p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
   364 <p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
   361 <p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
   365 <h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
   362 <h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
   366 <p>Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the &quot;boot JDK&quot;. The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
   363 <p>Paradoxically, building OpenJDK requires a pre-existing JDK. This is called the &quot;boot JDK&quot;. The boot JDK does not have to be OpenJDK, though. If you are porting OpenJDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
   367 <p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be an JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to &quot;build itself&quot;, so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
   364 <p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, OpenJDK should be able to &quot;build itself&quot;, so an up-to-date build of the current OpenJDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
       
   365 <p>Early in the release cycle, version <em>N-1</em> may not yet have been released. In that case, the preferred boot JDK will be version <em>N-2</em> until version <em>N-1</em> is available.</p>
   368 <p>If the Boot JDK is not automatically detected, or the wrong JDK is picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
   366 <p>If the Boot JDK is not automatically detected, or the wrong JDK is picked, use <code>--with-boot-jdk</code> to point to the JDK to use.</p>
   369 <h3 id="jdk-8-on-linux">JDK 8 on Linux</h3>
   367 <h3 id="getting-jdk-binaries">Getting JDK binaries</h3>
   370 <p>On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-8-jdk</code> is typically enough to install OpenJDK 8. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-1.8.0-openjdk-devel</code>.</p>
   368 <p>OpenJDK binaries for Linux, Windows and macOS can be downloaded from <a href="http://jdk.java.net">jdk.java.net</a>. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for various platforms.</p>
   371 <h3 id="jdk-8-on-windows">JDK 8 on Windows</h3>
   369 <p>On Linux you can also get OpenJDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-&lt;VERSION&gt;-jdk</code> is typically enough to install OpenJDK &lt;VERSION&gt;. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-&lt;VERSION&gt;-openjdk-devel</code>.</p>
   372 <p>No pre-compiled binaries of OpenJDK 8 are readily available for Windows at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>. Another is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for Windows.</p>
       
   373 <h3 id="jdk-8-on-macos">JDK 8 on macOS</h3>
       
   374 <p>No pre-compiled binaries of OpenJDK 8 are readily available for macOS at the time of writing. An alternative is to download the <a href="http://www.oracle.com/technetwork/java/javase/downloads">Oracle JDK</a>, or to install it using <code>brew cask install java</code>. Another option is the <a href="https://adoptopenjdk.net/">Adopt OpenJDK Project</a>, which publishes experimental prebuilt binaries for macOS.</p>
       
   375 <h3 id="jdk-8-on-aix">JDK 8 on AIX</h3>
       
   376 <p>No pre-compiled binaries of OpenJDK 8 are readily available for AIX at the time of writing. A starting point for working with OpenJDK on AIX is the <a href="http://openjdk.java.net/projects/ppc-aix-port/">PowerPC/AIX Port Project</a>.</p>
       
   377 <h2 id="external-library-requirements">External Library Requirements</h2>
   370 <h2 id="external-library-requirements">External Library Requirements</h2>
   378 <p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
   371 <p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
   379 <p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-&lt;LIB&gt;=&lt;path&gt;</code> or <code>--with-&lt;LIB&gt;-include=&lt;path to include&gt; --with-&lt;LIB&gt;-lib=&lt;path to lib&gt;</code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
   372 <p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-&lt;LIB&gt;=&lt;path&gt;</code> or <code>--with-&lt;LIB&gt;-include=&lt;path to include&gt; --with-&lt;LIB&gt;-lib=&lt;path to lib&gt;</code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
   380 <p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
   373 <p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
   381 <h3 id="freetype">FreeType</h3>
   374 <h3 id="freetype">FreeType</h3>
   756 <pre><code>fatal error - couldn&#39;t allocate heap
   749 <pre><code>fatal error - couldn&#39;t allocate heap
   757 cannot create ... Permission denied
   750 cannot create ... Permission denied
   758 spawn failed</code></pre>
   751 spawn failed</code></pre>
   759 <p>This can be a sign of a Cygwin problem. See the information about solving problems in the <a href="#cygwin">Cygwin</a> section. Rebooting the computer might help temporarily.</p>
   752 <p>This can be a sign of a Cygwin problem. See the information about solving problems in the <a href="#cygwin">Cygwin</a> section. Rebooting the computer might help temporarily.</p>
   760 <h3 id="getting-help">Getting Help</h3>
   753 <h3 id="getting-help">Getting Help</h3>
   761 <p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <script type="text/javascript">
   754 <p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
   762 <!--
       
   763 h='&#x6f;&#112;&#x65;&#110;&#106;&#100;&#x6b;&#46;&#106;&#x61;&#118;&#x61;&#46;&#110;&#x65;&#116;';a='&#64;';n='&#98;&#x75;&#x69;&#108;&#100;&#x2d;&#100;&#x65;&#118;';e=n+a+h;
       
   764 document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'" clas'+'s="em' + 'ail">'+e+'<\/'+'a'+'>');
       
   765 // -->
       
   766 </script><noscript>&#98;&#x75;&#x69;&#108;&#100;&#x2d;&#100;&#x65;&#118;&#32;&#x61;&#116;&#32;&#x6f;&#112;&#x65;&#110;&#106;&#100;&#x6b;&#32;&#100;&#x6f;&#116;&#32;&#106;&#x61;&#118;&#x61;&#32;&#100;&#x6f;&#116;&#32;&#110;&#x65;&#116;</noscript>. Please include the relevant parts of the configure and/or build log.</p>
       
   767 <p>If you need general help or advice about developing for OpenJDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
   755 <p>If you need general help or advice about developing for OpenJDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
   768 <h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
   756 <h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
   769 <h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
   757 <h3 id="setting-up-a-forest-for-pushing-changes-defpath">Setting Up a Forest for Pushing Changes (defpath)</h3>
   770 <p>To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as <a href="http://openjdk.java.net/projects/code-tools/defpath">defpath</a>. It will help you setup a proper push path for pushing changes to OpenJDK.</p>
   758 <p>To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as <a href="http://openjdk.java.net/projects/code-tools/defpath">defpath</a>. It will help you setup a proper push path for pushing changes to OpenJDK.</p>
   771 <p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/defpath</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>
   759 <p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/defpath</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>