< prev index next >

doc/building.md

Print this page
rev 60010 : [mq]: cpp14_doc


 306  macOS              Apple Xcode 10.1 (using clang 10.0.0)
 307  Windows            Microsoft Visual Studio 2019 update 16.5.3
 308 
 309 All compilers are expected to be able to compile to the C99 language standard,
 310 as some C99 features are used in the source code. Microsoft Visual Studio
 311 doesn't fully support C99 so in practice shared code is limited to using C99
 312 features that it does support.
 313 
 314 ### gcc
 315 
 316 The minimum accepted version of gcc is 5.0. Older versions will generate a warning
 317 by `configure` and are unlikely to work.
 318 
 319 The JDK is currently known to be able to compile with at least version 9.2 of
 320 gcc.
 321 
 322 In general, any version between these two should be usable.
 323 
 324 ### clang
 325 
 326 The minimum accepted version of clang is 3.2. Older versions will not be
 327 accepted by `configure`.
 328 
 329 To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
 330 
 331 ### Apple Xcode
 332 
 333 The oldest supported version of Xcode is 8.
 334 
 335 You will need the Xcode command lines developers tools to be able to build
 336 the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)
 337 The simplest way to install these is to run:
 338 ```
 339 xcode-select --install
 340 ```
 341 
 342 It is advisable to keep an older version of Xcode for building the JDK when
 343 updating Xcode. This [blog page](
 344 http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has
 345 good suggestions on managing multiple Xcode versions. To use a specific version
 346 of Xcode, use `xcode-select -s` before running `configure`, or use
 347 `--with-toolchain-path` to point to the version of Xcode to use, e.g.
 348 `configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`
 349 
 350 If you have recently (inadvertently) updated your OS and/or Xcode version, and
 351 the JDK can no longer be built, please see the section on [Problems with the
 352 Build Environment](#problems-with-the-build-environment), and [Getting
 353 Help](#getting-help) to find out if there are any recent, non-merged patches
 354 available for this update.
 355 
 356 ### Microsoft Visual Studio
 357 
 358 The minimum accepted version of Visual Studio is 2010. Older versions will not
 359 be accepted by `configure`. The maximum accepted version of Visual Studio is
 360 2019. Versions older than 2017 are unlikely to continue working for long.
 361 
 362 If you have multiple versions of Visual Studio installed, `configure` will by
 363 default pick the latest. You can request a specific version to be used by
 364 setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2015`.
 365 
 366 If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file
 367 invalid` when building using Visual Studio 2010, you have encountered
 368 [KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a
 369 specific installation order. However, the solution suggested by the KB article
 370 does not always resolve the problem. See [this stackoverflow discussion](
 371 https://stackoverflow.com/questions/10888391) for other suggestions.
 372 
 373 ### IBM XL C/C++
 374 
 375 Please consult the AIX section of the [Supported Build Platforms](
 376 https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
 377 Build Wiki page for details about which versions of XLC are supported.
 378 
 379 
 380 ## Boot JDK Requirements
 381 
 382 Paradoxically, building the JDK requires a pre-existing JDK. This is called the
 383 "boot JDK". The boot JDK does not, however, have to be a JDK built directly from
 384 the source code available in the OpenJDK Community.  If you are porting the JDK
 385 to a new platform, chances are that there already exists another JDK for that
 386 platform that is usable as boot JDK.
 387 
 388 The rule of thumb is that the boot JDK for building JDK major version *N*
 389 should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
 390 suitable as boot JDK. However, the JDK should be able to "build itself", so an
 391 up-to-date build of the current JDK source is an acceptable alternative. If




 306  macOS              Apple Xcode 10.1 (using clang 10.0.0)
 307  Windows            Microsoft Visual Studio 2019 update 16.5.3
 308 
 309 All compilers are expected to be able to compile to the C99 language standard,
 310 as some C99 features are used in the source code. Microsoft Visual Studio
 311 doesn't fully support C99 so in practice shared code is limited to using C99
 312 features that it does support.
 313 
 314 ### gcc
 315 
 316 The minimum accepted version of gcc is 5.0. Older versions will generate a warning
 317 by `configure` and are unlikely to work.
 318 
 319 The JDK is currently known to be able to compile with at least version 9.2 of
 320 gcc.
 321 
 322 In general, any version between these two should be usable.
 323 
 324 ### clang
 325 
 326 The minimum accepted version of clang is 3.5. Older versions will not be
 327 accepted by `configure`.
 328 
 329 To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
 330 
 331 ### Apple Xcode
 332 
 333 The oldest supported version of Xcode is 8.
 334 
 335 You will need the Xcode command lines developers tools to be able to build
 336 the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)
 337 The simplest way to install these is to run:
 338 ```
 339 xcode-select --install
 340 ```
 341 
 342 It is advisable to keep an older version of Xcode for building the JDK when
 343 updating Xcode. This [blog page](
 344 http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has
 345 good suggestions on managing multiple Xcode versions. To use a specific version
 346 of Xcode, use `xcode-select -s` before running `configure`, or use
 347 `--with-toolchain-path` to point to the version of Xcode to use, e.g.
 348 `configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`
 349 
 350 If you have recently (inadvertently) updated your OS and/or Xcode version, and
 351 the JDK can no longer be built, please see the section on [Problems with the
 352 Build Environment](#problems-with-the-build-environment), and [Getting
 353 Help](#getting-help) to find out if there are any recent, non-merged patches
 354 available for this update.
 355 
 356 ### Microsoft Visual Studio
 357 
 358 The minimum accepted version of Visual Studio is 2017. Older versions will not
 359 be accepted by `configure` and will not work. The maximum accepted
 360 version of Visual Studio is 2019.
 361 
 362 If you have multiple versions of Visual Studio installed, `configure` will by
 363 default pick the latest. You can request a specific version to be used by
 364 setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.







 365 
 366 ### IBM XL C/C++
 367 
 368 Please consult the AIX section of the [Supported Build Platforms](
 369 https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
 370 Build Wiki page for details about which versions of XLC are supported.
 371 
 372 
 373 ## Boot JDK Requirements
 374 
 375 Paradoxically, building the JDK requires a pre-existing JDK. This is called the
 376 "boot JDK". The boot JDK does not, however, have to be a JDK built directly from
 377 the source code available in the OpenJDK Community.  If you are porting the JDK
 378 to a new platform, chances are that there already exists another JDK for that
 379 platform that is usable as boot JDK.
 380 
 381 The rule of thumb is that the boot JDK for building JDK major version *N*
 382 should be a JDK of major version *N-1*, so for building JDK 9 a JDK 8 would be
 383 suitable as boot JDK. However, the JDK should be able to "build itself", so an
 384 up-to-date build of the current JDK source is an acceptable alternative. If


< prev index next >