Tue, 20 Aug 2013 17:44:35 -0700
8023433: Improve 'make help'
Reviewed-by: tbell
duke@2 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
duke@2 | 2 | <html> |
ohair@13 | 3 | <head> |
ohair@13 | 4 | <title>OpenJDK Build README</title> |
ohair@13 | 5 | </head> |
ohair@632 | 6 | <body style="background-color:aquamarine"> |
ohair@632 | 7 | |
ohair@13 | 8 | <!-- ====================================================== --> |
ohair@41 | 9 | <table width="100%"> |
ohair@13 | 10 | <tr> |
ohair@13 | 11 | <td align="center"> |
ohair@25 | 12 | <img alt="OpenJDK" |
ohair@25 | 13 | src="http://openjdk.java.net/images/openjdk.png" |
ohair@632 | 14 | width=256> |
ohair@13 | 15 | </td> |
ohair@13 | 16 | </tr> |
ohair@13 | 17 | <tr> |
ohair@13 | 18 | <td align=center> |
ohair@13 | 19 | <h1>OpenJDK Build README</h1> |
ohair@13 | 20 | </td> |
ohair@13 | 21 | </tr> |
ohair@13 | 22 | </table> |
ohair@632 | 23 | |
ohair@632 | 24 | <!-- ====================================================== --> |
ohair@13 | 25 | <hr> |
ohair@13 | 26 | <h2><a name="introduction">Introduction</a></h2> |
ohair@13 | 27 | <blockquote> |
ohair@632 | 28 | This README file contains build instructions for the |
ohair@632 | 29 | <a href="http://openjdk.java.net" target="_blank">OpenJDK</a>. |
ohair@632 | 30 | Building the source code for the |
ohair@632 | 31 | OpenJDK |
ohair@632 | 32 | requires |
ohair@632 | 33 | a certain degree of technical expertise. |
ohair@632 | 34 | |
ohair@632 | 35 | <!-- ====================================================== --> |
ohair@632 | 36 | <h3>!!!!!!!!!!!!!!! THIS IS A MAJOR RE-WRITE of this document. !!!!!!!!!!!!!</h3> |
ohair@632 | 37 | <blockquote> |
ohair@632 | 38 | Some Headlines: |
ohair@632 | 39 | <ul> |
ohair@632 | 40 | <li> |
ohair@632 | 41 | The build is now a "<code>configure && make</code>" style build |
ohair@632 | 42 | </li> |
ohair@632 | 43 | <li> |
ohair@632 | 44 | Any GNU make 3.81 or newer should work |
ohair@632 | 45 | </li> |
ohair@632 | 46 | <li> |
ohair@632 | 47 | The build should scale, i.e. more processors should |
ohair@632 | 48 | cause the build to be done in less wall-clock time |
ohair@632 | 49 | </li> |
ohair@632 | 50 | <li> |
ohair@632 | 51 | Nested or recursive make invocations have been significantly |
ohair@632 | 52 | reduced, as has the total fork/exec or spawning |
ohair@632 | 53 | of sub processes during the build |
ohair@632 | 54 | </li> |
ohair@632 | 55 | <li> |
ohair@632 | 56 | Windows MKS usage is no longer supported |
ohair@632 | 57 | </li> |
ohair@632 | 58 | <li> |
ohair@632 | 59 | Windows Visual Studio <code>vsvars*.bat</code> and |
ohair@632 | 60 | <code>vcvars*.bat</code> files are run automatically |
ohair@632 | 61 | </li> |
ohair@632 | 62 | <li> |
ohair@632 | 63 | Ant is no longer used when building the OpenJDK |
ohair@632 | 64 | </li> |
ohair@632 | 65 | <li> |
ohair@632 | 66 | Use of ALT_* environment variables for configuring the |
ohair@632 | 67 | build is no longer supported |
ohair@632 | 68 | </li> |
ohair@632 | 69 | </ul> |
ohair@632 | 70 | </blockquote> |
ohair@13 | 71 | </blockquote> |
ohair@632 | 72 | |
ohair@632 | 73 | <!-- ====================================================== --> |
ohair@13 | 74 | <hr> |
ohair@13 | 75 | <h2><a name="contents">Contents</a></h2> |
ohair@13 | 76 | <blockquote> |
ohair@13 | 77 | <ul> |
ohair@13 | 78 | <li><a href="#introduction">Introduction</a></li> |
ohair@632 | 79 | |
ohair@276 | 80 | <li><a href="#hg">Use of Mercurial</a> |
ohair@276 | 81 | <ul> |
ohair@276 | 82 | <li><a href="#get_source">Getting the Source</a></li> |
ohair@632 | 83 | <li><a href="#repositories">Repositories</a></li> |
ohair@276 | 84 | </ul> |
ohair@276 | 85 | </li> |
ohair@632 | 86 | |
ohair@632 | 87 | <li><a href="#building">Building</a> |
ohair@41 | 88 | <ul> |
ohair@632 | 89 | <li><a href="#setup">System Setup</a> |
ohair@632 | 90 | <ul> |
ohair@632 | 91 | <li><a href="#linux">Linux</a></li> |
ohair@632 | 92 | <li><a href="#solaris">Solaris</a></li> |
ohair@632 | 93 | <li><a href="#macosx">Mac OS X</a></li> |
ohair@632 | 94 | <li><a href="#windows">Windows</a></li> |
ohair@632 | 95 | </ul> |
ohair@632 | 96 | </li> |
ohair@632 | 97 | <li><a href="#configure">Configure</a></li> |
ohair@632 | 98 | <li><a href="#make">Make</a></li> |
ohair@41 | 99 | </ul> |
ohair@276 | 100 | </li> |
ohair@632 | 101 | <li><a href="#testing">Testing</a></li> |
ohair@632 | 102 | </ul> |
ohair@632 | 103 | <hr> |
ohair@632 | 104 | <ul> |
ohair@632 | 105 | <li><a href="#hints">Appendix A: Hints and Tips</a> |
ohair@320 | 106 | <ul> |
ohair@632 | 107 | <li><a href="#faq">FAQ</a></li> |
ohair@632 | 108 | <li><a href="#performance">Build Performance Tips</a></li> |
ohair@632 | 109 | <li><a href="#troubleshooting">Troubleshooting</a></li> |
ohair@320 | 110 | </ul> |
ohair@320 | 111 | </li> |
ohair@632 | 112 | <li><a href="#gmake">Appendix B: GNU Make Information</a></li> |
ohair@632 | 113 | <li><a href="#buildenvironments">Appendix C: Build Environments</a></li> |
ohair@632 | 114 | |
ohair@632 | 115 | <!-- Leave out |
ohair@632 | 116 | <li><a href="#mapping">Appendix D: Mapping Old Builds to the New Builds</a></li> |
ohair@632 | 117 | --> |
ohair@632 | 118 | |
ohair@13 | 119 | </ul> |
ohair@13 | 120 | </blockquote> |
ohair@276 | 121 | |
ohair@632 | 122 | <!-- ====================================================== --> |
ohair@276 | 123 | <hr> |
ohair@276 | 124 | <h2><a name="hg">Use of Mercurial</a></h2> |
ohair@276 | 125 | <blockquote> |
ohair@276 | 126 | The OpenJDK sources are maintained with the revision control system |
ohair@276 | 127 | <a href="http://mercurial.selenic.com/wiki/Mercurial">Mercurial</a>. |
ohair@276 | 128 | If you are new to Mercurial, please see the |
ohair@632 | 129 | <a href="http://mercurial.selenic.com/wiki/BeginnersGuides"> |
ohair@632 | 130 | Beginner Guides</a> |
ohair@632 | 131 | or refer to the <a href="http://hgbook.red-bean.com/"> |
ohair@632 | 132 | Mercurial Book</a>. |
ohair@276 | 133 | The first few chapters of the book provide an excellent overview of |
ohair@276 | 134 | Mercurial, what it is and how it works. |
ohair@276 | 135 | <br> |
ohair@276 | 136 | For using Mercurial with the OpenJDK refer to the |
ohair@320 | 137 | <a href="http://openjdk.java.net/guide/repositories.html#installConfig"> |
ohair@320 | 138 | Developer Guide: Installing and Configuring Mercurial</a> |
ohair@276 | 139 | section for more information. |
ohair@276 | 140 | |
ohair@276 | 141 | <h3><a name="get_source">Getting the Source</a></h3> |
ohair@276 | 142 | <blockquote> |
ohair@276 | 143 | To get the entire set of OpenJDK Mercurial repositories |
ohair@632 | 144 | use the script <code>get_source.sh</code> located in the |
ohair@632 | 145 | root repository: |
ohair@276 | 146 | <blockquote> |
ohair@632 | 147 | <code> |
ohair@632 | 148 | hg clone http://hg.openjdk.java.net/jdk8/jdk8 |
ohair@632 | 149 | <i>YourOpenJDK</i> |
ohair@632 | 150 | <br> |
ohair@632 | 151 | cd <i>YourOpenJDK</i> |
ohair@632 | 152 | <br> |
ohair@632 | 153 | bash ./get_source.sh |
ohair@632 | 154 | </code> |
ohair@276 | 155 | </blockquote> |
ohair@632 | 156 | Once you have all the repositories, keep in mind that each |
ohair@632 | 157 | repository is it's own independent repository. |
ohair@632 | 158 | You can also re-run <code>./get_source.sh</code> anytime to |
ohair@632 | 159 | pull over all the latest changesets in all the repositories. |
ohair@632 | 160 | This set of nested repositories has been given the term |
ohair@632 | 161 | "forest" and there are various ways to apply the same |
ohair@632 | 162 | <code>hg</code> command to each of the repositories. |
ohair@632 | 163 | For example, the script <code>make/scripts/hgforest.sh</code> |
ohair@632 | 164 | can be used to repeat the same <code>hg</code> |
ohair@632 | 165 | command on every repository, e.g. |
ohair@276 | 166 | <blockquote> |
ohair@632 | 167 | <code> |
ohair@276 | 168 | cd <i>YourOpenJDK</i> |
ohair@632 | 169 | <br> |
ohair@632 | 170 | bash ./make/scripts/hgforest.sh status |
ohair@632 | 171 | </code> |
ohair@276 | 172 | </blockquote> |
ohair@276 | 173 | </blockquote> |
ohair@276 | 174 | |
ohair@632 | 175 | <h3><a name="repositories">Repositories</a></h3> |
ohair@632 | 176 | <blockquote> |
ohair@632 | 177 | <p>The set of repositories and what they contain:</p> |
ohair@632 | 178 | <table border="1"> |
ohair@632 | 179 | <thead> |
ohair@632 | 180 | <tr> |
ohair@632 | 181 | <th>Repository</th> |
ohair@632 | 182 | <th>Contains</th> |
ohair@632 | 183 | </tr> |
ohair@632 | 184 | </thead> |
ohair@632 | 185 | <tbody> |
ohair@632 | 186 | <tr> |
ohair@632 | 187 | <td> |
ohair@632 | 188 | . (root) |
ohair@632 | 189 | </td> |
ohair@632 | 190 | <td> |
ohair@632 | 191 | common configure and makefile logic |
ohair@632 | 192 | </td> |
ohair@632 | 193 | </tr> |
ohair@632 | 194 | <tr> |
ohair@632 | 195 | <td> |
ohair@632 | 196 | hotspot |
ohair@632 | 197 | </td> |
ohair@632 | 198 | <td> |
ohair@632 | 199 | source code and make files for building |
ohair@632 | 200 | the OpenJDK Hotspot Virtual Machine |
ohair@632 | 201 | </td> |
ohair@632 | 202 | </tr> |
ohair@632 | 203 | <tr> |
ohair@632 | 204 | <td> |
ohair@632 | 205 | langtools |
ohair@632 | 206 | </td> |
ohair@632 | 207 | <td> |
ohair@632 | 208 | source code for the OpenJDK javac and language tools |
ohair@632 | 209 | </td> |
ohair@632 | 210 | </tr> |
ohair@632 | 211 | <tr> |
ohair@632 | 212 | <td> |
ohair@632 | 213 | jdk |
ohair@632 | 214 | </td> |
ohair@632 | 215 | <td> |
ohair@632 | 216 | source code and make files for building |
ohair@632 | 217 | the OpenJDK runtime libraries and misc files |
ohair@632 | 218 | </td> |
ohair@632 | 219 | </tr> |
ohair@632 | 220 | <tr> |
ohair@632 | 221 | <td> |
ohair@632 | 222 | jaxp |
ohair@632 | 223 | </td> |
ohair@632 | 224 | <td> |
ohair@632 | 225 | source code for the OpenJDK JAXP functionality |
ohair@632 | 226 | </td> |
ohair@632 | 227 | </tr> |
ohair@632 | 228 | <tr> |
ohair@632 | 229 | <td> |
ohair@632 | 230 | jaxws |
ohair@632 | 231 | </td> |
ohair@632 | 232 | <td> |
ohair@632 | 233 | source code for the OpenJDK JAX-WS functionality |
ohair@632 | 234 | </td> |
ohair@632 | 235 | </tr> |
ohair@632 | 236 | <tr> |
ohair@632 | 237 | <td> |
ohair@632 | 238 | corba |
ohair@632 | 239 | </td> |
ohair@632 | 240 | <td> |
ohair@632 | 241 | source code for the OpenJDK Corba functionality |
ohair@632 | 242 | </td> |
ohair@632 | 243 | </tr> |
ohair@632 | 244 | </tbody> |
ohair@632 | 245 | </table> |
ohair@632 | 246 | </blockquote> |
ohair@632 | 247 | |
ohair@632 | 248 | <h3><a name="guidelines">Repository Source Guidelines</a></h3> |
ohair@632 | 249 | <blockquote> |
ohair@632 | 250 | There are some very basic guidelines: |
ohair@632 | 251 | <ul> |
ohair@632 | 252 | <li> |
ohair@632 | 253 | Use of whitespace in source files |
ohair@632 | 254 | (.java, .c, .h, .cpp, and .hpp files) |
ohair@632 | 255 | is restricted. |
ohair@632 | 256 | No TABs, no trailing whitespace on lines, and files |
ohair@632 | 257 | should not terminate in more than one blank line. |
ohair@632 | 258 | </li> |
ohair@632 | 259 | <li> |
ohair@632 | 260 | Files with execute permissions should not be added |
ohair@632 | 261 | to the source repositories. |
ohair@632 | 262 | </li> |
ohair@632 | 263 | <li> |
ohair@632 | 264 | All generated files need to be kept isolated from |
ohair@632 | 265 | the files |
ohair@632 | 266 | maintained or managed by the source control system. |
ohair@632 | 267 | The standard area for generated files is the top level |
ohair@632 | 268 | <code>build/</code> directory. |
ohair@632 | 269 | </li> |
ohair@632 | 270 | <li> |
ohair@632 | 271 | The default build process should be to build the product |
ohair@632 | 272 | and nothing else, in one form, e.g. a product (optimized), |
ohair@632 | 273 | debug (non-optimized, -g plus assert logic), or |
ohair@632 | 274 | fastdebug (optimized, -g plus assert logic). |
ohair@632 | 275 | </li> |
ohair@632 | 276 | <li> |
ohair@632 | 277 | The <tt>.hgignore</tt> file in each repository |
ohair@632 | 278 | must exist and should |
ohair@632 | 279 | include <tt>^build/</tt>, <tt>^dist/</tt> and |
ohair@632 | 280 | optionally any |
ohair@632 | 281 | <tt>nbproject/private</tt> directories. |
ohair@632 | 282 | <strong>It should NEVER</strong> include |
ohair@632 | 283 | anything in the |
ohair@632 | 284 | <tt>src/</tt> or <tt>test/</tt> |
ohair@632 | 285 | or any managed directory area of a repository. |
ohair@632 | 286 | </li> |
ohair@632 | 287 | <li> |
ohair@632 | 288 | Directory names and file names should never contain |
ohair@632 | 289 | blanks or |
ohair@632 | 290 | non-printing characters. |
ohair@632 | 291 | </li> |
ohair@632 | 292 | <li> |
ohair@632 | 293 | Generated source or binary files should NEVER be added to |
ohair@632 | 294 | the repository (that includes <tt>javah</tt> output). |
ohair@632 | 295 | There are some exceptions to this rule, in particular |
ohair@632 | 296 | with some of the generated configure scripts. |
ohair@632 | 297 | </li> |
ohair@632 | 298 | <li> |
ohair@632 | 299 | Files not needed for typical building |
ohair@632 | 300 | or testing of the repository |
ohair@632 | 301 | should not be added to the repository. |
ohair@632 | 302 | </li> |
ohair@632 | 303 | </ul> |
ohair@632 | 304 | </blockquote> |
ohair@632 | 305 | |
ohair@276 | 306 | </blockquote> |
ohair@276 | 307 | |
ohair@632 | 308 | <!-- ====================================================== --> |
ohair@13 | 309 | <hr> |
ohair@632 | 310 | <h2><a name="building">Building</a></h2> |
ohair@13 | 311 | <blockquote> |
ohair@632 | 312 | The very first step in building the OpenJDK is making sure the |
ohair@632 | 313 | system itself has everything it needs to do OpenJDK builds. |
ohair@632 | 314 | Once a system is setup, it generally doesn't need to be done again. |
ohair@632 | 315 | <br> |
ohair@632 | 316 | Building the OpenJDK is now done with running a |
ohair@632 | 317 | <a href="#configure"><code>configure</code></a> |
ohair@632 | 318 | script which will try and find and verify you have everything |
ohair@632 | 319 | you need, followed by running |
ohair@632 | 320 | <a href="#gmake"><code>make</code></a>, e.g. |
ohair@276 | 321 | <blockquote> |
ohair@632 | 322 | <b> |
ohair@632 | 323 | <code> |
ohair@632 | 324 | bash ./configure<br> |
ohair@632 | 325 | make all |
ohair@632 | 326 | </code> |
ohair@632 | 327 | </b> |
ohair@632 | 328 | </blockquote> |
ohair@632 | 329 | Where possible the <code>configure</code> script will attempt to located the |
ohair@632 | 330 | various components in the default locations or via component |
ohair@632 | 331 | specific variable settings. |
ohair@632 | 332 | When the normal defaults fail or components cannot be found, |
ohair@632 | 333 | additional <code>configure</code> options may be necessary to help <code>configure</code> |
ohair@632 | 334 | find the necessary tools for the build, or you may need to |
ohair@632 | 335 | re-visit the setup of your system due to missing software |
ohair@632 | 336 | packages. |
ohair@632 | 337 | <br> |
ohair@632 | 338 | <strong>NOTE:</strong> The <code>configure</code> script |
ohair@632 | 339 | file does not have |
ohair@632 | 340 | execute permissions and will need to be explicitly run with |
ohair@632 | 341 | <code>bash</code>, |
ohair@632 | 342 | see the <a href="#guidelines">source guidelines</a>. |
robilad@132 | 343 | |
ohair@632 | 344 | <!-- ====================================================== --> |
ohair@632 | 345 | <hr> |
ohair@632 | 346 | <h3><a name="setup">System Setup</a></h3> |
ohair@632 | 347 | <blockquote> |
ohair@632 | 348 | Before even attempting to use a system to build the OpenJDK |
ohair@632 | 349 | there are some very basic system setups needed. |
ohair@632 | 350 | For all systems: |
ohair@632 | 351 | <ul> |
ohair@632 | 352 | <li> |
ohair@632 | 353 | Be sure the GNU make utility is version 3.81 or newer, |
ohair@632 | 354 | e.g. run "<code>make -version</code>" |
ohair@632 | 355 | </li> |
ohair@632 | 356 | <li> |
ohair@632 | 357 | Install a |
smarks@744 | 358 | <a name="bootjdk">Bootstrap JDK</a>. |
ohair@632 | 359 | All OpenJDK builds require access to a previously released |
smarks@744 | 360 | JDK called the <i>bootstrap JDK</i> or <i>boot JDK.</i> |
smarks@744 | 361 | The general rule is that the bootstrap JDK |
smarks@744 | 362 | must be an instance of the previous major |
smarks@744 | 363 | release of the JDK. In addition, there may be |
smarks@744 | 364 | a requirement to use a release at or beyond a |
smarks@744 | 365 | particular update level. |
smarks@744 | 366 | <br> <br> |
smarks@744 | 367 | |
smarks@744 | 368 | <b><i>Building JDK 8 requires use of a version |
smarks@744 | 369 | of JDK 7 that is at Update 7 or newer. JDK 8 |
smarks@744 | 370 | developers should not use JDK 8 as the boot |
smarks@744 | 371 | JDK, to ensure that JDK 8 dependencies are |
smarks@744 | 372 | not introduced into the parts of the system |
smarks@744 | 373 | that are built with JDK 7.</i></b> |
smarks@744 | 374 | |
smarks@744 | 375 | <br> <br> |
ohair@632 | 376 | The JDK 7 binaries can be downloaded from Oracle's |
ohair@632 | 377 | <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" |
ohair@632 | 378 | target="_blank">JDK 7 download site</a>. |
ohair@632 | 379 | For build performance reasons |
ohair@632 | 380 | is very important that this bootstrap JDK be made available |
ohair@632 | 381 | on the local disk of the machine doing the build. |
ohair@632 | 382 | You should add its <code>bin</code> directory |
ohair@632 | 383 | to the <code>PATH</code> environment variable. |
ohair@632 | 384 | If <code>configure</code> has any issues finding this JDK, you may |
ohair@632 | 385 | need to use the <code>configure</code> option |
ohair@632 | 386 | <code>--with-boot-jdk</code>. |
ohair@632 | 387 | </li> |
ohair@632 | 388 | <li> |
ohair@632 | 389 | Insure that GNU make, the Bootstrap JDK, |
ohair@632 | 390 | and the compilers are all |
ohair@632 | 391 | in your PATH environment variable |
ohair@632 | 392 | </li> |
ohair@632 | 393 | </ul> |
ohair@632 | 394 | And for specific systems: |
ohair@632 | 395 | <table border="1"> |
ohair@632 | 396 | <thead> |
ohair@632 | 397 | <tr> |
ohair@632 | 398 | <th>Linux</th> |
ohair@632 | 399 | <th>Solaris</th> |
ohair@632 | 400 | <th>Windows</th> |
ohair@632 | 401 | <th>Mac OS X</th> |
ohair@632 | 402 | </tr> |
ohair@632 | 403 | </thead> |
ohair@632 | 404 | <tbody> |
ohair@632 | 405 | <tr> |
ohair@632 | 406 | <td> |
ohair@632 | 407 | Install all the software development |
ohair@632 | 408 | packages needed including |
ohair@632 | 409 | <a href="#alsa">alsa</a>, |
ohair@632 | 410 | <a href="#freetype">freetype</a>, |
ohair@632 | 411 | <a href="#cups">cups</a>, and |
ohair@632 | 412 | <a href="#xrender">xrender</a>. |
ohair@632 | 413 | <br> |
ohair@632 | 414 | See |
ohair@632 | 415 | <a href="#SDBE">specific system packages</a>. |
ohair@632 | 416 | </td> |
ohair@632 | 417 | <td> |
ohair@632 | 418 | Install all the software development |
ohair@632 | 419 | packages needed including |
ohair@632 | 420 | <a href="#studio">Studio Compilers</a>, |
ohair@632 | 421 | <a href="#freetype">freetype</a>, |
ohair@632 | 422 | <a href="#cups">cups</a>, and |
ohair@632 | 423 | <a href="#xrender">xrender</a>. |
ohair@632 | 424 | <br> |
ohair@632 | 425 | See |
ohair@632 | 426 | <a href="#SDBE">specific system packages</a>. |
ohair@632 | 427 | </td> |
ohair@632 | 428 | <td> |
ohair@632 | 429 | <ul> |
ohair@632 | 430 | <li> |
ohair@632 | 431 | Install one of |
ohair@632 | 432 | <a href="#cygwin">CYGWIN</a> or |
ohair@632 | 433 | <a href="#msys">MinGW/MSYS</a> |
ohair@632 | 434 | </li> |
ohair@632 | 435 | <li> |
ohair@632 | 436 | Install |
ohair@632 | 437 | <a href="#vs2010">Visual Studio 2010</a> |
ohair@632 | 438 | </li> |
ohair@632 | 439 | <li> |
ohair@632 | 440 | Install the |
ohair@632 | 441 | <a href="#dxsdk">Microsoft DirectX SDK</a> |
ohair@632 | 442 | </li> |
ohair@632 | 443 | </ul> |
ohair@632 | 444 | </td> |
ohair@632 | 445 | <td> |
ohair@632 | 446 | Install |
ohair@632 | 447 | <a href="https://developer.apple.com/xcode/">XCode 4.5.2</a> |
ohair@632 | 448 | and also install the "Command line tools" found under the |
ohair@632 | 449 | preferences pane "Downloads" |
ohair@632 | 450 | </td> |
ohair@632 | 451 | </tr> |
ohair@632 | 452 | </tbody> |
ohair@632 | 453 | </table> |
ohair@632 | 454 | |
ohair@632 | 455 | <h4><a name="linux">Linux</a></h4> |
ohair@632 | 456 | <blockquote> |
ohair@632 | 457 | With Linux, try and favor the system packages over |
ohair@632 | 458 | building your own |
ohair@632 | 459 | or getting packages from other areas. |
ohair@632 | 460 | Most Linux builds should be possible with the system's |
ohair@632 | 461 | available packages. |
ohair@632 | 462 | <br> |
ohair@632 | 463 | Note that some Linux systems have a habit of pre-populating |
ohair@632 | 464 | your environment variables for you, for example <code>JAVA_HOME</code> |
ohair@632 | 465 | might get pre-defined for you to refer to the JDK installed on |
ohair@632 | 466 | your Linux system. |
ohair@632 | 467 | You will need to unset <code>JAVA_HOME</code>. |
ohair@632 | 468 | It's a good idea to run <code>env</code> and verify the |
ohair@632 | 469 | environment variables you are getting from the default system |
ohair@632 | 470 | settings make sense for building the OpenJDK. |
ohair@632 | 471 | |
ohair@632 | 472 | </blockquote> |
ohair@632 | 473 | |
ohair@632 | 474 | <h4><a name="solaris">Solaris</a></h4> |
ohair@632 | 475 | <blockquote> |
ohair@632 | 476 | <h5><a name="studio">Studio Compilers</a></h5> |
ohair@632 | 477 | <blockquote> |
ohair@632 | 478 | At a minimum, the |
ohair@632 | 479 | <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.htm" target="_blank"> |
ohair@632 | 480 | Studio 12 Update 1 Compilers</a> |
ohair@632 | 481 | (containing version 5.10 of the C and C++ compilers) is required, |
ohair@632 | 482 | including specific patches. |
ohair@632 | 483 | <p> |
ohair@632 | 484 | The Solaris SPARC patch list is: |
ohair@632 | 485 | <ul> |
ohair@632 | 486 | <li> |
ohair@632 | 487 | 118683-05: SunOS 5.10: Patch for profiling libraries and assembler |
ohair@632 | 488 | </li> |
ohair@632 | 489 | <li> |
ohair@632 | 490 | 119963-21: SunOS 5.10: Shared library patch for C++ |
ohair@632 | 491 | </li> |
ohair@632 | 492 | <li> |
ohair@632 | 493 | 120753-08: SunOS 5.10: Microtasking libraries (libmtsk) patch |
ohair@632 | 494 | </li> |
ohair@632 | 495 | <li> |
ohair@632 | 496 | 128228-09: Sun Studio 12 Update 1: Patch for Sun C++ Compiler |
ohair@632 | 497 | </li> |
ohair@632 | 498 | <li> |
ohair@632 | 499 | 141860-03: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
ohair@632 | 500 | </li> |
ohair@632 | 501 | <li> |
ohair@632 | 502 | 141861-05: Sun Studio 12 Update 1: Patch for Sun C Compiler |
ohair@632 | 503 | </li> |
ohair@632 | 504 | <li> |
ohair@632 | 505 | 142371-01: Sun Studio 12.1 Update 1: Patch for dbx |
ohair@632 | 506 | </li> |
ohair@632 | 507 | <li> |
ohair@632 | 508 | 143384-02: Sun Studio 12 Update 1: Patch for debuginfo handling |
ohair@632 | 509 | </li> |
ohair@632 | 510 | <li> |
ohair@632 | 511 | 143385-02: Sun Studio 12 Update 1: Patch for Compiler Common patch for Sun C C++ F77 F95 |
ohair@632 | 512 | </li> |
ohair@632 | 513 | <li> |
ohair@632 | 514 | 142369-01: Sun Studio 12.1: Patch for Performance Analyzer Tools |
ohair@632 | 515 | </li> |
ohair@632 | 516 | </ul> |
ohair@632 | 517 | <p> |
ohair@632 | 518 | The Solaris X86 patch list is: |
ohair@632 | 519 | <ul> |
ohair@632 | 520 | <li> |
ohair@632 | 521 | 119961-07: SunOS 5.10_x86, x64, Patch for profiling libraries and assembler |
ohair@632 | 522 | </li> |
ohair@632 | 523 | <li> |
ohair@632 | 524 | 119964-21: SunOS 5.10_x86: Shared library patch for C++_x86 |
ohair@632 | 525 | </li> |
ohair@632 | 526 | <li> |
ohair@632 | 527 | 120754-08: SunOS 5.10_x86: Microtasking libraries (libmtsk) patch |
ohair@632 | 528 | </li> |
ohair@632 | 529 | <li> |
ohair@632 | 530 | 141858-06: Sun Studio 12 Update 1_x86: Sun Compiler Common patch for x86 backend |
ohair@632 | 531 | </li> |
ohair@632 | 532 | <li> |
ohair@632 | 533 | 128229-09: Sun Studio 12 Update 1_x86: Patch for C++ Compiler |
ohair@632 | 534 | </li> |
ohair@632 | 535 | <li> |
ohair@632 | 536 | 142363-05: Sun Studio 12 Update 1_x86: Patch for C Compiler |
ohair@632 | 537 | </li> |
ohair@632 | 538 | <li> |
ohair@632 | 539 | 142368-01: Sun Studio 12.1_x86: Patch for Performance Analyzer Tools |
ohair@632 | 540 | </li> |
ohair@632 | 541 | </ul> |
ohair@632 | 542 | <p> |
ohair@632 | 543 | Place the <code>bin</code> directory in <code>PATH</code>. |
ohair@632 | 544 | <p> |
ohair@632 | 545 | The Oracle Solaris Studio Express compilers at: |
ohair@632 | 546 | <a href="http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-142582.html" target="_blank"> |
ohair@632 | 547 | Oracle Solaris Studio Express Download site</a> |
ohair@632 | 548 | are also an option, although these compilers have not |
ohair@632 | 549 | been extensively used yet. |
ohair@632 | 550 | </blockquote> |
ohair@632 | 551 | |
ohair@632 | 552 | </blockquote> <!-- Solaris --> |
ohair@632 | 553 | |
ohair@632 | 554 | <h4><a name="windows">Windows</a></h4> |
ohair@632 | 555 | <blockquote> |
ohair@632 | 556 | |
ohair@632 | 557 | <h5><a name="toolkit">Windows Unix Toolkit</a></h5> |
ohair@632 | 558 | <blockquote> |
ohair@632 | 559 | Building on Windows requires a Unix-like environment, notably a |
ohair@632 | 560 | Unix-like shell. |
ohair@632 | 561 | There are several such environments available of which |
ohair@632 | 562 | <a href="http://www.cygwin.com/">Cygwin</a> and |
ohair@632 | 563 | <a href="http://www.mingw.org/wiki/MSYS">MinGW/MSYS</a> are |
ohair@632 | 564 | currently supported for |
ohair@632 | 565 | the OpenJDK build. One of the differences of these |
ohair@632 | 566 | systems from standard Windows tools is the way |
ohair@632 | 567 | they handle Windows path names, particularly path names which contain |
ohair@632 | 568 | spaces, backslashes as path separators and possibly drive letters. |
ohair@632 | 569 | Depending |
ohair@632 | 570 | on the use case and the specifics of each environment these path |
ohair@632 | 571 | problems can |
ohair@632 | 572 | be solved by a combination of quoting whole paths, translating |
ohair@632 | 573 | backslashes to |
ohair@632 | 574 | forward slashes, escaping backslashes with additional backslashes and |
ohair@632 | 575 | translating the path names to their |
ohair@632 | 576 | <a href="http://en.wikipedia.org/wiki/8.3_filename"> |
ohair@632 | 577 | "8.3" version</a>. |
ohair@632 | 578 | |
ohair@632 | 579 | <h6><a name="cygwin">CYGWIN</a></h6> |
ohair@632 | 580 | <blockquote> |
ohair@632 | 581 | CYGWIN is an open source, Linux-like environment which tries to emulate |
ohair@632 | 582 | a complete POSIX layer on Windows. It tries to be smart about path names |
ohair@632 | 583 | and can usually handle all kinds of paths if they are correctly quoted |
ohair@632 | 584 | or escaped although internally it maps drive letters <code><drive>:</code> |
ohair@632 | 585 | to a virtual directory <code>/cygdrive/<drive></code>. |
ohair@632 | 586 | <p> |
ohair@632 | 587 | You can always use the <code>cygpath</code> utility to map pathnames with spaces |
ohair@632 | 588 | or the backslash character into the <code>C:/</code> style of pathname |
ohair@632 | 589 | (called 'mixed'), e.g. <code>cygpath -s -m "<i>path</i>"</code>. |
ohair@632 | 590 | </p> |
ohair@632 | 591 | <p> |
ohair@632 | 592 | Note that the use of CYGWIN creates a unique problem with regards to |
ohair@632 | 593 | setting <a href="#path"><code>PATH</code></a>. Normally on Windows |
ohair@632 | 594 | the <code>PATH</code> variable contains directories |
ohair@632 | 595 | separated with the ";" character (Solaris and Linux use ":"). |
ohair@632 | 596 | With CYGWIN, it uses ":", but that means that paths like "C:/path" |
ohair@632 | 597 | cannot be placed in the CYGWIN version of <code>PATH</code> and |
ohair@632 | 598 | instead CYGWIN uses something like <code>/cygdrive/c/path</code> |
ohair@632 | 599 | which CYGWIN understands, but only CYGWIN understands. |
ohair@632 | 600 | </p> |
ohair@632 | 601 | <p> |
ohair@632 | 602 | The OpenJDK build requires CYGWIN version 1.7.16 or newer. |
ohair@632 | 603 | Information about CYGWIN can |
ohair@632 | 604 | be obtained from the CYGWIN website at |
ohair@632 | 605 | <a href="http://www.cygwin.com" target="_blank">www.cygwin.com</a>. |
ohair@632 | 606 | </p> |
ohair@632 | 607 | <p> |
ohair@632 | 608 | By default CYGWIN doesn't install all the tools required for building |
ohair@632 | 609 | the OpenJDK. |
ohair@632 | 610 | Along with the default installation, you need to install |
ohair@632 | 611 | the following tools. |
ohair@632 | 612 | <blockquote> |
ohair@632 | 613 | <table border="1"> |
ohair@632 | 614 | <thead> |
ohair@632 | 615 | <tr> |
ohair@632 | 616 | <td>Binary Name</td> |
ohair@632 | 617 | <td>Category</td> |
ohair@632 | 618 | <td>Package</td> |
ohair@632 | 619 | <td>Description</td> |
ohair@632 | 620 | </tr> |
ohair@632 | 621 | </thead> |
ohair@632 | 622 | <tbody> |
ohair@632 | 623 | <tr> |
ohair@632 | 624 | <td>ar.exe</td> |
ohair@632 | 625 | <td>Devel</td> |
ohair@632 | 626 | <td>binutils</td> |
ohair@632 | 627 | <td> |
ohair@632 | 628 | The GNU assembler, linker and binary utilities |
ohair@632 | 629 | </td> |
ohair@632 | 630 | </tr> |
ohair@632 | 631 | <tr> |
ohair@632 | 632 | <td>make.exe</td> |
ohair@632 | 633 | <td>Devel</td> |
ohair@632 | 634 | <td>make</td> |
ohair@632 | 635 | <td> |
ohair@632 | 636 | The GNU version of the 'make' utility built for CYGWIN |
ohair@632 | 637 | </td> |
ohair@632 | 638 | </tr> |
ohair@632 | 639 | <tr> |
ohair@632 | 640 | <td>m4.exe</td> |
ohair@632 | 641 | <td>Interpreters</td> |
ohair@632 | 642 | <td>m4</td> |
ohair@632 | 643 | <td> |
ohair@632 | 644 | GNU implementation of the traditional Unix macro |
ohair@632 | 645 | processor |
ohair@632 | 646 | </td> |
ohair@632 | 647 | </tr> |
ohair@632 | 648 | <tr> |
ohair@632 | 649 | <td>cpio.exe</td> |
ohair@632 | 650 | <td>Utils</td> |
ohair@632 | 651 | <td>cpio</td> |
ohair@632 | 652 | <td> |
ohair@632 | 653 | A program to manage archives of files |
ohair@632 | 654 | </td> |
ohair@632 | 655 | </tr> |
ohair@632 | 656 | <tr> |
ohair@632 | 657 | <td>gawk.exe</td> |
ohair@632 | 658 | <td>Utils</td> |
ohair@632 | 659 | <td>awk</td> |
ohair@632 | 660 | <td> |
ohair@632 | 661 | Pattern-directed scanning and processing language |
ohair@632 | 662 | </td> |
ohair@632 | 663 | </tr> |
ohair@632 | 664 | <tr> |
ohair@632 | 665 | <td>file.exe</td> |
ohair@632 | 666 | <td>Utils</td> |
ohair@632 | 667 | <td>file</td> |
ohair@632 | 668 | <td> |
ohair@632 | 669 | Determines file type using 'magic' numbers |
ohair@632 | 670 | </td> |
ohair@632 | 671 | </tr> |
ohair@632 | 672 | <tr> |
ohair@632 | 673 | <td>zip.exe</td> |
ohair@632 | 674 | <td>Archive</td> |
ohair@632 | 675 | <td>zip</td> |
ohair@632 | 676 | <td> |
ohair@632 | 677 | Package and compress (archive) files |
ohair@632 | 678 | </td> |
ohair@632 | 679 | </tr> |
ohair@632 | 680 | <tr> |
ohair@632 | 681 | <td>unzip.exe</td> |
ohair@632 | 682 | <td>Archive</td> |
ohair@632 | 683 | <td>unzip</td> |
ohair@632 | 684 | <td> |
ohair@632 | 685 | Extract compressed files in a ZIP archive |
ohair@632 | 686 | </td> |
ohair@632 | 687 | </tr> |
ohair@632 | 688 | <tr> |
ohair@632 | 689 | <td>free.exe</td> |
ohair@632 | 690 | <td>System</td> |
ohair@632 | 691 | <td>procps</td> |
ohair@632 | 692 | <td> |
ohair@632 | 693 | Display amount of free and used memory in the system |
ohair@632 | 694 | </td> |
ohair@632 | 695 | </tr> |
ohair@632 | 696 | </tbody> |
ohair@632 | 697 | </table> |
ohair@632 | 698 | </blockquote> |
ohair@632 | 699 | Note that the CYGWIN software can conflict with other non-CYGWIN |
ohair@632 | 700 | software on your Windows system. |
ohair@632 | 701 | CYGWIN provides a |
ohair@632 | 702 | <a href="http://cygwin.com/faq/faq.using.html" target="_blank">FAQ</a> for |
ohair@632 | 703 | known issues and problems, of particular interest is the |
ohair@632 | 704 | section on |
ohair@632 | 705 | <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
ohair@632 | 706 | BLODA (applications that interfere with CYGWIN)</a>. |
ohair@632 | 707 | </blockquote> |
ohair@632 | 708 | |
ohair@632 | 709 | <h6><a name="msys">MinGW/MSYS</a></h6> |
ohair@632 | 710 | <blockquote> |
ohair@632 | 711 | MinGW ("Minimalist GNU for Windows") is a collection of free Windows |
ohair@632 | 712 | specific header files and import libraries combined with GNU toolsets that |
ohair@632 | 713 | allow one to produce native Windows programs that do not rely on any |
ohair@632 | 714 | 3rd-party C runtime DLLs. MSYS is a supplement to MinGW which allows building |
ohair@632 | 715 | applications and programs which rely on traditional UNIX tools to |
ohair@632 | 716 | be present. Among others this includes tools like <code>bash</code> |
ohair@632 | 717 | and <code>make</code>. |
ohair@632 | 718 | See <a href="http://www.mingw.org/wiki/MSYS" target="_blank">MinGW/MSYS</a> |
ohair@632 | 719 | for more information. |
ohair@632 | 720 | <p> |
ohair@632 | 721 | Like Cygwin, MinGW/MSYS can handle different types of path formats. They |
ohair@632 | 722 | are internally converted to paths with forward slashes and drive letters |
ohair@632 | 723 | <code><drive>:</code> replaced by a virtual |
ohair@632 | 724 | directory <code>/<drive></code>. Additionally, MSYS automatically |
ohair@632 | 725 | detects binaries compiled for the MSYS environment and feeds them with the |
ohair@632 | 726 | internal, Unix-style path names. If native Windows applications are called |
ohair@632 | 727 | from within MSYS programs their path arguments are automatically converted |
ohair@632 | 728 | back to Windows style path names with drive letters and backslashes as |
ohair@632 | 729 | path separators. This may cause problems for Windows applications which |
ohair@632 | 730 | use forward slashes as parameter separator (e.g. <code>cl /nologo /I</code>) |
ohair@632 | 731 | because MSYS may wrongly <a href="http://mingw.org/wiki/Posix_path_conversion"> |
ohair@632 | 732 | replace such parameters by drive letters</a>. |
ohair@632 | 733 | </p> |
ohair@632 | 734 | <p> |
ohair@632 | 735 | In addition to the tools which will be installed |
ohair@632 | 736 | by default, you have |
ohair@632 | 737 | to manually install the |
ohair@632 | 738 | <code>msys-zip</code> and |
ohair@632 | 739 | <code>msys-unzip</code> packages. |
ohair@632 | 740 | This can be easily done with the MinGW command line installer: |
ohair@632 | 741 | <blockquote> |
ohair@632 | 742 | <code>mingw-get.exe install msys-zip</code> |
ohair@632 | 743 | <br> |
ohair@632 | 744 | <code>mingw-get.exe install msys-unzip</code> |
ohair@632 | 745 | </blockquote> |
ohair@632 | 746 | </blockquote> |
ohair@632 | 747 | |
ohair@632 | 748 | </blockquote> |
ohair@632 | 749 | |
ohair@632 | 750 | <h5><a name="vs2010">Visual Studio 2010 Compilers</a></h5> |
ohair@632 | 751 | <blockquote> |
ohair@632 | 752 | <p> |
ohair@632 | 753 | The 32-bit and 64-bit OpenJDK Windows build requires |
ohair@632 | 754 | Microsoft Visual Studio C++ 2010 (VS2010) Professional |
ohair@632 | 755 | Edition or Express compiler. |
ohair@632 | 756 | The compiler and other tools are expected to reside |
ohair@632 | 757 | in the location defined by the variable |
ohair@632 | 758 | <code>VS100COMNTOOLS</code> which |
ohair@632 | 759 | is set by the Microsoft Visual Studio installer. |
ohair@632 | 760 | </p> |
ohair@632 | 761 | <p> |
ohair@632 | 762 | Only the C++ part of VS2010 is needed. |
ohair@632 | 763 | Try to let the installation go to the default |
ohair@632 | 764 | install directory. |
ohair@632 | 765 | Always reboot your system after installing VS2010. |
ohair@632 | 766 | The system environment variable VS100COMNTOOLS |
ohair@632 | 767 | should be |
ohair@632 | 768 | set in your environment. |
ohair@632 | 769 | </p> |
ohair@632 | 770 | <p> |
ohair@632 | 771 | Make sure that TMP and TEMP are also set |
ohair@632 | 772 | in the environment |
ohair@632 | 773 | and refer to Windows paths that exist, |
ohair@632 | 774 | like <code>C:\temp</code>, |
ohair@632 | 775 | not <code>/tmp</code>, not <code>/cygdrive/c/temp</code>, |
ohair@632 | 776 | and not <code>C:/temp</code>. |
ohair@632 | 777 | <code>C:\temp</code> is just an example, |
ohair@632 | 778 | it is assumed that this area is |
ohair@632 | 779 | private to the user, so by default |
ohair@632 | 780 | after installs you should |
ohair@632 | 781 | see a unique user path in these variables. |
ohair@632 | 782 | </p> |
ohair@632 | 783 | </blockquote> |
ohair@632 | 784 | |
ohair@632 | 785 | |
ohair@632 | 786 | </blockquote> <!-- Windows --> |
ohair@632 | 787 | |
ohair@632 | 788 | <h4><a name="macosx">Mac OS X</a></h4> |
ohair@632 | 789 | <blockquote> |
ohair@632 | 790 | Make sure you get the right XCode version. |
ohair@632 | 791 | </blockquote> <!-- Mac OS X --> |
ohair@632 | 792 | |
ohair@41 | 793 | </blockquote> |
ohair@632 | 794 | |
ohair@632 | 795 | <!-- ====================================================== --> |
ohair@632 | 796 | <hr> |
ohair@632 | 797 | <h3><a name="configure">Configure</a></h3> |
ohair@276 | 798 | <blockquote> |
ohair@632 | 799 | The basic invocation of the <code>configure</code> script |
ohair@632 | 800 | looks like: |
ohair@632 | 801 | <blockquote> |
ohair@632 | 802 | <b><code>bash ./configure [<i>options</i>]</code></b> |
ohair@632 | 803 | </blockquote> |
ohair@632 | 804 | This will create an output directory containing the |
ohair@632 | 805 | "configuration" and setup an area for the build result. |
ohair@632 | 806 | This directory typically looks like: |
ohair@632 | 807 | <blockquote> |
ohair@632 | 808 | <b><code>build/linux-x64-normal-server-release</code></b> |
ohair@632 | 809 | </blockquote> |
ohair@632 | 810 | <code>configure</code> will try to figure out what system you are running on |
ohair@632 | 811 | and where all necessary build components are. |
ohair@632 | 812 | If you have all prerequisites for building installed, |
ohair@632 | 813 | it should find everything. |
ohair@632 | 814 | If it fails to detect any component automatically, |
ohair@632 | 815 | it will exit and inform you about the problem. |
ohair@632 | 816 | When this happens, read more below in |
ohair@632 | 817 | <a href="#configureoptions">the <code>configure</code> options</a>. |
ohair@632 | 818 | <p> |
ohair@632 | 819 | Some examples: |
ohair@632 | 820 | </p> |
ohair@632 | 821 | <table border="1"> |
ohair@632 | 822 | <thead> |
ohair@632 | 823 | <tr> |
ohair@632 | 824 | <th>Description</th> |
ohair@632 | 825 | <th>Configure Command Line</th> |
ohair@632 | 826 | </tr> |
ohair@632 | 827 | </thead> |
ohair@632 | 828 | <tbody> |
ohair@632 | 829 | <tr> |
ohair@632 | 830 | <td>Windows 32bit build with freetype specified</td> |
ohair@632 | 831 | <td> |
ohair@632 | 832 | <code>bash ./configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code> |
ohair@632 | 833 | </td> |
ohair@632 | 834 | </tr> |
ohair@632 | 835 | <tr> |
ohair@632 | 836 | <td>Debug 64bit Build</td> |
ohair@632 | 837 | <td> |
ohair@632 | 838 | <code>bash ./configure --enable-debug --with-target-bits=64</code> |
ohair@632 | 839 | </td> |
ohair@632 | 840 | </tr> |
ohair@632 | 841 | </tbody> |
ohair@632 | 842 | </table> |
robilad@132 | 843 | |
ohair@632 | 844 | <!-- ====================================================== --> |
ohair@632 | 845 | <h4><a name="configureoptions">Configure Options</a></h4> |
ohair@632 | 846 | <blockquote> |
ohair@632 | 847 | Complete details on all the OpenJDK <code>configure</code> options can |
ohair@632 | 848 | be seen with: |
ohair@632 | 849 | <blockquote> |
ohair@632 | 850 | <b><code>bash ./configure --help=short</code></b> |
ohair@632 | 851 | </blockquote> |
ohair@632 | 852 | Use <code>-help</code> to see all the <code>configure</code> options |
ohair@632 | 853 | available. |
ohair@632 | 854 | |
ohair@632 | 855 | You can generate any number of different configurations, |
ohair@632 | 856 | e.g. debug, release, 32, 64, etc. |
ohair@632 | 857 | |
ohair@632 | 858 | Some of the more commonly used <code>configure</code> options are: |
ohair@632 | 859 | |
ohair@632 | 860 | <table border="1"> |
ohair@632 | 861 | <thead> |
ohair@632 | 862 | <tr> |
ohair@632 | 863 | <th width="300">OpenJDK Configure Option</th> |
ohair@632 | 864 | <th>Description</th> |
ohair@632 | 865 | </tr> |
ohair@632 | 866 | </thead> |
ohair@632 | 867 | <tbody> |
ohair@632 | 868 | <tr> |
ohair@632 | 869 | <td><b><code>--enable-debug</code></b></td> |
ohair@632 | 870 | <td> |
ohair@632 | 871 | set the debug level to fastdebug (this is a shorthand for |
ohair@632 | 872 | <code>--with-debug-level=fastdebug</code>) |
ohair@632 | 873 | </td> |
ohair@632 | 874 | </tr> |
ohair@632 | 875 | <tr> |
ohair@632 | 876 | <td><b><code>--with-alsa=</code></b><i>path</i></td> |
ohair@632 | 877 | <td> |
ohair@632 | 878 | select the location of the |
ohair@632 | 879 | <a name="alsa">Advanced Linux Sound Architecture (ALSA)</a> |
ohair@632 | 880 | <br> |
ohair@632 | 881 | Version 0.9.1 or newer of the ALSA files are |
ohair@632 | 882 | required for building the OpenJDK on Linux. |
ohair@632 | 883 | These Linux files are usually available from an "alsa" |
ohair@632 | 884 | of "libasound" |
ohair@632 | 885 | development package, |
ohair@632 | 886 | and it's highly recommended that you try and use |
ohair@632 | 887 | the package provided by the particular version of Linux that |
ohair@632 | 888 | you are using. |
ohair@632 | 889 | </td> |
ohair@632 | 890 | </tr> |
ohair@632 | 891 | <tr> |
ohair@632 | 892 | <td><b><code>--with-boot-jdk=</code></b><i>path</i></td> |
ohair@632 | 893 | <td> |
ohair@632 | 894 | select the <a href="#bootjdk">Bootstrap JDK</a> |
ohair@632 | 895 | </td> |
ohair@632 | 896 | </tr> |
ohair@632 | 897 | <tr> |
ohair@632 | 898 | <td><b><code>--with-boot-jdk-jvmargs=</code></b>"<i>args</i>"</td> |
ohair@632 | 899 | <td> |
ohair@632 | 900 | provide the JVM options to be used to run the |
ohair@632 | 901 | <a href="#bootjdk">Bootstrap JDK</a> |
ohair@632 | 902 | </td> |
ohair@632 | 903 | </tr> |
ohair@632 | 904 | <tr> |
ohair@632 | 905 | <td><b><code>--with-cacerts=</code></b><i>path</i></td> |
ohair@632 | 906 | <td> |
ohair@632 | 907 | select the path to the cacerts file. |
ohair@632 | 908 | <br> |
ohair@632 | 909 | See <a href="http://en.wikipedia.org/wiki/Certificate_Authority" target="_blank"> |
ohair@632 | 910 | http://en.wikipedia.org/wiki/Certificate_Authority</a> |
ohair@632 | 911 | for a better understanding of the Certificate Authority (CA). |
ohair@632 | 912 | A certificates file named "cacerts" |
ohair@632 | 913 | represents a system-wide keystore with CA certificates. |
ohair@632 | 914 | In JDK and JRE |
ohair@632 | 915 | binary bundles, the "cacerts" file contains root CA certificates from |
ohair@632 | 916 | several public CAs (e.g., VeriSign, Thawte, and Baltimore). |
ohair@632 | 917 | The source contain a cacerts file |
ohair@632 | 918 | without CA root certificates. |
ohair@632 | 919 | Formal JDK builders will need to secure |
ohair@632 | 920 | permission from each public CA and include the certificates into their |
ohair@632 | 921 | own custom cacerts file. |
ohair@632 | 922 | Failure to provide a populated cacerts file |
ohair@632 | 923 | will result in verification errors of a certificate chain during runtime. |
ohair@632 | 924 | By default an empty cacerts file is provided and that should be |
ohair@632 | 925 | fine for most JDK developers. |
ohair@632 | 926 | </td> |
ohair@632 | 927 | </tr> |
ohair@632 | 928 | <tr> |
ohair@632 | 929 | <td><b><code>--with-cups=</code></b><i>path</i></td> |
ohair@632 | 930 | <td> |
ohair@632 | 931 | select the CUPS install location |
ohair@632 | 932 | <br> |
ohair@632 | 933 | The |
ohair@632 | 934 | <a name="cups">Common UNIX Printing System (CUPS) Headers</a> |
ohair@632 | 935 | are required for building the |
ohair@632 | 936 | OpenJDK on Solaris and Linux. |
ohair@632 | 937 | The Solaris header files can be obtained by installing |
ohair@632 | 938 | the package <strong>SFWcups</strong> from the Solaris Software |
ohair@632 | 939 | Companion CD/DVD, these often will be installed into the |
ohair@632 | 940 | directory <code>/opt/sfw/cups</code>. |
ohair@632 | 941 | <br> |
ohair@632 | 942 | The CUPS header files can always be downloaded from |
ohair@632 | 943 | <a href="http://www.cups.org" target="_blank">www.cups.org</a>. |
ohair@632 | 944 | </td> |
ohair@632 | 945 | </tr> |
ohair@632 | 946 | <tr> |
ohair@632 | 947 | <td><b><code>--with-cups-include=</code></b><i>path</i></td> |
ohair@632 | 948 | <td> |
ohair@632 | 949 | select the CUPS include directory location |
ohair@632 | 950 | </td> |
ohair@632 | 951 | </tr> |
ohair@632 | 952 | <tr> |
ohair@632 | 953 | <td><b><code>--with-debug-level=</code></b><i>level</i></td> |
ohair@632 | 954 | <td> |
ohair@632 | 955 | select the debug information level of release, |
ohair@632 | 956 | fastdebug, or slowdebug |
ohair@632 | 957 | </td> |
ohair@632 | 958 | </tr> |
ohair@632 | 959 | <tr> |
ohair@632 | 960 | <td><b><code>--with-dev-kit=</code></b><i>path</i></td> |
ohair@632 | 961 | <td> |
ohair@632 | 962 | select location of the compiler install or |
ohair@632 | 963 | developer install location |
ohair@632 | 964 | </td> |
ohair@632 | 965 | </tr> |
ohair@632 | 966 | <tr> |
ohair@632 | 967 | <td><b><code>--with-dxsdk=</code></b><i>path</i></td> |
ohair@632 | 968 | <td> |
ohair@632 | 969 | select location of the Windows Direct X SDK install |
ohair@632 | 970 | <br> |
ohair@632 | 971 | The <a name="dxsdk">Microsoft DirectX 9.0 SDK</a> |
ohair@632 | 972 | header files and libraries |
ohair@632 | 973 | from the Summer 2004 edition |
ohair@632 | 974 | are required for building OpenJDK. |
ohair@632 | 975 | This SDK can be downloaded from |
ohair@632 | 976 | <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=FD044A42-9912-42A3-9A9E-D857199F888E&displaylang=en" target="_blank"> |
ohair@632 | 977 | Microsoft DirectX 9.0 SDK (Summer 2004)</a>. |
ohair@632 | 978 | If the link above becomes obsolete, the SDK can be found from |
ohair@632 | 979 | <a href="http://download.microsoft.com" target="_blank">the Microsoft Download Site</a> |
ohair@632 | 980 | (search with "DirectX 9.0 SDK Update Summer 2004"). |
ohair@632 | 981 | Installation usually will set the environment variable |
ohair@632 | 982 | <code>DXSDK_DIR</code> to it's install location. |
ohair@632 | 983 | </td> |
ohair@632 | 984 | </tr> |
ohair@632 | 985 | <tr> |
ohair@632 | 986 | <td><b><code>--with-freetype=</code></b><i>path</i></td> |
ohair@632 | 987 | <td> |
ohair@632 | 988 | select the freetype files to use. |
ohair@632 | 989 | <br> |
ohair@632 | 990 | Expecting the |
ohair@632 | 991 | <a name="freetype">freetype</a> libraries under |
ohair@632 | 992 | <code>lib/</code> and the |
ohair@632 | 993 | headers under <code>include/</code>. |
ohair@632 | 994 | <br> |
ohair@632 | 995 | Version 2.3 or newer of FreeType is required. |
ohair@632 | 996 | On Unix systems required files can be available as part of your |
ohair@632 | 997 | distribution (while you still may need to upgrade them). |
ohair@632 | 998 | Note that you need development version of package that |
ohair@632 | 999 | includes both the FreeType library and header files. |
ohair@632 | 1000 | <br> |
ohair@632 | 1001 | You can always download latest FreeType version from the |
ohair@632 | 1002 | <a href="http://www.freetype.org" target="_blank">FreeType website</a>. |
ohair@632 | 1003 | <br> |
ohair@632 | 1004 | Building the freetype 2 libraries from scratch is also possible, |
ohair@632 | 1005 | however on Windows refer to the |
ohair@632 | 1006 | <a href="http://freetype.freedesktop.org/wiki/FreeType_DLL"> |
ohair@632 | 1007 | Windows FreeType DLL build instructions</a>. |
ohair@632 | 1008 | <br> |
ohair@632 | 1009 | Note that by default FreeType is built with byte code hinting |
ohair@632 | 1010 | support disabled due to licensing restrictions. |
ohair@632 | 1011 | In this case, text appearance and metrics are expected to |
ohair@632 | 1012 | differ from Sun's official JDK build. |
ohair@632 | 1013 | See |
ohair@632 | 1014 | <a href="http://freetype.sourceforge.net/freetype2/index.html"> |
ohair@632 | 1015 | the SourceForge FreeType2 Home Page |
ohair@632 | 1016 | </a> |
ohair@632 | 1017 | for more information. |
ohair@632 | 1018 | </td> |
ohair@632 | 1019 | </tr> |
ohair@632 | 1020 | <tr> |
ohair@632 | 1021 | <td><b><code>--with-import-hotspot=</code></b><i>path</i></td> |
ohair@632 | 1022 | <td> |
ohair@632 | 1023 | select the location to find hotspot |
ohair@632 | 1024 | binaries from a previous build to avoid building |
ohair@632 | 1025 | hotspot |
ohair@632 | 1026 | </td> |
ohair@632 | 1027 | </tr> |
ohair@632 | 1028 | <tr> |
ohair@632 | 1029 | <td><b><code>--with-target-bits=</code></b><i>arg</i></td> |
ohair@632 | 1030 | <td> |
ohair@632 | 1031 | select 32 or 64 bit build |
ohair@632 | 1032 | </td> |
ohair@632 | 1033 | </tr> |
ohair@632 | 1034 | <tr> |
ohair@632 | 1035 | <td><b><code>--with-jvm-variants=</code></b><i>variants</i></td> |
ohair@632 | 1036 | <td> |
ohair@632 | 1037 | select the JVM variants to build from, comma |
ohair@632 | 1038 | separated list that can include: |
ohair@632 | 1039 | server, client, kernel, zero and zeroshark |
ohair@632 | 1040 | </td> |
ohair@632 | 1041 | </tr> |
ohair@632 | 1042 | <tr> |
ohair@632 | 1043 | <td><b><code>--with-memory-size=</code></b><i>size</i></td> |
ohair@632 | 1044 | <td> |
ohair@632 | 1045 | select the RAM size that GNU make will think |
ohair@632 | 1046 | this system has |
ohair@632 | 1047 | </td> |
ohair@632 | 1048 | </tr> |
ohair@632 | 1049 | <tr> |
ohair@632 | 1050 | <td><a name="msvcrNN"><b><code>--with-msvcr-dll=</code></b><i>path</i></a></td> |
ohair@632 | 1051 | <td> |
ohair@632 | 1052 | select the <code>msvcr100.dll</code> |
ohair@632 | 1053 | file to include in the |
ohair@632 | 1054 | Windows builds (C/C++ runtime library for |
ohair@632 | 1055 | Visual Studio). |
ohair@632 | 1056 | <br> |
ohair@632 | 1057 | This is usually picked up automatically |
ohair@632 | 1058 | from the redist |
ohair@632 | 1059 | directories of Visual Studio 2010. |
ohair@632 | 1060 | </td> |
ohair@632 | 1061 | </tr> |
ohair@632 | 1062 | <tr> |
ohair@632 | 1063 | <td><b><code>--with-num-cores=</code></b><i>cores</i></td> |
ohair@632 | 1064 | <td> |
ohair@632 | 1065 | select the number of cores to use (processor |
ohair@632 | 1066 | count or CPU count) |
ohair@632 | 1067 | </td> |
ohair@632 | 1068 | </tr> |
ohair@632 | 1069 | <tr> |
ohair@632 | 1070 | <td><b><code>--with-x=</code></b><i>path</i></td> |
ohair@632 | 1071 | <td> |
ohair@632 | 1072 | select the location of the X11 and xrender files. |
ohair@632 | 1073 | <br> |
ohair@632 | 1074 | The |
ohair@632 | 1075 | <a name="xrender">XRender Extension Headers</a> |
ohair@632 | 1076 | are required for building the |
ohair@632 | 1077 | OpenJDK on Solaris and Linux. |
ohair@632 | 1078 | <br> |
ohair@632 | 1079 | The Linux header files are usually available from a "Xrender" |
ohair@632 | 1080 | development package, it's recommended that you try and use |
ohair@632 | 1081 | the package provided by the particular distribution of Linux that |
ohair@632 | 1082 | you are using. |
ohair@632 | 1083 | <br> |
ohair@632 | 1084 | The Solaris XRender header files is |
ohair@632 | 1085 | included with the other X11 header files |
ohair@632 | 1086 | in the package <strong>SFWxwinc</strong> |
ohair@632 | 1087 | on new enough versions of |
ohair@632 | 1088 | Solaris and will be installed in |
ohair@632 | 1089 | <code>/usr/X11/include/X11/extensions/Xrender.h</code> or |
ohair@632 | 1090 | <code>/usr/openwin/share/include/X11/extensions/Xrender.h</code> |
ohair@632 | 1091 | </td> |
ohair@632 | 1092 | </tr> |
ohair@632 | 1093 | </tbody> |
ohair@632 | 1094 | </table> |
ohair@632 | 1095 | </blockquote> |
ohair@632 | 1096 | |
robilad@132 | 1097 | </blockquote> |
ohair@632 | 1098 | |
ohair@632 | 1099 | <!-- ====================================================== --> |
ohair@632 | 1100 | <hr> |
ohair@632 | 1101 | <h3><a name="make">Make</a></h3> |
ohair@276 | 1102 | <blockquote> |
ohair@632 | 1103 | The basic invocation of the <code>make</code> utility |
ohair@632 | 1104 | looks like: |
ohair@632 | 1105 | <blockquote> |
ohair@632 | 1106 | <b><code>make all</code></b> |
ohair@632 | 1107 | </blockquote> |
ohair@632 | 1108 | This will start the build to the output directory containing the |
ohair@632 | 1109 | "configuration" that was created by the <code>configure</code> |
ohair@632 | 1110 | script. Run <code>make help</code> for more information on |
ohair@632 | 1111 | the available targets. |
ohair@632 | 1112 | <br> |
ohair@632 | 1113 | There are some of the make targets that |
ohair@632 | 1114 | are of general interest: |
ohair@632 | 1115 | <table border="1"> |
ohair@632 | 1116 | <thead> |
ohair@632 | 1117 | <tr> |
ohair@632 | 1118 | <th>Make Target</th> |
ohair@632 | 1119 | <th>Description</th> |
ohair@632 | 1120 | </tr> |
ohair@632 | 1121 | </thead> |
ohair@632 | 1122 | <tbody> |
ohair@632 | 1123 | <tr> |
ohair@632 | 1124 | <td><i>empty</i></td> |
ohair@632 | 1125 | <td>build everything but no images</td> |
ohair@632 | 1126 | </tr> |
ohair@632 | 1127 | <tr> |
ohair@632 | 1128 | <td><b><code>all</code></b></td> |
ohair@632 | 1129 | <td>build everything including images</td> |
ohair@632 | 1130 | </tr> |
ohair@632 | 1131 | <tr> |
ohair@632 | 1132 | <td><b><code>all-conf</code></b></td> |
ohair@632 | 1133 | <td>build all configurations</td> |
ohair@632 | 1134 | </tr> |
ohair@632 | 1135 | <tr> |
ohair@632 | 1136 | <td><b><code>images</code></b></td> |
ohair@632 | 1137 | <td>create complete j2sdk and j2re images</td> |
ohair@632 | 1138 | </tr> |
ohair@632 | 1139 | <tr> |
ohair@632 | 1140 | <td><b><code>install</code></b></td> |
ohair@632 | 1141 | <td>install the generated images locally, |
ohair@632 | 1142 | typically in <code>/usr/local</code></td> |
ohair@632 | 1143 | </tr> |
ohair@632 | 1144 | <tr> |
ohair@632 | 1145 | <td><b><code>clean</code></b></td> |
ohair@632 | 1146 | <td>remove all files generated by make, |
ohair@632 | 1147 | but not those generated by <code>configure</code></td> |
ohair@632 | 1148 | </tr> |
ohair@632 | 1149 | <tr> |
ohair@632 | 1150 | <td><b><code>dist-clean</code></b></td> |
ohair@632 | 1151 | <td>remove all files generated by both |
ohair@632 | 1152 | and <code>configure</code> (basically killing the configuration)</td> |
ohair@632 | 1153 | </tr> |
ohair@632 | 1154 | <tr> |
ohair@632 | 1155 | <td><b><code>help</code></b></td> |
ohair@632 | 1156 | <td>give some help on using <code>make</code>, |
ohair@632 | 1157 | including some interesting make targets</td> |
ohair@632 | 1158 | </tr> |
ohair@632 | 1159 | </tbody> |
ohair@632 | 1160 | </table> |
ohair@276 | 1161 | </blockquote> |
ohair@13 | 1162 | </blockquote> |
ohair@632 | 1163 | |
ohair@632 | 1164 | <!-- ====================================================== --> |
ohair@632 | 1165 | <hr> |
ohair@632 | 1166 | <h2><a name="testing">Testing</a></h2> |
ohair@13 | 1167 | <blockquote> |
ohair@632 | 1168 | When the build is completed, you should see the generated |
ohair@632 | 1169 | binaries and associated files in the <code>j2sdk-image</code> |
ohair@632 | 1170 | directory in the output directory. |
ohair@632 | 1171 | In particular, the |
ohair@632 | 1172 | <code>build/<i>*</i>/images/j2sdk-image/bin</code> |
ohair@632 | 1173 | directory should contain executables for the |
ohair@632 | 1174 | OpenJDK tools and utilities for that configuration. |
ohair@632 | 1175 | The testing tool <code>jtreg</code> will be needed |
ohair@632 | 1176 | and can be found at: |
ohair@632 | 1177 | <a href="http://openjdk.java.net/jtreg/" target="_blank"> |
ohair@632 | 1178 | the jtreg site</a>. |
ohair@632 | 1179 | The provided regression tests in the repositories |
ohair@632 | 1180 | can be run with the command: |
ohair@41 | 1181 | <blockquote> |
ohair@632 | 1182 | <code><b>cd test && make PRODUCT_HOME=`pwd`/../build/*/images/j2sdk-image all</b></code> |
ohair@276 | 1183 | </blockquote> |
robilad@132 | 1184 | </blockquote> |
ohair@632 | 1185 | |
robilad@132 | 1186 | <!-- ====================================================== --> |
ohair@632 | 1187 | <!-- ====================================================== --> |
ohair@632 | 1188 | <!-- ====================================================== --> |
ohair@632 | 1189 | <!-- ====================================================== --> |
ohair@632 | 1190 | <!-- ====================================================== --> |
ohair@632 | 1191 | <!-- ====================================================== --> |
ohair@632 | 1192 | <!-- ====================================================== --> |
ohair@632 | 1193 | <!-- ====================================================== --> |
ohair@632 | 1194 | <!-- ====================================================== --> |
ohair@632 | 1195 | |
ohair@632 | 1196 | <!-- ====================================================== --> |
ohair@632 | 1197 | <hr> |
ohair@632 | 1198 | <h2><a name="hints">Appendix A: Hints and Tips</a></h2> |
robilad@132 | 1199 | <blockquote> |
ohair@632 | 1200 | |
ohair@632 | 1201 | <h3><a name="faq">FAQ</a></h3> |
ohair@276 | 1202 | <blockquote> |
ohair@320 | 1203 | |
ohair@320 | 1204 | <p> |
ohair@632 | 1205 | <b>Q:</b> The <code>configure</code> file looks horrible! |
ohair@632 | 1206 | How are you going to edit it? |
ohair@320 | 1207 | <br> |
ohair@632 | 1208 | <b>A:</b> The <code>configure</code> file is generated (think |
ohair@632 | 1209 | "compiled") by the autoconf tools. The source code is |
ohair@632 | 1210 | in <code>configure.ac</code> various .m4 files in common/autoconf, |
ohair@632 | 1211 | which are |
ohair@632 | 1212 | much more readable. |
ohair@320 | 1213 | </p> |
ohair@320 | 1214 | |
ohair@632 | 1215 | <p> |
ohair@632 | 1216 | <b>Q:</b> |
ohair@632 | 1217 | Why is the <code>configure</code> file checked in, |
ohair@632 | 1218 | if it is generated? |
ohair@632 | 1219 | <br> |
ohair@632 | 1220 | <b>A:</b> |
ohair@632 | 1221 | If it was not generated, every user would need to have the autoconf |
ohair@632 | 1222 | tools installed, and re-generate the <code>configure</code> file |
ohair@632 | 1223 | as the first step. |
ohair@632 | 1224 | Our goal is to minimize the work needed to be done by the user |
ohair@632 | 1225 | to start building OpenJDK, and to minimize |
ohair@632 | 1226 | the number of external dependencies required. |
ohair@632 | 1227 | </p> |
ohair@632 | 1228 | |
ohair@632 | 1229 | <p> |
ohair@632 | 1230 | <b>Q:</b> |
ohair@632 | 1231 | Do you require a specific version of autoconf for regenerating |
ohair@632 | 1232 | <code>configure</code>? |
ohair@632 | 1233 | <br> |
ohair@632 | 1234 | <b>A:</b> |
ohair@632 | 1235 | Currently, no, but this will likely be the case when things have |
ohair@632 | 1236 | settled down a bit more. (The reason for this is to avoid |
ohair@632 | 1237 | large spurious changes in <code>configure</code> |
ohair@632 | 1238 | in commits that made small changes to <code>configure.ac</code>). |
ohair@632 | 1239 | </p> |
ohair@632 | 1240 | |
ohair@632 | 1241 | <p> |
ohair@632 | 1242 | <b>Q:</b> |
ohair@632 | 1243 | What are the files in <code>common/makefiles/support/*</code> for? |
ohair@632 | 1244 | They look like gibberish. |
ohair@632 | 1245 | <br> |
ohair@632 | 1246 | <b>A:</b> |
ohair@632 | 1247 | They are a somewhat ugly hack to compensate for command line length |
ohair@632 | 1248 | limitations on certain platforms (Windows, Solaris). |
ohair@632 | 1249 | Due to a combination of limitations in make and the shell, |
ohair@632 | 1250 | command lines containing too many files will not work properly. |
ohair@632 | 1251 | These |
ohair@632 | 1252 | helper files are part of an elaborate hack that will compress the |
ohair@632 | 1253 | command line in the makefile and then uncompress it safely. |
ohair@632 | 1254 | We're |
ohair@632 | 1255 | not proud of it, but it does fix the problem. |
ohair@632 | 1256 | If you have any better suggestions, we're all ears! :-) |
ohair@632 | 1257 | </p> |
ohair@632 | 1258 | |
ohair@632 | 1259 | <p> |
ohair@632 | 1260 | <b>Q:</b> |
ohair@632 | 1261 | I want to see the output of the commands that make runs, |
ohair@632 | 1262 | like in the old build. How do I do that? |
ohair@632 | 1263 | <br> |
ohair@632 | 1264 | <b>A:</b> |
ohair@632 | 1265 | You specify the <code>LOG</code> variable to make. There are |
ohair@632 | 1266 | several log levels: |
ohair@632 | 1267 | </p> |
ohair@320 | 1268 | <blockquote> |
ohair@632 | 1269 | <ul> |
ohair@320 | 1270 | <li> |
ohair@632 | 1271 | <b><code>warn</code></b> — Default and very quiet. |
ohair@320 | 1272 | </li> |
ohair@320 | 1273 | <li> |
ohair@632 | 1274 | <b><code>info</code></b> — Shows more progress information |
ohair@632 | 1275 | than warn. |
ohair@320 | 1276 | </li> |
ohair@320 | 1277 | <li> |
ohair@632 | 1278 | <b><code>debug</code></b> — Echos all command lines and |
ohair@632 | 1279 | prints all macro calls for compilation definitions. |
ohair@320 | 1280 | </li> |
ohair@320 | 1281 | <li> |
ohair@632 | 1282 | <b><code>trace</code></b> — Echos all $(shell) command |
ohair@632 | 1283 | lines as well. |
ohair@320 | 1284 | </li> |
ohair@632 | 1285 | </ul> |
ohair@320 | 1286 | </blockquote> |
ohair@320 | 1287 | |
ohair@632 | 1288 | <p> |
ohair@632 | 1289 | <b>Q:</b> |
ohair@632 | 1290 | When do I have to re-run <code>configure</code>? |
ohair@632 | 1291 | <br> |
ohair@632 | 1292 | <b>A:</b> |
ohair@632 | 1293 | Normally you will run <code>configure</code> only once for creating a |
ohair@632 | 1294 | configuration. |
ohair@632 | 1295 | You need to re-run configuration only if you want to change any |
ohair@632 | 1296 | configuration options, |
ohair@632 | 1297 | or if you pull down changes to the <code>configure</code> script. |
ohair@632 | 1298 | </p> |
ohair@632 | 1299 | |
ohair@632 | 1300 | <p> |
ohair@632 | 1301 | <b>Q:</b> |
ohair@632 | 1302 | I have added a new source file. Do I need to modify the makefiles? |
ohair@632 | 1303 | <br> |
ohair@632 | 1304 | <b>A:</b> |
ohair@632 | 1305 | Normally, no. If you want to create e.g. a new native |
ohair@632 | 1306 | library, |
ohair@632 | 1307 | you will need to modify the makefiles. But for normal file |
ohair@632 | 1308 | additions or removals, no changes are needed. There are certan |
ohair@632 | 1309 | exceptions for some native libraries where the source files are spread |
ohair@632 | 1310 | over many directories which also contain courses for other |
ohair@632 | 1311 | libraries. In these cases it was simply easier to create include lists |
ohair@632 | 1312 | rather thane excludes. |
ohair@632 | 1313 | </p> |
ohair@632 | 1314 | |
ohair@632 | 1315 | <p> |
ohair@632 | 1316 | <b>Q:</b> |
ohair@632 | 1317 | When I run <code>configure --help</code>, I see many strange options, |
ohair@632 | 1318 | like <code>--dvidir</code>. What is this? |
ohair@632 | 1319 | <br> |
ohair@632 | 1320 | <b>A:</b> |
ohair@632 | 1321 | Configure provides a slew of options by default, to all projects |
ohair@632 | 1322 | that use autoconf. Most of them are not used in OpenJDK, |
ohair@632 | 1323 | so you can safely ignore them. To list only OpenJDK specific features, |
ohair@632 | 1324 | use <code>configure --help=short</code> instead. |
ohair@632 | 1325 | </p> |
ohair@632 | 1326 | |
ohair@632 | 1327 | <p> |
ohair@632 | 1328 | <b>Q:</b> |
ohair@632 | 1329 | <code>configure</code> provides OpenJDK-specific features such as |
ohair@632 | 1330 | <code>--enable-jigsaw</code> or <code>--with-builddeps-server</code> |
ohair@632 | 1331 | that are not described in this document. What about those? |
ohair@632 | 1332 | <br> |
ohair@632 | 1333 | <b>A:</b> |
ohair@632 | 1334 | Try them out if you like! But be aware that most of these are |
ohair@632 | 1335 | experimental features. |
ohair@632 | 1336 | Many of them don't do anything at all at the moment; the option |
ohair@632 | 1337 | is just a placeholder. Other depends on |
ohair@632 | 1338 | pieces of code or infrastructure that is currently |
ohair@632 | 1339 | not ready for prime time. |
ohair@632 | 1340 | </p> |
ohair@632 | 1341 | |
ohair@632 | 1342 | <p> |
ohair@632 | 1343 | <b>Q:</b> |
ohair@632 | 1344 | How will you make sure you don't break anything? |
ohair@632 | 1345 | <br> |
ohair@632 | 1346 | <b>A:</b> |
ohair@632 | 1347 | We have a script that compares the result of the new build system |
ohair@632 | 1348 | with the result of the old. For most part, we aim for (and achieve) |
ohair@632 | 1349 | byte-by-byte identical output. There are however technical issues |
ohair@632 | 1350 | with e.g. native binaries, which might differ in a byte-by-byte |
ohair@632 | 1351 | comparison, even |
ohair@632 | 1352 | when building twice with the old build system. |
ohair@632 | 1353 | For these, we compare relevant aspects |
ohair@632 | 1354 | (e.g. the symbol table and file size). |
ohair@632 | 1355 | Note that we still don't have 100% |
ohair@632 | 1356 | equivalence, but we're close. |
ohair@632 | 1357 | </p> |
ohair@632 | 1358 | |
ohair@632 | 1359 | <p> |
ohair@632 | 1360 | <b>Q:</b> |
ohair@632 | 1361 | I noticed this thing X in the build that looks very broken by design. |
ohair@632 | 1362 | Why don't you fix it? |
ohair@632 | 1363 | <br> |
ohair@632 | 1364 | <b>A:</b> |
ohair@632 | 1365 | Our goal is to produce a build output that is as close as |
ohair@632 | 1366 | technically possible to the old build output. |
ohair@632 | 1367 | If things were weird in the old build, |
ohair@632 | 1368 | they will be weird in the new build. |
ohair@632 | 1369 | Often, things were weird before due to obscurity, |
ohair@632 | 1370 | but in the new build system the weird stuff comes up to the surface. |
ohair@632 | 1371 | The plan is to attack these things at a later stage, |
ohair@632 | 1372 | after the new build system is established. |
ohair@632 | 1373 | </p> |
ohair@632 | 1374 | |
ohair@632 | 1375 | <p> |
ohair@632 | 1376 | <b>Q:</b> |
ohair@632 | 1377 | The code in the new build system is not that well-structured. |
ohair@632 | 1378 | Will you fix this? |
ohair@632 | 1379 | <br> |
ohair@632 | 1380 | <b>A:</b> |
ohair@632 | 1381 | Yes! The new build system has grown bit by bit as we converted |
ohair@632 | 1382 | the old system. When all of the old build system is converted, |
ohair@632 | 1383 | we can take a step back and clean up the structure of the new build |
ohair@632 | 1384 | system. Some of this we plan to do before replacing the old build |
ohair@632 | 1385 | system and some will need to wait until after. |
ohair@632 | 1386 | </p> |
ohair@632 | 1387 | |
ohair@632 | 1388 | <p> |
ohair@632 | 1389 | <b>Q:</b> What is @GenerateNativeHeaders? |
ohair@632 | 1390 | <br> |
ohair@632 | 1391 | <b>A:</b> |
ohair@632 | 1392 | To speed up compilation, we added a flag to javac which makes it |
ohair@632 | 1393 | do the job of javah as well, as a by-product; that is, generating |
ohair@632 | 1394 | native .h header files. These files are only generated |
ohair@632 | 1395 | if a class contains native methods. However, sometimes |
ohair@632 | 1396 | a class contains no native method, |
ohair@632 | 1397 | but still contains constants that native code needs to use. |
ohair@632 | 1398 | The new GenerateNativeHeaders annotation tells javac to |
ohair@632 | 1399 | force generation of a |
ohair@632 | 1400 | header file in these cases. (We don't want to generate |
ohair@632 | 1401 | native headers for all classes that contains constants |
ohair@632 | 1402 | but no native methods, since |
ohair@632 | 1403 | that would slow down the compilation process needlessly.) |
ohair@632 | 1404 | </p> |
ohair@632 | 1405 | |
ohair@632 | 1406 | <p> |
ohair@632 | 1407 | <b>Q:</b> |
ohair@632 | 1408 | Is anything able to use the results of the new build's default make target? |
ohair@632 | 1409 | <br> |
ohair@632 | 1410 | <b>A:</b> |
ohair@632 | 1411 | Yes, this is the minimal (or roughly minimal) |
ohair@632 | 1412 | set of compiled output needed for a developer to actually |
ohair@632 | 1413 | execute the newly built JDK. The idea is that in an incremental |
ohair@632 | 1414 | development fashion, when doing a normal make, |
ohair@632 | 1415 | you should only spend time recompiling what's changed |
ohair@632 | 1416 | (making it purely incremental) and only do the work that's |
ohair@632 | 1417 | needed to actually run and test your code. |
ohair@632 | 1418 | The packaging stuff that is part of the <code>images</code> |
ohair@632 | 1419 | target is not needed for a normal developer who wants to |
ohair@632 | 1420 | test his new code. Even if it's quite fast, it's still unnecessary. |
ohair@632 | 1421 | We're targeting sub-second incremental rebuilds! ;-) |
ohair@632 | 1422 | (Or, well, at least single-digit seconds...) |
ohair@632 | 1423 | </p> |
ohair@632 | 1424 | |
ohair@632 | 1425 | <p> |
ohair@632 | 1426 | <b>Q:</b> |
ohair@632 | 1427 | I usually set a specific environment variable when building, |
ohair@632 | 1428 | but I can't find the equivalent in the new build. |
ohair@632 | 1429 | What should I do? |
ohair@632 | 1430 | <br> |
ohair@632 | 1431 | <b>A:</b> |
ohair@632 | 1432 | It might very well be that we have missed to add support for |
ohair@632 | 1433 | an option that was actually used from outside the build system. |
ohair@632 | 1434 | Email us and we will |
ohair@632 | 1435 | add support for it! |
ohair@632 | 1436 | </p> |
ohair@632 | 1437 | |
ohair@632 | 1438 | </blockquote> |
ohair@632 | 1439 | |
ohair@632 | 1440 | <h3><a name="performance">Build Performance Tips</a></h3> |
ohair@632 | 1441 | <blockquote> |
ohair@632 | 1442 | |
ohair@632 | 1443 | <p>Building OpenJDK requires a lot of horsepower. |
ohair@632 | 1444 | Some of the build tools can be adjusted to utilize more or less |
ohair@632 | 1445 | of resources such as |
ohair@632 | 1446 | parallel threads and memory. |
ohair@632 | 1447 | The <code>configure</code> script analyzes your system and selects reasonable |
ohair@632 | 1448 | values for such options based on your hardware. |
ohair@632 | 1449 | If you encounter resource problems, such as out of memory conditions, |
ohair@632 | 1450 | you can modify the detected values with:</p> |
ohair@632 | 1451 | |
ohair@632 | 1452 | <ul> |
ohair@632 | 1453 | <li> |
ohair@632 | 1454 | <b><code>--with-num-cores</code></b> |
ohair@632 | 1455 | — |
ohair@632 | 1456 | number of cores in the build system, |
ohair@632 | 1457 | e.g. <code>--with-num-cores=8</code> |
ohair@632 | 1458 | </li> |
ohair@632 | 1459 | <li> |
ohair@632 | 1460 | <b><code>--with-memory-size</code></b> |
ohair@632 | 1461 | — memory (in MB) available in the build system, |
ohair@632 | 1462 | e.g. <code>--with-memory-size=1024</code> |
ohair@632 | 1463 | </li> |
ohair@632 | 1464 | </ul> |
ohair@632 | 1465 | |
ohair@632 | 1466 | <p>It might also be necessary to specify the JVM arguments passed |
ohair@632 | 1467 | to the Bootstrap JDK, using e.g. |
ohair@632 | 1468 | <code>--with-boot-jdk-jvmargs="-Xmx8G -enableassertions"</code>. |
ohair@632 | 1469 | Doing this will override the default JVM arguments |
ohair@632 | 1470 | passed to the Bootstrap JDK.</p> |
ohair@632 | 1471 | |
ohair@632 | 1472 | |
ohair@632 | 1473 | <p>One of the top goals of the new build system is to improve the |
ohair@632 | 1474 | build performance and decrease the time needed to build. This will |
ohair@632 | 1475 | soon also apply to the java compilation when the Smart Javac wrapper |
ohair@632 | 1476 | is making its way into jdk8. It can be tried in the build-infra |
ohair@632 | 1477 | repository already. You are likely to find that the new build system |
ohair@632 | 1478 | is faster than the old one even without this feature.</p> |
ohair@632 | 1479 | |
ohair@632 | 1480 | <p>At the end of a successful execution of <code>configure</code>, |
ohair@632 | 1481 | you will get a performance summary, |
ohair@632 | 1482 | indicating how well the build will perform. Here you will |
ohair@632 | 1483 | also get performance hints. |
ohair@632 | 1484 | If you want to build fast, pay attention to those!</p> |
ohair@632 | 1485 | |
ohair@632 | 1486 | <h4>Building with ccache</h4> |
ohair@632 | 1487 | |
ohair@632 | 1488 | <p>A simple way to radically speed up compilation of native code |
ohair@632 | 1489 | (typically hotspot and native libraries in JDK) is to install |
ohair@632 | 1490 | ccache. This will cache and reuse prior compilation results, if the |
ohair@632 | 1491 | source code is unchanged. However, ccache versions prior to 3.1.4 |
ohair@632 | 1492 | does not work correctly with the precompiled headers used in |
ohair@632 | 1493 | OpenJDK. So if your platform supports ccache at 3.1.4 or later, we |
ohair@632 | 1494 | highly recommend installing it. This is currently only supported on |
ohair@632 | 1495 | linux.</p> |
ohair@632 | 1496 | |
ohair@632 | 1497 | <h4>Building on local disk</h4> |
ohair@632 | 1498 | |
ohair@632 | 1499 | <p>If you are using network shares, e.g. via NFS, for your source code, |
ohair@632 | 1500 | make sure the build directory is situated on local disk. |
ohair@632 | 1501 | The performance |
ohair@632 | 1502 | penalty is extremely high for building on a network share, |
ohair@632 | 1503 | close to unusable.</p> |
ohair@632 | 1504 | |
ohair@632 | 1505 | <h4>Building only one JVM</h4> |
ohair@632 | 1506 | |
ohair@632 | 1507 | <p>The old build builds multiple JVMs on 32-bit systems (client and |
ohair@632 | 1508 | server; and on Windows kernel as well). In the new build we have |
ohair@632 | 1509 | changed this default to only build server when it's available. This |
ohair@632 | 1510 | improves build times for those not interested in multiple JVMs. To |
ohair@632 | 1511 | mimic the old behavior on platforms that support it, |
ohair@632 | 1512 | use <code>--with-jvm-variants=client,server</code>.</p> |
ohair@632 | 1513 | |
ohair@632 | 1514 | <h4>Selecting the number of cores to build on</h4> |
ohair@632 | 1515 | |
ohair@632 | 1516 | <p>By default, <code>configure</code> will analyze your machine and run the make |
ohair@632 | 1517 | process in parallel with as many threads as you have cores. This |
ohair@632 | 1518 | behavior can be overridden, either "permanently" (on a <code>configure</code> |
ohair@632 | 1519 | basis) using <code>--with-num-cores=N</code> or for a single build |
ohair@632 | 1520 | only (on a make basis), using <code>make JOBS=N</code>.</p> |
ohair@632 | 1521 | |
ohair@632 | 1522 | <p>If you want to make a slower build just this time, to save some CPU |
ohair@632 | 1523 | power for other processes, you can run |
ohair@632 | 1524 | e.g. <code>make JOBS=2</code>. This will force the makefiles |
ohair@632 | 1525 | to only run 2 parallel processes, or even <code>make JOBS=1</code> |
ohair@632 | 1526 | which will disable parallelism.</p> |
ohair@632 | 1527 | |
ohair@632 | 1528 | <p>If you want to have it the other way round, namely having slow |
ohair@632 | 1529 | builds default and override with fast if you're |
ohair@632 | 1530 | impatient, you should call <code>configure</code> with |
ohair@632 | 1531 | <code>--with-num-cores=2</code>, making 2 the default. |
ohair@632 | 1532 | If you want to run with more |
ohair@632 | 1533 | cores, run <code>make JOBS=8</code></p> |
ohair@632 | 1534 | |
ohair@632 | 1535 | </blockquote> |
ohair@632 | 1536 | |
ohair@632 | 1537 | <h3><a name="troubleshooting">Troubleshooting</a></h3> |
ohair@632 | 1538 | <blockquote> |
ohair@632 | 1539 | |
ohair@632 | 1540 | <h4>Solving build problems</h4> |
ohair@632 | 1541 | |
ohair@320 | 1542 | <blockquote> |
ohair@632 | 1543 | If the build fails (and it's not due to a compilation error in |
ohair@632 | 1544 | a source file you've changed), the first thing you should do |
ohair@632 | 1545 | is to re-run the build with more verbosity. |
ohair@632 | 1546 | Do this by adding <code>LOG=debug</code> to your make command line. |
ohair@632 | 1547 | <br> |
ohair@632 | 1548 | The build log (with both stdout and stderr intermingled, |
ohair@632 | 1549 | basically the same as you see on your console) can be found as |
ohair@632 | 1550 | <code>build.log</code> in your build directory. |
ohair@632 | 1551 | <br> |
ohair@632 | 1552 | You can ask for help on build problems with the new build system |
ohair@632 | 1553 | on either the |
ohair@632 | 1554 | <a href="http://mail.openjdk.java.net/mailman/listinfo/build-dev"> |
ohair@632 | 1555 | build-dev</a> |
ohair@632 | 1556 | or the |
ohair@632 | 1557 | <a href="http://mail.openjdk.java.net/mailman/listinfo/build-infra-dev"> |
ohair@632 | 1558 | build-infra-dev</a> |
ohair@632 | 1559 | mailing lists. Please include the relevant parts |
ohair@632 | 1560 | of the build log. |
ohair@632 | 1561 | <br> |
ohair@632 | 1562 | A build can fail for any number of reasons. |
ohair@632 | 1563 | Most failures |
ohair@632 | 1564 | are a result of trying to build in an environment in which all the |
ohair@632 | 1565 | pre-build requirements have not been met. |
ohair@632 | 1566 | The first step in |
ohair@632 | 1567 | troubleshooting a build failure is to recheck that you have satisfied |
ohair@632 | 1568 | all the pre-build requirements for your platform. |
ohair@632 | 1569 | Scanning the <code>configure</code> log is a good first step, making |
ohair@632 | 1570 | sure that what it found makes sense for your system. |
ohair@632 | 1571 | Look for strange error messages or any difficulties that |
ohair@632 | 1572 | <code>configure</code> had in finding things. |
ohair@632 | 1573 | <br> |
ohair@632 | 1574 | Some of the more common problems with builds are briefly |
ohair@632 | 1575 | described |
ohair@632 | 1576 | below, with suggestions for remedies. |
ohair@632 | 1577 | <ul> |
ohair@632 | 1578 | <li> |
ohair@632 | 1579 | <b>Corrupted Bundles on Windows:</b> |
ohair@632 | 1580 | <blockquote> |
ohair@632 | 1581 | Some virus scanning software has been known to |
ohair@632 | 1582 | corrupt the |
ohair@632 | 1583 | downloading of zip bundles. |
ohair@632 | 1584 | It may be necessary to disable the 'on access' or |
ohair@632 | 1585 | 'real time' |
ohair@632 | 1586 | virus scanning features to prevent this corruption. |
ohair@632 | 1587 | This type of "real time" virus scanning can also |
ohair@632 | 1588 | slow down the |
ohair@632 | 1589 | build process significantly. |
ohair@632 | 1590 | Temporarily disabling the feature, or excluding the build |
ohair@632 | 1591 | output directory may be necessary to get correct and |
ohair@632 | 1592 | faster builds. |
ohair@632 | 1593 | </blockquote> |
ohair@632 | 1594 | </li> |
ohair@632 | 1595 | <li> |
ohair@632 | 1596 | <b>Slow Builds:</b> |
ohair@632 | 1597 | <blockquote> |
ohair@632 | 1598 | If your build machine seems to be overloaded from too many |
ohair@632 | 1599 | simultaneous C++ compiles, try setting the |
ohair@632 | 1600 | <code>JOBS=1</code> on the <code>make</code> command line. |
ohair@632 | 1601 | Then try increasing the count slowly to an acceptable |
ohair@632 | 1602 | level for your system. Also: |
ohair@632 | 1603 | <blockquote> |
ohair@632 | 1604 | Creating the javadocs can be very slow, |
ohair@632 | 1605 | if you are running |
ohair@632 | 1606 | javadoc, consider skipping that step. |
ohair@632 | 1607 | <br> |
ohair@632 | 1608 | Faster CPUs, more RAM, and a faster DISK usually helps. |
ohair@632 | 1609 | The VM build tends to be CPU intensive |
ohair@632 | 1610 | (many C++ compiles), |
ohair@632 | 1611 | and the rest of the JDK will often be disk intensive. |
ohair@632 | 1612 | <br> |
ohair@632 | 1613 | Faster compiles are possible using a tool called |
ohair@632 | 1614 | <a href="http://ccache.samba.org/" target="_blank">ccache</a>. |
ohair@632 | 1615 | </blockquote> |
ohair@632 | 1616 | </blockquote> |
ohair@632 | 1617 | </li> |
ohair@632 | 1618 | <li> |
ohair@632 | 1619 | <b>File time issues:</b> |
ohair@632 | 1620 | <blockquote> |
ohair@632 | 1621 | If you see warnings that refer to file time stamps, e.g. |
ohair@632 | 1622 | <blockquote> |
ohair@632 | 1623 | <i>Warning message:</i><code> |
ohair@632 | 1624 | File `xxx' has modification time in |
ohair@632 | 1625 | the future.</code> |
ohair@632 | 1626 | <br> |
ohair@632 | 1627 | <i>Warning message:</i> <code> Clock skew detected. |
ohair@632 | 1628 | Your build may |
ohair@632 | 1629 | be incomplete.</code> |
ohair@632 | 1630 | </blockquote> |
ohair@632 | 1631 | These warnings can occur when the clock on the build |
ohair@632 | 1632 | machine is out of |
ohair@632 | 1633 | sync with the timestamps on the source files. |
ohair@632 | 1634 | Other errors, apparently |
ohair@632 | 1635 | unrelated but in fact caused by the clock skew, |
ohair@632 | 1636 | can occur along with |
ohair@632 | 1637 | the clock skew warnings. |
ohair@632 | 1638 | These secondary errors may tend to obscure the |
ohair@632 | 1639 | fact that the true root cause of the problem |
ohair@632 | 1640 | is an out-of-sync clock. |
ohair@632 | 1641 | <p> |
ohair@632 | 1642 | If you see these warnings, reset the clock on the |
ohair@632 | 1643 | build |
ohair@632 | 1644 | machine, run "<code><i>gmake</i> clobber</code>" |
ohair@632 | 1645 | or delete the directory |
ohair@632 | 1646 | containing the build output, and restart the |
ohair@632 | 1647 | build from the beginning. |
ohair@632 | 1648 | </blockquote> |
ohair@632 | 1649 | </li> |
ohair@632 | 1650 | <li> |
ohair@632 | 1651 | <b>Error message: |
ohair@632 | 1652 | <code>Trouble writing out table to disk</code></b> |
ohair@632 | 1653 | <blockquote> |
ohair@632 | 1654 | Increase the amount of swap space on your build machine. |
ohair@632 | 1655 | This could be caused by overloading the system and |
ohair@632 | 1656 | it may be necessary to use: |
ohair@632 | 1657 | <blockquote> |
ohair@632 | 1658 | <code>make JOBS=1</code> |
ohair@632 | 1659 | </blockquote> |
ohair@632 | 1660 | to reduce the load on the system. |
ohair@632 | 1661 | </blockquote> |
ohair@632 | 1662 | </li> |
ohair@632 | 1663 | <li> |
ohair@632 | 1664 | <b>Error Message: |
ohair@632 | 1665 | <code>libstdc++ not found:</code></b> |
ohair@632 | 1666 | <blockquote> |
ohair@632 | 1667 | This is caused by a missing libstdc++.a library. |
ohair@632 | 1668 | This is installed as part of a specific package |
ohair@632 | 1669 | (e.g. libstdc++.so.devel.386). |
ohair@632 | 1670 | By default some 64-bit Linux versions (e.g. Fedora) |
ohair@632 | 1671 | only install the 64-bit version of the libstdc++ package. |
ohair@632 | 1672 | Various parts of the JDK build require a static |
ohair@632 | 1673 | link of the C++ runtime libraries to allow for maximum |
ohair@632 | 1674 | portability of the built images. |
ohair@632 | 1675 | </blockquote> |
ohair@632 | 1676 | </li> |
ohair@632 | 1677 | <li> |
ohair@632 | 1678 | <b>Linux Error Message: |
ohair@632 | 1679 | <code>cannot restore segment prot after reloc</code></b> |
ohair@632 | 1680 | <blockquote> |
ohair@632 | 1681 | This is probably an issue with SELinux (See |
ohair@632 | 1682 | <a href="http://en.wikipedia.org/wiki/SELinux" target="_blank"> |
ohair@632 | 1683 | http://en.wikipedia.org/wiki/SELinux</a>). |
ohair@632 | 1684 | Parts of the VM is built without the <code>-fPIC</code> for |
ohair@632 | 1685 | performance reasons. |
ohair@632 | 1686 | <p> |
ohair@632 | 1687 | To completely disable SELinux: |
ohair@632 | 1688 | <ol> |
ohair@632 | 1689 | <li><code>$ su root</code></li> |
ohair@632 | 1690 | <li><code># system-config-securitylevel</code></li> |
ohair@632 | 1691 | <li><code>In the window that appears, select the SELinux tab</code></li> |
ohair@632 | 1692 | <li><code>Disable SELinux</code></li> |
ohair@632 | 1693 | </ol> |
ohair@632 | 1694 | <p> |
ohair@632 | 1695 | Alternatively, instead of completely disabling it you could |
ohair@632 | 1696 | disable just this one check. |
ohair@632 | 1697 | <ol> |
ohair@632 | 1698 | <li>Select System->Administration->SELinux Management</li> |
ohair@632 | 1699 | <li>In the SELinux Management Tool which appears, |
ohair@632 | 1700 | select "Boolean" from the menu on the left</li> |
ohair@632 | 1701 | <li>Expand the "Memory Protection" group</li> |
ohair@632 | 1702 | <li>Check the first item, labeled |
ohair@632 | 1703 | "Allow all unconfined executables to use |
ohair@632 | 1704 | libraries requiring text relocation ..."</li> |
ohair@632 | 1705 | </ol> |
ohair@632 | 1706 | </blockquote> |
ohair@632 | 1707 | </li> |
ohair@632 | 1708 | <li> |
ohair@632 | 1709 | <b>Windows Error Messages:</b> |
ohair@632 | 1710 | <br> |
ohair@632 | 1711 | <code>*** fatal error - couldn't allocate heap, ... </code> |
ohair@632 | 1712 | <br> |
ohair@632 | 1713 | <code>rm fails with "Directory not empty"</code> |
ohair@632 | 1714 | <br> |
ohair@632 | 1715 | <code>unzip fails with "cannot create ... Permission denied"</code> |
ohair@632 | 1716 | <br> |
ohair@632 | 1717 | <code>unzip fails with "cannot create ... Error 50"</code> |
ohair@632 | 1718 | <br> |
ohair@632 | 1719 | <blockquote> |
ohair@632 | 1720 | The CYGWIN software can conflict with other non-CYGWIN |
ohair@632 | 1721 | software. See the CYGWIN FAQ section on |
ohair@632 | 1722 | <a href="http://cygwin.com/faq/faq.using.html#faq.using.bloda" target="_blank"> |
ohair@632 | 1723 | BLODA (applications that interfere with CYGWIN)</a>. |
ohair@632 | 1724 | </blockquote> |
ohair@632 | 1725 | </li> |
ohair@632 | 1726 | <li> |
ohair@632 | 1727 | <b>Windows Error Message: <code>spawn failed</code></b> |
ohair@632 | 1728 | <blockquote> |
ohair@632 | 1729 | Try rebooting the system, or there could be some kind of |
ohair@632 | 1730 | issue with the disk or disk partition being used. |
ohair@632 | 1731 | Sometimes it comes with a "Permission Denied" message. |
ohair@632 | 1732 | </blockquote> |
ohair@632 | 1733 | </li> |
ohair@632 | 1734 | </ul> |
ohair@320 | 1735 | </blockquote> |
ohair@632 | 1736 | |
ohair@632 | 1737 | </blockquote> <!-- Troubleshooting --> |
ohair@632 | 1738 | |
ohair@632 | 1739 | </blockquote> <!-- Appendix A --> |
ohair@632 | 1740 | |
ohair@632 | 1741 | <!-- ====================================================== --> |
ohair@13 | 1742 | <hr> |
ohair@632 | 1743 | <h2><a name="gmake">Appendix B: GNU make</a></h2> |
ohair@13 | 1744 | <blockquote> |
ohair@632 | 1745 | |
ohair@13 | 1746 | The Makefiles in the OpenJDK are only valid when used with the |
ohair@632 | 1747 | GNU version of the utility command <code>make</code> |
ohair@632 | 1748 | (usually called <code>gmake</code> on Solaris). |
ohair@13 | 1749 | A few notes about using GNU make: |
ohair@13 | 1750 | <ul> |
ohair@13 | 1751 | <li> |
ohair@320 | 1752 | You need GNU make version 3.81 or newer. |
ohair@632 | 1753 | If the GNU make utility on your systems is not |
ohair@632 | 1754 | 3.81 or newer, |
ohair@632 | 1755 | see <a href="#buildgmake">"Building GNU make"</a>. |
ohair@13 | 1756 | </li> |
ohair@13 | 1757 | <li> |
ohair@632 | 1758 | Place the location of the GNU make binary in the |
ohair@632 | 1759 | <code>PATH</code>. |
ohair@13 | 1760 | </li> |
ohair@13 | 1761 | <li> |
ohair@13 | 1762 | <strong>Solaris:</strong> |
ohair@632 | 1763 | Do NOT use <code>/usr/bin/make</code> on Solaris. |
ohair@13 | 1764 | If your Solaris system has the software |
ohair@632 | 1765 | from the Solaris Developer Companion CD installed, |
ohair@632 | 1766 | you should try and use <code>gmake</code> |
ohair@632 | 1767 | which will be located in either the |
ohair@632 | 1768 | <code>/usr/bin</code>, <code>/opt/sfw/bin</code> or |
ohair@632 | 1769 | <code>/usr/sfw/bin</code> directory. |
ohair@13 | 1770 | </li> |
ohair@13 | 1771 | <li> |
ohair@13 | 1772 | <strong>Windows:</strong> |
ohair@632 | 1773 | Make sure you start your build inside a bash shell. |
ohair@632 | 1774 | </li> |
ohair@632 | 1775 | <li> |
ohair@632 | 1776 | <strong>Mac OS X:</strong> |
ohair@632 | 1777 | The XCode "command line tools" must be installed on your Mac. |
ohair@13 | 1778 | </li> |
ohair@13 | 1779 | </ul> |
ohair@13 | 1780 | <p> |
ohair@276 | 1781 | Information on GNU make, and access to ftp download sites, are |
ohair@276 | 1782 | available on the |
ohair@276 | 1783 | <a href="http://www.gnu.org/software/make/make.html" target="_blank"> |
ohair@276 | 1784 | GNU make web site |
ohair@276 | 1785 | </a>. |
ohair@276 | 1786 | The latest source to GNU make is available at |
ohair@276 | 1787 | <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
ohair@276 | 1788 | ftp.gnu.org/pub/gnu/make/</a>. |
ohair@320 | 1789 | </p> |
ohair@632 | 1790 | |
ohair@632 | 1791 | <h3><a name="buildgmake">Building GNU make</a></h3> |
ohair@320 | 1792 | <blockquote> |
ohair@632 | 1793 | First step is to get the GNU make 3.81 or newer source from |
ohair@320 | 1794 | <a href="http://ftp.gnu.org/pub/gnu/make/" target="_blank"> |
ohair@320 | 1795 | ftp.gnu.org/pub/gnu/make/</a>. |
ohair@632 | 1796 | Building is a little different depending on the OS but is |
ohair@632 | 1797 | basically done with: |
ohair@13 | 1798 | <blockquote> |
ohair@632 | 1799 | <code>bash ./configure</code> |
ohair@632 | 1800 | <br> |
ohair@632 | 1801 | <code>make</code> |
ewendeli@433 | 1802 | </blockquote> |
ohair@13 | 1803 | </blockquote> |
ohair@632 | 1804 | |
ohair@632 | 1805 | </blockquote> <!-- Appendix B --> |
ohair@632 | 1806 | |
ohair@632 | 1807 | <!-- ====================================================== --> |
ohair@632 | 1808 | <hr> |
ohair@632 | 1809 | <h2><a name="buildenvironments">Appendix C: Build Environments</a></h2> |
ohair@632 | 1810 | <blockquote> |
ohair@632 | 1811 | |
ohair@632 | 1812 | <h3><a name="MBE">Minimum Build Environments</a></h3> |
ohair@13 | 1813 | <blockquote> |
ohair@632 | 1814 | This file often describes specific requirements for what we |
ohair@632 | 1815 | call the |
ohair@632 | 1816 | "minimum build environments" (MBE) for this |
ohair@632 | 1817 | specific release of the JDK. |
ohair@632 | 1818 | What is listed below is what the Oracle Release |
ohair@632 | 1819 | Engineering Team will use to build the Oracle JDK product. |
ohair@632 | 1820 | Building with the MBE will hopefully generate the most compatible |
ohair@632 | 1821 | bits that install on, and run correctly on, the most variations |
ohair@632 | 1822 | of the same base OS and hardware architecture. |
ohair@632 | 1823 | In some cases, these represent what is often called the |
ohair@632 | 1824 | least common denominator, but each Operating System has different |
ohair@632 | 1825 | aspects to it. |
ohair@632 | 1826 | <p> |
ohair@632 | 1827 | In all cases, the Bootstrap JDK version minimum is critical, |
ohair@632 | 1828 | we cannot guarantee builds will work with older Bootstrap JDK's. |
ohair@632 | 1829 | Also in all cases, more RAM and more processors is better, |
ohair@632 | 1830 | the minimums listed below are simply recommendations. |
ohair@632 | 1831 | <p> |
ohair@632 | 1832 | With Solaris and Mac OS X, the version listed below is the |
ohair@632 | 1833 | oldest release we can guarantee builds and works, and the |
ohair@632 | 1834 | specific version of the compilers used could be critical. |
ohair@632 | 1835 | <p> |
ohair@632 | 1836 | With Windows the critical aspect is the Visual Studio compiler |
ohair@632 | 1837 | used, which due to it's runtime, generally dictates what Windows |
ohair@632 | 1838 | systems can do the builds and where the resulting bits can |
ohair@632 | 1839 | be used.<br> |
ohair@632 | 1840 | <b>NOTE: We expect a change here off these older Windows OS releases |
ohair@632 | 1841 | and to a 'less older' one, probably Windows 2008R2 X64.</b> |
ohair@632 | 1842 | <p> |
ohair@632 | 1843 | With Linux, it was just a matter of picking a |
ohair@632 | 1844 | stable distribution that is a good representative for Linux |
ohair@632 | 1845 | in general.<br> |
ohair@632 | 1846 | <b>NOTE: We expect a change here from Fedora 9 to something else, |
ohair@632 | 1847 | but it has not been completely determined yet, possibly |
ohair@632 | 1848 | Ubuntu 12.04 X64, unbiased community feedback would be welcome on |
ohair@632 | 1849 | what a good choice would be here.</b> |
ohair@632 | 1850 | <p> |
ohair@632 | 1851 | It is understood that most developers will NOT be using these |
ohair@632 | 1852 | specific versions, and in fact creating these specific versions |
ohair@632 | 1853 | may be difficult due to the age of some of this software. |
ohair@632 | 1854 | It is expected that developers are more often using the more |
ohair@632 | 1855 | recent releases and distributions of these operating systems. |
ohair@632 | 1856 | <p> |
ohair@632 | 1857 | Compilation problems with newer or different C/C++ compilers is a |
ohair@632 | 1858 | common problem. |
ohair@632 | 1859 | Similarly, compilation problems related to changes to the |
ohair@632 | 1860 | <code>/usr/include</code> or system header files is also a |
ohair@632 | 1861 | common problem with older, newer, or unreleased OS versions. |
ohair@632 | 1862 | Please report these types of problems as bugs so that they |
ohair@632 | 1863 | can be dealt with accordingly. |
ohair@632 | 1864 | </p> |
ohair@632 | 1865 | <table border="1"> |
ohair@632 | 1866 | <thead> |
ohair@632 | 1867 | <tr> |
ohair@632 | 1868 | <th>Base OS and Architecture</th> |
ohair@632 | 1869 | <th>OS</th> |
ohair@632 | 1870 | <th>C/C++ Compiler</th> |
ohair@632 | 1871 | <th>Bootstrap JDK</th> |
ohair@632 | 1872 | <th>Processors</th> |
ohair@632 | 1873 | <th>RAM Minimum</th> |
ohair@632 | 1874 | <th>DISK Needs</th> |
ohair@632 | 1875 | </tr> |
ohair@632 | 1876 | </thead> |
ohair@632 | 1877 | <tbody> |
ohair@632 | 1878 | <tr> |
ohair@632 | 1879 | <td>Linux X86 (32-bit) and X64 (64-bit)</td> |
ohair@632 | 1880 | <td>Fedora 9</td> |
ohair@632 | 1881 | <td>gcc 4.3 </td> |
ohair@632 | 1882 | <td>JDK 7u7</td> |
ohair@632 | 1883 | <td>2 or more</td> |
ohair@632 | 1884 | <td>1 GB</td> |
ohair@632 | 1885 | <td>6 GB</td> |
ohair@632 | 1886 | </tr> |
ohair@632 | 1887 | <tr> |
ohair@632 | 1888 | <td>Solaris SPARC (32-bit) and SPARCV9 (64-bit)</td> |
ohair@632 | 1889 | <td>Solaris 10 Update 6</td> |
ohair@632 | 1890 | <td>Studio 12 Update 1 + patches</td> |
ohair@632 | 1891 | <td>JDK 7u7</td> |
ohair@632 | 1892 | <td>4 or more</td> |
ohair@632 | 1893 | <td>4 GB</td> |
ohair@632 | 1894 | <td>8 GB</td> |
ohair@632 | 1895 | </tr> |
ohair@632 | 1896 | <tr> |
ohair@632 | 1897 | <td>Solaris X86 (32-bit) and X64 (64-bit)</td> |
ohair@632 | 1898 | <td>Solaris 10 Update 6</td> |
ohair@632 | 1899 | <td>Studio 12 Update 1 + patches</td> |
ohair@632 | 1900 | <td>JDK 7u7</td> |
ohair@632 | 1901 | <td>4 or more</td> |
ohair@632 | 1902 | <td>4 GB</td> |
ohair@632 | 1903 | <td>8 GB</td> |
ohair@632 | 1904 | </tr> |
ohair@632 | 1905 | <tr> |
ohair@632 | 1906 | <td>Windows X86 (32-bit)</td> |
ohair@632 | 1907 | <td>Windows XP</td> |
ohair@632 | 1908 | <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
ohair@632 | 1909 | <td>JDK 7u7</td> |
ohair@632 | 1910 | <td>2 or more</td> |
ohair@632 | 1911 | <td>2 GB</td> |
ohair@632 | 1912 | <td>6 GB</td> |
ohair@632 | 1913 | </tr> |
ohair@632 | 1914 | <tr> |
ohair@632 | 1915 | <td>Windows X64 (64-bit)</td> |
ohair@632 | 1916 | <td>Windows Server 2003 - Enterprise x64 Edition</td> |
ohair@632 | 1917 | <td>Microsoft Visual Studio C++ 2010 Professional Edition</td> |
ohair@632 | 1918 | <td>JDK 7u7</td> |
ohair@632 | 1919 | <td>2 or more</td> |
ohair@632 | 1920 | <td>2 GB</td> |
ohair@632 | 1921 | <td>6 GB</td> |
ohair@632 | 1922 | </tr> |
ohair@632 | 1923 | <tr> |
ohair@632 | 1924 | <td>Mac OS X X64 (64-bit)</td> |
ohair@632 | 1925 | <td>Mac OS X 10.7 "Lion"</td> |
ohair@632 | 1926 | <td>XCode 4.5.2 or newer</td> |
ohair@632 | 1927 | <td>JDK 7u7</td> |
ohair@632 | 1928 | <td>2 or more</td> |
ohair@632 | 1929 | <td>4 GB</td> |
ohair@632 | 1930 | <td>6 GB</td> |
ohair@632 | 1931 | </tr> |
ohair@632 | 1932 | </tbody> |
ohair@632 | 1933 | </table> |
ohair@13 | 1934 | </blockquote> |
ohair@632 | 1935 | |
ohair@632 | 1936 | <!-- ====================================================== --> |
ohair@632 | 1937 | <hr> |
ohair@632 | 1938 | <h3><a name="SDBE">Specific Developer Build Environments</a></h3> |
ohair@13 | 1939 | <blockquote> |
ohair@632 | 1940 | We won't be listing all the possible environments, but |
ohair@632 | 1941 | we will try to provide what information we have available to us. |
ohair@13 | 1942 | <p> |
ohair@632 | 1943 | <strong>NOTE: The community can help out by updating |
ohair@632 | 1944 | this part of the document. |
ohair@632 | 1945 | </strong> |
ohair@632 | 1946 | |
ohair@632 | 1947 | <h4><a name="fedora">Fedora</a></h4> |
ohair@632 | 1948 | <blockquote> |
ohair@632 | 1949 | After installing the latest |
ohair@632 | 1950 | <a href="http://fedoraproject.org">Fedora</a> |
ohair@632 | 1951 | you need to install several build dependencies. |
ohair@632 | 1952 | The simplest way to do it is to execute the |
ohair@632 | 1953 | following commands as user <code>root</code>: |
ohair@632 | 1954 | <blockquote> |
ohair@632 | 1955 | <code>yum-builddep java-1.7.0-openjdk</code> |
ohair@632 | 1956 | <br> |
ohair@632 | 1957 | <code>yum install gcc gcc-c++</code> |
ohair@632 | 1958 | </blockquote> |
ohair@632 | 1959 | <p> |
ohair@632 | 1960 | In addition, it's necessary to set a few environment |
ohair@632 | 1961 | variables for the build: |
ohair@632 | 1962 | <blockquote> |
ohair@632 | 1963 | <code>export LANG=C</code> |
ohair@632 | 1964 | <br> |
ohair@632 | 1965 | <code>export PATH="/usr/lib/jvm/java-openjdk/bin:${PATH}"</code> |
ohair@632 | 1966 | </blockquote> |
ohair@632 | 1967 | </blockquote> |
ohair@632 | 1968 | |
ohair@632 | 1969 | |
ohair@632 | 1970 | <h4><a name="centos">CentOS 5.5</a></h4> |
ohair@632 | 1971 | <blockquote> |
ohair@632 | 1972 | After installing |
ohair@632 | 1973 | <a href="http://www.centos.org/">CentOS 5.5</a> |
ohair@632 | 1974 | you need to make sure you have |
ohair@632 | 1975 | the following Development bundles installed: |
ohair@632 | 1976 | <blockquote> |
ohair@632 | 1977 | <ul> |
ohair@632 | 1978 | <li>Development Libraries</li> |
ohair@632 | 1979 | <li>Development Tools</li> |
ohair@632 | 1980 | <li>Java Development</li> |
ohair@632 | 1981 | <li>X Software Development (Including XFree86-devel)</li> |
ohair@632 | 1982 | </ul> |
ohair@632 | 1983 | </blockquote> |
ohair@632 | 1984 | <p> |
ohair@632 | 1985 | Plus the following packages: |
ohair@632 | 1986 | <blockquote> |
ohair@632 | 1987 | <ul> |
ohair@632 | 1988 | <li>cups devel: Cups Development Package</li> |
ohair@632 | 1989 | <li>alsa devel: Alsa Development Package</li> |
ohair@632 | 1990 | <li>Xi devel: libXi.so Development Package</li> |
ohair@632 | 1991 | </ul> |
ohair@632 | 1992 | </blockquote> |
ohair@632 | 1993 | <p> |
ohair@632 | 1994 | The freetype 2.3 packages don't seem to be available, |
ohair@632 | 1995 | but the freetype 2.3 sources can be downloaded, built, |
ohair@632 | 1996 | and installed easily enough from |
ohair@632 | 1997 | <a href="http://downloads.sourceforge.net/freetype"> |
ohair@632 | 1998 | the freetype site</a>. |
ohair@632 | 1999 | Build and install with something like: |
ohair@632 | 2000 | <blockquote> |
ohair@632 | 2001 | <code>bash ./configure</code> |
ohair@632 | 2002 | <br> |
ohair@632 | 2003 | <code>make</code> |
ohair@632 | 2004 | <br> |
ohair@632 | 2005 | <code>sudo -u root make install</code> |
ohair@632 | 2006 | </blockquote> |
ohair@632 | 2007 | <p> |
ohair@632 | 2008 | Mercurial packages could not be found easily, but a Google |
ohair@632 | 2009 | search should find ones, and they usually include Python if |
ohair@632 | 2010 | it's needed. |
ohair@632 | 2011 | </blockquote> |
ohair@632 | 2012 | |
ohair@632 | 2013 | <h4><a name="debian">Debian 5.0 (Lenny)</a></h4> |
ohair@632 | 2014 | <blockquote> |
ohair@632 | 2015 | After installing <a href="http://debian.org">Debian</a> 5 |
ohair@632 | 2016 | you need to install several build dependencies. |
ohair@632 | 2017 | The simplest way to install the build dependencies is to |
ohair@632 | 2018 | execute the following commands as user <code>root</code>: |
ohair@632 | 2019 | <blockquote> |
ohair@632 | 2020 | <code>aptitude build-dep openjdk-7</code> |
ohair@632 | 2021 | <br> |
ohair@632 | 2022 | <code>aptitude install openjdk-7-jdk libmotif-dev</code> |
ohair@632 | 2023 | </blockquote> |
ohair@632 | 2024 | <p> |
ohair@632 | 2025 | In addition, it's necessary to set a few environment |
ohair@632 | 2026 | variables for the build: |
ohair@632 | 2027 | <blockquote> |
ohair@632 | 2028 | <code>export LANG=C</code> |
ohair@632 | 2029 | <br> |
ohair@632 | 2030 | <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> |
ohair@632 | 2031 | </blockquote> |
ohair@632 | 2032 | </blockquote> |
ohair@632 | 2033 | |
ohair@632 | 2034 | <h4><a name="ubuntu">Ubuntu 12.04</a></h4> |
ohair@632 | 2035 | <blockquote> |
ohair@632 | 2036 | After installing <a href="http://ubuntu.org">Ubuntu</a> 12.04 |
ohair@632 | 2037 | you need to install several build dependencies. The simplest |
ohair@632 | 2038 | way to do it is to execute the following commands: |
ohair@632 | 2039 | <blockquote> |
ohair@632 | 2040 | <code>sudo aptitude build-dep openjdk-7</code> |
ohair@632 | 2041 | <br> |
ohair@632 | 2042 | <code>sudo aptitude install openjdk-7-jdk</code> |
ohair@632 | 2043 | </blockquote> |
ohair@632 | 2044 | <p> |
ohair@632 | 2045 | In addition, it's necessary to set a few environment |
ohair@632 | 2046 | variables for the build: |
ohair@632 | 2047 | <blockquote> |
ohair@632 | 2048 | <code>export LANG=C</code> |
ohair@632 | 2049 | <br> |
ohair@632 | 2050 | <code>export PATH="/usr/lib/jvm/java-7-openjdk/bin:${PATH}"</code> |
ohair@632 | 2051 | </blockquote> |
ohair@632 | 2052 | </blockquote> |
ohair@632 | 2053 | |
ohair@632 | 2054 | <h4><a name="opensuse">OpenSUSE 11.1</a></h4> |
ohair@632 | 2055 | <blockquote> |
ohair@632 | 2056 | After installing <a href="http://opensuse.org">OpenSUSE</a> 11.1 |
ohair@632 | 2057 | you need to install several build dependencies. |
ohair@632 | 2058 | The simplest way to install the build dependencies is to |
ohair@632 | 2059 | execute the following commands: |
ohair@632 | 2060 | <blockquote> |
ohair@632 | 2061 | <code>sudo zypper source-install -d java-1_7_0-openjdk</code> |
ohair@632 | 2062 | <br> |
ohair@632 | 2063 | <code>sudo zypper install make</code> |
ohair@632 | 2064 | </blockquote> |
ohair@632 | 2065 | <p> |
ohair@632 | 2066 | In addition, it is necessary to set a few environment |
ohair@632 | 2067 | variables for the build: |
ohair@632 | 2068 | <blockquote> |
ohair@632 | 2069 | <code>export LANG=C</code> |
ohair@632 | 2070 | <br> |
ohair@632 | 2071 | <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:$[PATH}"</code> |
ohair@632 | 2072 | </blockquote> |
ohair@632 | 2073 | <p> |
ohair@632 | 2074 | Finally, you need to unset the <code>JAVA_HOME</code> |
ohair@632 | 2075 | environment variable: |
ohair@632 | 2076 | <blockquote> |
ohair@632 | 2077 | <code>export -n JAVA_HOME</code> |
ohair@632 | 2078 | </blockquote> |
ohair@632 | 2079 | </blockquote> |
ohair@632 | 2080 | |
ohair@632 | 2081 | <h4><a name="mandriva">Mandriva Linux One 2009 Spring</a></h4> |
ohair@632 | 2082 | <blockquote> |
ohair@632 | 2083 | After installing <a href="http://mandriva.org">Mandriva</a> |
ohair@632 | 2084 | Linux One 2009 Spring |
ohair@632 | 2085 | you need to install several build dependencies. |
ohair@632 | 2086 | The simplest way to install the build dependencies is to |
ohair@632 | 2087 | execute the following commands as user <code>root</code>: |
ohair@632 | 2088 | <blockquote> |
ohair@632 | 2089 | <code>urpmi java-1.7.0-openjdk-devel make gcc gcc-c++ |
ohair@632 | 2090 | freetype-devel zip unzip libcups2-devel libxrender1-devel |
ohair@632 | 2091 | libalsa2-devel libstc++-static-devel libxtst6-devel |
ohair@632 | 2092 | libxi-devel</code> |
ohair@632 | 2093 | </blockquote> |
ohair@632 | 2094 | <p> |
ohair@632 | 2095 | In addition, it is necessary to set a few environment |
ohair@632 | 2096 | variables for the build: |
ohair@632 | 2097 | <blockquote> |
ohair@632 | 2098 | <code>export LANG=C</code> |
ohair@632 | 2099 | <br> |
ohair@632 | 2100 | <code>export PATH="/usr/lib/jvm/java-1.7.0-openjdk/bin:${PATH}"</code> |
ohair@632 | 2101 | </blockquote> |
ohair@632 | 2102 | </blockquote> |
ohair@632 | 2103 | |
ohair@632 | 2104 | <h4><a name="opensolaris">OpenSolaris 2009.06</a></h4> |
ohair@632 | 2105 | <blockquote> |
ohair@632 | 2106 | After installing <a href="http://opensolaris.org">OpenSolaris</a> 2009.06 |
ohair@632 | 2107 | you need to install several build dependencies. |
ohair@632 | 2108 | The simplest way to install the build dependencies is to |
ohair@632 | 2109 | execute the following commands: |
ohair@632 | 2110 | <blockquote> |
ohair@632 | 2111 | <code>pfexec pkg install SUNWgmake SUNWj7dev |
ohair@632 | 2112 | sunstudioexpress SUNWcups SUNWzip SUNWunzip SUNWxwhl |
ohair@632 | 2113 | SUNWxorg-headers SUNWaudh SUNWfreetype2</code> |
ohair@632 | 2114 | </blockquote> |
ohair@632 | 2115 | <p> |
ohair@632 | 2116 | In addition, it is necessary to set a few environment |
ohair@632 | 2117 | variables for the build: |
ohair@632 | 2118 | <blockquote> |
ohair@632 | 2119 | <code>export LANG=C</code> |
ohair@632 | 2120 | <br> |
ohair@632 | 2121 | <code>export PATH="/opt/SunStudioExpress/bin:${PATH}"</code> |
ohair@632 | 2122 | </blockquote> |
ohair@632 | 2123 | </blockquote> |
ohair@632 | 2124 | |
ohair@13 | 2125 | </blockquote> |
ohair@632 | 2126 | |
ohair@632 | 2127 | </blockquote> <!-- Appendix C --> |
ohair@632 | 2128 | |
ohair@632 | 2129 | <!-- ====================================================== --> |
ohair@632 | 2130 | |
ohair@632 | 2131 | <!-- Leave out Appendix D -- |
ohair@632 | 2132 | |
ohair@632 | 2133 | <hr> |
ohair@632 | 2134 | <h2><a name="mapping">Appendix D: Mapping Old to New</a></h2> |
ohair@632 | 2135 | <blockquote> |
ohair@632 | 2136 | <p>This table will help you convert some idioms of the old build |
ohair@632 | 2137 | system to the new build system.</p> |
ohair@632 | 2138 | <table summary="Cheat sheet for converting from old to new build system"> |
ohair@632 | 2139 | <tr valign="top"> |
ohair@632 | 2140 | <th>In the old build system, you used to...</th> |
ohair@632 | 2141 | <th>In the new build system, you should ...</th> |
ohair@632 | 2142 | </tr> |
ohair@632 | 2143 | <tr valign="top"> |
ohair@632 | 2144 | <td>run <code>make sanity</code></td> |
ohair@632 | 2145 | <td>run <code>bash ./configure</code></td> |
ohair@632 | 2146 | </tr> |
ohair@632 | 2147 | <tr valign="top"> |
ohair@632 | 2148 | <td>set <code>ALT_OUTPUTDIR=build/my-special-output</code></td> |
ohair@632 | 2149 | <td>before building the first time: |
ohair@632 | 2150 | <br> |
ohair@632 | 2151 | <code>cd build/my-special-output</code> |
ohair@632 | 2152 | <br> |
ohair@632 | 2153 | <code>bash ../../configure</code> |
ohair@632 | 2154 | <br> |
ohair@632 | 2155 | to build: |
ohair@632 | 2156 | <br> |
ohair@632 | 2157 | <code>cd build/my-special-output</code> |
ohair@632 | 2158 | <br> |
ohair@632 | 2159 | <code>make</code> |
ohair@632 | 2160 | </td> |
ohair@632 | 2161 | </tr> |
ohair@632 | 2162 | <tr valign="top"> |
ohair@632 | 2163 | <td>set <code>ALT_BOOTDIR=/opt/java/jdk7</code></td> |
ohair@632 | 2164 | <td>run <code>configure --with-boot-jdk=/opt/java/jdk7</code></td> |
ohair@632 | 2165 | </tr> |
ohair@632 | 2166 | <tr valign="top"> |
ohair@632 | 2167 | <td>run <code>make ARCH_DATA_MODEL=32</code></td> |
ohair@632 | 2168 | <td>run <code>configure --with-target-bits=32</code></td> |
ohair@632 | 2169 | </tr> |
ohair@632 | 2170 | <tr valign="top"> |
ohair@632 | 2171 | <td>set <code>BUILD_CLIENT_ONLY=true</code></td> |
ohair@632 | 2172 | <td>run <code>configure --with-jvm-variants=client</code></td> |
ohair@632 | 2173 | </tr> |
ohair@632 | 2174 | <tr valign="top"> |
ohair@632 | 2175 | <td>set <code>ALT_FREETYPE_LIB_PATH=/opt/freetype/lib</code> |
ohair@632 | 2176 | and <code>ALT_FREETYPE_HEADERS_PATH=/opt/freetype/include</code></td> |
ohair@632 | 2177 | <td>run <code>configure --with-freetype=/opt/freetype</code></td> |
ohair@632 | 2178 | </tr> |
ohair@632 | 2179 | <tr valign="top"> |
ohair@632 | 2180 | <td>set <code>ALT_CUPS_HEADERS_PATH=/opt/cups/include</code></td> |
ohair@632 | 2181 | <td>run <code>configure --with-cups=/opt/cups</code></td> |
ohair@632 | 2182 | </tr> |
ohair@632 | 2183 | <tr valign="top"> |
ohair@632 | 2184 | <td>set <code>ALT_OPENWIN_HOME=/opt/X11R6</code></td> |
ohair@632 | 2185 | <td>run <code>configure --with-x=/opt/X11R6</code></td> |
ohair@632 | 2186 | </tr> |
ohair@632 | 2187 | <tr valign="top"> |
ohair@632 | 2188 | <td>set <code>ALT_MSVCRNN_DLL_PATH=c:/vc_redist</code></td> |
ohair@632 | 2189 | <td>run <code>configure --with-msvcr100dll=/cygdrive/c/vc_redist</code></td> |
ohair@632 | 2190 | </tr> |
ohair@632 | 2191 | <tr valign="top"> |
ohair@632 | 2192 | <td>set <code>ALT_COMPILER_PATH=/opt/my-gcc/bin/gcc</code></td> |
ohair@632 | 2193 | <td>run <code>CC=/opt/my-gcc/bin/gcc configure</code> |
ohair@632 | 2194 | or <code>CXX=/opt/my-gcc/bin/g++ configure</code> |
ohair@632 | 2195 | </td> |
ohair@632 | 2196 | </tr> |
ohair@632 | 2197 | <tr valign="top"> |
ohair@632 | 2198 | <td>set <code>BUILD_HEADLESS_ONLY=true</code></td> |
ohair@632 | 2199 | <td>run <code>configure --disable-headful</code></td> |
ohair@632 | 2200 | </tr> |
ohair@632 | 2201 | <tr valign="top"> |
ohair@632 | 2202 | <td>set <code>ALT_DEVTOOLS_PATH=/opt/mytools</code></td> |
ohair@632 | 2203 | <td>just run <code>configure</code>, |
ohair@632 | 2204 | your tools should be detected automatically. |
ohair@632 | 2205 | If you have an unusual configuration, |
ohair@632 | 2206 | add the tools directory to your <code>PATH</code>. |
ohair@632 | 2207 | </td> |
ohair@632 | 2208 | </tr> |
ohair@632 | 2209 | <tr valign="top"> |
ohair@632 | 2210 | <td>set <code>ALT_DROPS_DIR=/home/user/dropdir</code></td> |
ohair@632 | 2211 | <td>source drops are not used anymore</td> |
ohair@632 | 2212 | </tr> |
ohair@632 | 2213 | <tr valign="top"> |
ohair@632 | 2214 | <td>set <code>USE_ONLY_BOOTDIR_TOOLS=true</code></td> |
ohair@632 | 2215 | <td>not needed, <code>configure</code> should always do the Right Thing automatically</td> |
ohair@632 | 2216 | </tr> |
ohair@632 | 2217 | <tr valign="top"> |
ohair@632 | 2218 | <td>set <code>ALT_JDK_IMPORT_PATH=/opt/java/import-jdk</code> |
ohair@632 | 2219 | or <code>ALT_BUILD_JDK_IMPORT_PATH=/opt/java/import-jdk</code> |
ohair@632 | 2220 | </td> |
ohair@632 | 2221 | <td>Importing JDKs is no longer possible, |
ohair@632 | 2222 | but hotspot can be imported using |
ohair@632 | 2223 | <code>--with-import-hotspot</code>. |
ohair@632 | 2224 | Documentation on how to achieve a |
ohair@632 | 2225 | similar solution will come soon! |
ohair@632 | 2226 | </td> |
ohair@632 | 2227 | </tr> |
ohair@632 | 2228 | <tr valign="top"> |
ohair@632 | 2229 | <td>set <code>EXTRA_CFLAGS=-Xfoo</code></td> |
ohair@632 | 2230 | <td>run <code>CFLAGS=-Xfoo configure</code></td> |
ohair@632 | 2231 | </tr> |
ohair@632 | 2232 | <tr valign="top"> |
ohair@632 | 2233 | <td>set <code>CROSS_COMPILE_ARCH=i586</code></td> |
ohair@632 | 2234 | <td>see <a href="#sec7.3"> section 7.3, Cross-compilation</a></td> |
ohair@632 | 2235 | </tr> |
ohair@632 | 2236 | <tr valign="top"> |
ohair@632 | 2237 | <td>set <code>SKIP_BOOT_CYCLE=false</code></td> |
ohair@632 | 2238 | <td>Run <code>make bootcycle-images</code>.</td> |
ohair@632 | 2239 | </tr> |
ohair@632 | 2240 | </table> |
ohair@632 | 2241 | |
ohair@632 | 2242 | <h3><a name="variables">Environment/Make Variables</a></h3> |
ohair@632 | 2243 | <p> |
ohair@632 | 2244 | Some of the |
ohair@632 | 2245 | environment or make variables (just called <b>variables</b> in this |
ohair@632 | 2246 | document) that can impact the build are: |
ohair@632 | 2247 | <blockquote> |
ohair@632 | 2248 | <dl> |
ohair@632 | 2249 | <dt><a name="path"><code>PATH</code></a> </dt> |
ohair@632 | 2250 | <dd>Typically you want to set the <code>PATH</code> to include: |
ohair@632 | 2251 | <ul> |
ohair@632 | 2252 | <li>The location of the GNU make binary</li> |
ohair@632 | 2253 | <li>The location of the Bootstrap JDK <code>java</code> |
ohair@632 | 2254 | (see <a href="#bootjdk">Bootstrap JDK</a>)</li> |
ohair@632 | 2255 | <li>The location of the C/C++ compilers |
ohair@632 | 2256 | (see <a href="#compilers"><code>compilers</code></a>)</li> |
ohair@632 | 2257 | <li>The location or locations for the Unix command utilities |
ohair@632 | 2258 | (e.g. <code>/usr/bin</code>)</li> |
ohair@632 | 2259 | </ul> |
ohair@632 | 2260 | </dd> |
ohair@632 | 2261 | <dt><code>MILESTONE</code> </dt> |
ohair@632 | 2262 | <dd> |
ohair@632 | 2263 | The milestone name for the build (<i>e.g.</i>"beta"). |
ohair@632 | 2264 | The default value is "internal". |
ohair@632 | 2265 | </dd> |
ohair@632 | 2266 | <dt><code>BUILD_NUMBER</code> </dt> |
ohair@632 | 2267 | <dd> |
ohair@632 | 2268 | The build number for the build (<i>e.g.</i> "b27"). |
ohair@632 | 2269 | The default value is "b00". |
ohair@632 | 2270 | </dd> |
ohair@632 | 2271 | <dt><a name="arch_data_model"><code>ARCH_DATA_MODEL</code></a></dt> |
ohair@632 | 2272 | <dd>The <code>ARCH_DATA_MODEL</code> variable |
ohair@632 | 2273 | is used to specify whether the build is to generate 32-bit or 64-bit |
ohair@632 | 2274 | binaries. |
ohair@632 | 2275 | The Solaris build supports either 32-bit or 64-bit builds, but |
ohair@632 | 2276 | Windows and Linux will support only one, depending on the specific |
ohair@632 | 2277 | OS being used. |
ohair@632 | 2278 | Normally, setting this variable is only necessary on Solaris. |
ohair@632 | 2279 | Set <code>ARCH_DATA_MODEL</code> to <code>32</code> for generating 32-bit binaries, |
ohair@632 | 2280 | or to <code>64</code> for generating 64-bit binaries. |
ohair@632 | 2281 | </dd> |
ohair@632 | 2282 | <dt><a name="ALT_BOOTDIR"><code>ALT_BOOTDIR</code></a></dt> |
ohair@632 | 2283 | <dd> |
ohair@632 | 2284 | The location of the bootstrap JDK installation. |
ohair@632 | 2285 | See <a href="#bootjdk">Bootstrap JDK</a> for more information. |
ohair@632 | 2286 | You should always install your own local Bootstrap JDK and |
ohair@632 | 2287 | always set <code>ALT_BOOTDIR</code> explicitly. |
ohair@632 | 2288 | </dd> |
ohair@632 | 2289 | <dt><a name="ALT_OUTPUTDIR"><code>ALT_OUTPUTDIR</code></a> </dt> |
ohair@632 | 2290 | <dd> |
ohair@632 | 2291 | An override for specifying the (absolute) path of where the |
ohair@632 | 2292 | build output is to go. |
ohair@632 | 2293 | The default output directory will be build/<i>platform</i>. |
ohair@632 | 2294 | </dd> |
ohair@632 | 2295 | <dt><a name="ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> </dt> |
ohair@632 | 2296 | <dd> |
ohair@632 | 2297 | The location of the C/C++ compiler. |
ohair@632 | 2298 | The default varies depending on the platform. |
ohair@632 | 2299 | </dd> |
ohair@632 | 2300 | <dt><code><a name="ALT_CACERTS_FILE">ALT_CACERTS_FILE</a></code></dt> |
ohair@632 | 2301 | <dd> |
ohair@632 | 2302 | The location of the <a href="#cacerts">cacerts</a> file. |
ohair@632 | 2303 | The default will refer to |
ohair@632 | 2304 | <code>jdk/src/share/lib/security/cacerts</code>. |
ohair@632 | 2305 | </dd> |
ohair@632 | 2306 | <dt><a name="ALT_CUPS_HEADERS_PATH"><code>ALT_CUPS_HEADERS_PATH</code></a> </dt> |
ohair@632 | 2307 | <dd> |
ohair@632 | 2308 | The location of the CUPS header files. |
ohair@632 | 2309 | See <a href="#cups">CUPS information</a> for more information. |
ohair@632 | 2310 | If this path does not exist the fallback path is |
ohair@632 | 2311 | <code>/usr/include</code>. |
ohair@632 | 2312 | </dd> |
ohair@632 | 2313 | <dt><a name="ALT_FREETYPE_LIB_PATH"><code>ALT_FREETYPE_LIB_PATH</code></a></dt> |
ohair@632 | 2314 | <dd> |
ohair@632 | 2315 | The location of the FreeType shared library. |
ohair@632 | 2316 | See <a href="#freetype">FreeType information</a> for details. |
ohair@632 | 2317 | </dd> |
ohair@632 | 2318 | <dt><a name="ALT_FREETYPE_HEADERS_PATH"><code>ALT_FREETYPE_HEADERS_PATH</code></a></dt> |
ohair@632 | 2319 | <dd> |
ohair@632 | 2320 | The location of the FreeType header files. |
ohair@632 | 2321 | See <a href="#freetype">FreeType information</a> for details. |
ohair@632 | 2322 | </dd> |
ohair@632 | 2323 | <dt><a name="ALT_JDK_DEVTOOLS_PATH"><code>ALT_JDK_DEVTOOLS_PATH</code></a></dt> |
ohair@632 | 2324 | <dd> |
ohair@632 | 2325 | The default root location of the devtools. |
ohair@632 | 2326 | The default value is |
ohair@632 | 2327 | <code>$(ALT_SLASH_JAVA)/devtools</code>. |
ohair@632 | 2328 | </dd> |
ohair@632 | 2329 | <dt><code><a name="ALT_DEVTOOLS_PATH">ALT_DEVTOOLS_PATH</a></code> </dt> |
ohair@632 | 2330 | <dd> |
ohair@632 | 2331 | The location of tools like the |
ohair@632 | 2332 | <a href="#zip"><code>zip</code> and <code>unzip</code></a> |
ohair@632 | 2333 | binaries, but might also contain the GNU make utility |
ohair@632 | 2334 | (<code><i>gmake</i></code>). |
ohair@632 | 2335 | So this area is a bit of a grab bag, especially on Windows. |
ohair@632 | 2336 | The default value depends on the platform and |
ohair@632 | 2337 | Unix Commands being used. |
ohair@632 | 2338 | On Linux the default will be |
ohair@632 | 2339 | <code>$(ALT_JDK_DEVTOOLS_PATH)/linux/bin</code>, |
ohair@632 | 2340 | on Solaris |
ohair@632 | 2341 | <code>$(ALT_JDK_DEVTOOLS_PATH)/<i>{sparc,i386}</i>/bin</code>, |
ohair@632 | 2342 | and on Windows with CYGWIN |
ohair@632 | 2343 | <code>/usr/bin</code>. |
ohair@632 | 2344 | </dd> |
ohair@632 | 2345 | <dt><a name="ALT_UNIXCCS_PATH"><code>ALT_UNIXCCS_PATH</code></a></dt> |
ohair@632 | 2346 | <dd> |
ohair@632 | 2347 | <strong>Solaris only:</strong> |
ohair@632 | 2348 | An override for specifying where the Unix CCS |
ohair@632 | 2349 | command set are located. |
ohair@632 | 2350 | The default location is <code>/usr/ccs/bin</code> |
ohair@632 | 2351 | </dd> |
ohair@632 | 2352 | <dt><a name="ALT_SLASH_JAVA"><code>ALT_SLASH_JAVA</code></a></dt> |
ohair@632 | 2353 | <dd> |
ohair@632 | 2354 | The default root location for many of the ALT path locations |
ohair@632 | 2355 | of the following ALT variables. |
ohair@632 | 2356 | The default value is |
ohair@632 | 2357 | <code>"/java"</code> on Solaris and Linux, |
ohair@632 | 2358 | <code>"J:"</code> on Windows. |
ohair@632 | 2359 | </dd> |
ohair@632 | 2360 | |
ohair@632 | 2361 | <dt><a name="ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a></dt> |
ohair@632 | 2362 | <dd> |
ohair@632 | 2363 | The top-level directory of the libraries and include files |
ohair@632 | 2364 | for the platform's |
ohair@632 | 2365 | graphical programming environment. |
ohair@632 | 2366 | The default location is platform specific. |
ohair@632 | 2367 | For example, on Linux it defaults to <code>/usr/X11R6/</code>. |
ohair@632 | 2368 | </dd> |
ohair@632 | 2369 | <dt><strong>Windows specific:</strong></dt> |
ohair@632 | 2370 | <dd> |
ohair@632 | 2371 | <dl> |
ohair@632 | 2372 | <dt><a name="ALT_WINDOWSSDKDIR"><code>ALT_WINDOWSSDKDIR</code></a> </dt> |
ohair@632 | 2373 | <dd> |
ohair@632 | 2374 | The location of the |
ohair@632 | 2375 | Microsoft Windows SDK where some tools will be |
ohair@632 | 2376 | located. |
ohair@632 | 2377 | The default is whatever WINDOWSSDKDIR is set to |
ohair@632 | 2378 | (or WindowsSdkDir) or the path |
ohair@632 | 2379 | <br> |
ohair@632 | 2380 | <code>c:\Program Files\Microsoft SDKs\Windows\v7.0a</code> |
ohair@632 | 2381 | </dd> |
ohair@632 | 2382 | <dt><code><a name="ALT_DXSDK_PATH">ALT_DXSDK_PATH</a></code> </dt> |
ohair@632 | 2383 | <dd> |
ohair@632 | 2384 | The location of the |
ohair@632 | 2385 | <a href="#dxsdk">Microsoft DirectX 9 SDK</a>. |
ohair@632 | 2386 | The default will be to try and use the DirectX environment |
ohair@632 | 2387 | variable <code>DXSDK_DIR</code>, |
ohair@632 | 2388 | failing that, look in <code>C:/DXSDK</code>. |
ohair@632 | 2389 | </dd> |
ohair@632 | 2390 | <dt><code><a name="ALT_MSVCRNN_DLL_PATH">ALT_MSVCRNN_DLL_PATH</a></code> </dt> |
ohair@632 | 2391 | <dd> |
ohair@632 | 2392 | The location of the |
ohair@632 | 2393 | <a href="#msvcrNN"><code>MSVCR100.DLL</code></a>. |
ohair@632 | 2394 | </dd> |
ohair@632 | 2395 | </dl> |
ohair@632 | 2396 | </dd> |
ohair@632 | 2397 | <dt><strong>Cross-Compilation Support:</strong></dt> |
ohair@632 | 2398 | <dd> |
ohair@632 | 2399 | <dl> |
ohair@632 | 2400 | <dt><a name="CROSS_COMPILE_ARCH"><code>CROSS_COMPILE_ARCH</code></a> </dt> |
ohair@632 | 2401 | <dd> |
ohair@632 | 2402 | Set to the target architecture of a |
ohair@632 | 2403 | cross-compilation build. If set, this |
ohair@632 | 2404 | variable is used to signify that we are |
ohair@632 | 2405 | cross-compiling. The expectation |
ohair@632 | 2406 | is that |
ohair@632 | 2407 | <a href="#ALT_COMPILER_PATH"><code>ALT_COMPILER_PATH</code></a> |
ohair@632 | 2408 | is set |
ohair@632 | 2409 | to point to the cross-compiler and that any |
ohair@632 | 2410 | cross-compilation specific flags |
ohair@632 | 2411 | are passed using |
ohair@632 | 2412 | <a href="#EXTRA_CFLAGS"><code>EXTRA_CFLAGS</code></a>. |
ohair@632 | 2413 | The <a href="#ALT_OPENWIN_HOME"><code>ALT_OPENWIN_HOME</code></a> |
ohair@632 | 2414 | variable should |
ohair@632 | 2415 | also be set to point to the graphical header files |
ohair@632 | 2416 | (e.g. X11) provided with |
ohair@632 | 2417 | the cross-compiler. |
ohair@632 | 2418 | When cross-compiling we skip execution of any demos |
ohair@632 | 2419 | etc that may be built, and |
ohair@632 | 2420 | also skip binary-file verification. |
ohair@632 | 2421 | </dd> |
ohair@632 | 2422 | <dt><code><a name="EXTRA_CFLAGS">EXTRA_CFLAGS</a></code> </dt> |
ohair@632 | 2423 | <dd> |
ohair@632 | 2424 | Used to pass cross-compilation options to the |
ohair@632 | 2425 | cross-compiler. |
ohair@632 | 2426 | These are added to the <code>CFLAGS</code> |
ohair@632 | 2427 | and <code>CXXFLAGS</code> variables. |
ohair@632 | 2428 | </dd> |
ohair@632 | 2429 | <dt><code><a name="USE_ONLY_BOOTDIR_TOOLS">USE_ONLY_BOOTDIR_TOOLS</a></code> </dt> |
ohair@632 | 2430 | <dd> |
ohair@632 | 2431 | Used primarily for cross-compilation builds |
ohair@632 | 2432 | (and always set in that case) |
ohair@632 | 2433 | this variable indicates that tools from the |
ohair@632 | 2434 | boot JDK should be used during |
ohair@632 | 2435 | the build process, not the tools |
ohair@632 | 2436 | (<code>javac</code>, <code>javah</code>, <code>jar</code>) |
ohair@632 | 2437 | just built (which can't execute on the build host). |
ohair@632 | 2438 | </dd> |
ohair@632 | 2439 | <dt><code><a name="HOST_CC">HOST_CC</a></code> </dt> |
ohair@632 | 2440 | <dd> |
ohair@632 | 2441 | The location of the C compiler to generate programs |
ohair@632 | 2442 | to run on the build host. |
ohair@632 | 2443 | Some parts of the build generate programs that are |
ohair@632 | 2444 | then compiled and executed |
ohair@632 | 2445 | to produce other parts of the build. Normally the |
ohair@632 | 2446 | primary C compiler is used |
ohair@632 | 2447 | to do this, but when cross-compiling that would be |
ohair@632 | 2448 | the cross-compiler and the |
ohair@632 | 2449 | resulting program could not be executed. |
ohair@632 | 2450 | On Linux this defaults to <code>/usr/bin/gcc</code>; |
ohair@632 | 2451 | on other platforms it must be |
ohair@632 | 2452 | set explicitly. |
ohair@632 | 2453 | </dd> |
ohair@632 | 2454 | </dl> |
ohair@632 | 2455 | <dt><strong>Specialized Build Options:</strong></dt> |
ohair@632 | 2456 | <dd> |
ohair@632 | 2457 | Some build variables exist to support specialized build |
ohair@632 | 2458 | environments and/or specialized |
ohair@632 | 2459 | build products. Their use is only supported in those contexts: |
ohair@632 | 2460 | <dl> |
ohair@632 | 2461 | <dt><code><a name="BUILD_CLIENT_ONLY">BUILD_CLIENT_ONLY</a></code> </dt> |
ohair@632 | 2462 | <dd> |
ohair@632 | 2463 | Indicates this build will only contain the |
ohair@632 | 2464 | Hotspot client VM. In addition to |
ohair@632 | 2465 | controlling the Hotspot build target, |
ohair@632 | 2466 | it ensures that we don't try to copy |
ohair@632 | 2467 | any server VM files/directories, |
ohair@632 | 2468 | and defines a default <code>jvm.cfg</code> file |
ohair@632 | 2469 | suitable for a client-only environment. |
ohair@632 | 2470 | Using this in a 64-bit build will |
ohair@632 | 2471 | generate a sanity warning as 64-bit client |
ohair@632 | 2472 | builds are not directly supported. |
ohair@632 | 2473 | </dd> |
ohair@632 | 2474 | <dt><code><a name="BUILD_HEADLESS_ONLY"></a>BUILD_HEADLESS_ONLY</code> </dt> |
ohair@632 | 2475 | <dd> |
ohair@632 | 2476 | Used when the build environment has no graphical |
ohair@632 | 2477 | capabilities at all. This |
ohair@632 | 2478 | excludes building anything that requires graphical |
ohair@632 | 2479 | libraries to be available. |
ohair@632 | 2480 | </dd> |
ohair@632 | 2481 | <dt><code><a name="JAVASE_EMBEDDED"></a>JAVASE_EMBEDDED</code> </dt> |
ohair@632 | 2482 | <dd> |
ohair@632 | 2483 | Used to indicate this is a build of the Oracle |
ohair@632 | 2484 | Java SE Embedded product. |
ohair@632 | 2485 | This will enable the directives included in the |
ohair@632 | 2486 | SE-Embedded specific build |
ohair@632 | 2487 | files. |
ohair@632 | 2488 | </dd> |
ohair@632 | 2489 | <dt><code><a name="LIBZIP_CAN_USE_MMAP">LIBZIP_CAN_USE_MMAP</a></code> </dt> |
ohair@632 | 2490 | <dd> |
ohair@632 | 2491 | If set to false, disables the use of mmap by the |
ohair@632 | 2492 | zip utility. Otherwise, |
ohair@632 | 2493 | mmap will be used. |
ohair@632 | 2494 | </dd> |
ohair@632 | 2495 | <dt><code><a name="COMPRESS_JARS"></a>COMPRESS_JARS</code> </dt> |
ohair@632 | 2496 | <dd> |
ohair@632 | 2497 | If set to true, causes certain jar files that |
ohair@632 | 2498 | would otherwise be built without |
ohair@632 | 2499 | compression, to use compression. |
ohair@632 | 2500 | </dd> |
ohair@632 | 2501 | </dl> |
ohair@632 | 2502 | </dd> |
ohair@632 | 2503 | </dl> |
ohair@632 | 2504 | </blockquote> |
ohair@632 | 2505 | |
ohair@632 | 2506 | </blockquote> <!-- Appendix D --> |
ohair@632 | 2507 | |
ohair@632 | 2508 | <!-- ====================================================== --> |
ohair@13 | 2509 | <hr> |
ohair@632 | 2510 | <p>End of OpenJDK README-builds.html document.<br>Please come again! |
ohair@13 | 2511 | <hr> |
ohair@632 | 2512 | |
ohair@13 | 2513 | </body> |
ohair@13 | 2514 | </html> |