< prev index next >

doc/building.md

Print this page
rev 53999 : 8220164: Fix build instructions for AIX


 278 
 279 It is often not much problem to build the JDK on Linux. The only general advice
 280 is to try to use the compilers, external libraries and header files as provided
 281 by your distribution.
 282 
 283 The basic tooling is provided as part of the core operating system, but you
 284 will most likely need to install developer packages.
 285 
 286 For apt-based distributions (Debian, Ubuntu, etc), try this:
 287 ```
 288 sudo apt-get install build-essential
 289 ```
 290 
 291 For rpm-based distributions (Fedora, Red Hat, etc), try this:
 292 ```
 293 sudo yum groupinstall "Development Tools"
 294 ```
 295 
 296 ### AIX
 297 
 298 The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also
 299 supported. See the [OpenJDK PowerPC Port Status Page](
 300 http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
 301 
 302 ## Native Compiler (Toolchain) Requirements
 303 
 304 Large portions of the JDK consists of native code, that needs to be compiled to
 305 be able to run on the target platform. In theory, toolchain and operating
 306 system should be independent factors, but in practice there's more or less a
 307 one-to-one correlation between target operating system and toolchain.
 308 
 309  Operating system   Supported toolchain
 310  ------------------ -------------------------
 311  Linux              gcc, clang
 312  macOS              Apple Xcode (using clang)
 313  Solaris            Oracle Solaris Studio
 314  AIX                IBM XL C/C++
 315  Windows            Microsoft Visual Studio
 316 
 317 Please see the individual sections on the toolchains for version
 318 recommendations. As a reference, these versions of the toolchains are used, at
 319 the time of writing, by Oracle for the daily builds of the JDK. It should be
 320 possible to compile the JDK with both older and newer versions, but the closer


 402 
 403 ### Microsoft Visual Studio
 404 
 405 The minimum accepted version of Visual Studio is 2010. Older versions will not
 406 be accepted by `configure`. The maximum accepted version of Visual Studio is
 407 2017. Versions older than 2017 are unlikely to continue working for long.
 408 
 409 If you have multiple versions of Visual Studio installed, `configure` will by
 410 default pick the latest. You can request a specific version to be used by
 411 setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2015`.
 412 
 413 If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file
 414 invalid` when building using Visual Studio 2010, you have encountered
 415 [KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a
 416 specific installation order. However, the solution suggested by the KB article
 417 does not always resolve the problem. See [this stackoverflow discussion](
 418 https://stackoverflow.com/questions/10888391) for other suggestions.
 419 
 420 ### IBM XL C/C++
 421 
 422 The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for
 423 AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017`.

 424 
 425 See the [OpenJDK PowerPC Port Status Page](
 426 http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
 427 
 428 ## Boot JDK Requirements
 429 
 430 Paradoxically, building the JDK requires a pre-existing JDK. This is called the
 431 "boot JDK". The boot JDK does not, however, have to be a JDK built directly from
 432 the source code available in the OpenJDK Community.  If you are porting the JDK
 433 to a new platform, chances are that there already exists another JDK for that
 434 platform that is usable as boot JDK.
 435 
 436 The rule of thumb is that the boot JDK for building JDK major version *N*
 437 should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
 438 suitable as boot JDK. However, the JDK should be able to "build itself", so an
 439 up-to-date build of the current JDK source is an acceptable alternative. If
 440 you are following the *N-1* rule, make sure you've got the latest update
 441 version, since JDK 8 GA might not be able to build JDK 9 on all platforms.
 442 
 443 Early in the release cycle, version *N-1* may not yet have been released. In
 444 that case, the preferred boot JDK will be version *N-2* until version *N-1*
 445 is available.
 446 




 278 
 279 It is often not much problem to build the JDK on Linux. The only general advice
 280 is to try to use the compilers, external libraries and header files as provided
 281 by your distribution.
 282 
 283 The basic tooling is provided as part of the core operating system, but you
 284 will most likely need to install developer packages.
 285 
 286 For apt-based distributions (Debian, Ubuntu, etc), try this:
 287 ```
 288 sudo apt-get install build-essential
 289 ```
 290 
 291 For rpm-based distributions (Fedora, Red Hat, etc), try this:
 292 ```
 293 sudo yum groupinstall "Development Tools"
 294 ```
 295 
 296 ### AIX
 297 
 298 Please consult the AIX section of the [Supported Build Platforms](
 299 https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
 300 Build Wiki page for details about which versions of AIX are supported.
 301 
 302 ## Native Compiler (Toolchain) Requirements
 303 
 304 Large portions of the JDK consists of native code, that needs to be compiled to
 305 be able to run on the target platform. In theory, toolchain and operating
 306 system should be independent factors, but in practice there's more or less a
 307 one-to-one correlation between target operating system and toolchain.
 308 
 309  Operating system   Supported toolchain
 310  ------------------ -------------------------
 311  Linux              gcc, clang
 312  macOS              Apple Xcode (using clang)
 313  Solaris            Oracle Solaris Studio
 314  AIX                IBM XL C/C++
 315  Windows            Microsoft Visual Studio
 316 
 317 Please see the individual sections on the toolchains for version
 318 recommendations. As a reference, these versions of the toolchains are used, at
 319 the time of writing, by Oracle for the daily builds of the JDK. It should be
 320 possible to compile the JDK with both older and newer versions, but the closer


 402 
 403 ### Microsoft Visual Studio
 404 
 405 The minimum accepted version of Visual Studio is 2010. Older versions will not
 406 be accepted by `configure`. The maximum accepted version of Visual Studio is
 407 2017. Versions older than 2017 are unlikely to continue working for long.
 408 
 409 If you have multiple versions of Visual Studio installed, `configure` will by
 410 default pick the latest. You can request a specific version to be used by
 411 setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2015`.
 412 
 413 If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file
 414 invalid` when building using Visual Studio 2010, you have encountered
 415 [KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a
 416 specific installation order. However, the solution suggested by the KB article
 417 does not always resolve the problem. See [this stackoverflow discussion](
 418 https://stackoverflow.com/questions/10888391) for other suggestions.
 419 
 420 ### IBM XL C/C++
 421 
 422 Please consult the AIX section of the [Supported Build Platforms](
 423 https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
 424 Build Wiki page for details about which versions of XLC are supported.
 425 


 426 
 427 ## Boot JDK Requirements
 428 
 429 Paradoxically, building the JDK requires a pre-existing JDK. This is called the
 430 "boot JDK". The boot JDK does not, however, have to be a JDK built directly from
 431 the source code available in the OpenJDK Community.  If you are porting the JDK
 432 to a new platform, chances are that there already exists another JDK for that
 433 platform that is usable as boot JDK.
 434 
 435 The rule of thumb is that the boot JDK for building JDK major version *N*
 436 should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
 437 suitable as boot JDK. However, the JDK should be able to "build itself", so an
 438 up-to-date build of the current JDK source is an acceptable alternative. If
 439 you are following the *N-1* rule, make sure you've got the latest update
 440 version, since JDK 8 GA might not be able to build JDK 9 on all platforms.
 441 
 442 Early in the release cycle, version *N-1* may not yet have been released. In
 443 that case, the preferred boot JDK will be version *N-2* until version *N-1*
 444 is available.
 445 


< prev index next >