doc/building.md
branchJDK-8215445-branch
changeset 57089 4629c26feded
parent 57086 f48eb679f5ca
equal deleted inserted replaced
57088:865bc65add67 57089:4629c26feded
   184 rule also applies to input to the build system, e.g. in arguments to
   184 rule also applies to input to the build system, e.g. in arguments to
   185 `configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
   185 `configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
   186 `--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
   186 `--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
   187 on [Fixpath](#fixpath).
   187 on [Fixpath](#fixpath).
   188 
   188 
   189 #### Windows Subsystem for Linux (WSL)
       
   190 
       
   191 Only Windows 10 1803 or newer is supported due to a dependency on the wslpath utility
       
   192 and support for environment variable sharing through WSLENV.
       
   193 
       
   194 You may build both Windows and Linux binaries from WSL. To build Windows binaries,
       
   195 you must use a Windows boot JDK (located in a Windows-accessible directory). To build
       
   196 Linux binaries, you must use a Linux boot JDK. The default behavior is to build for
       
   197 Windows. To build for Linux, pass `--build=x86_64-unknown-linux-gnu` and
       
   198 `--host=x86_64-unknown-linux-gnu` to `configure`.
       
   199 
       
   200 If building Windows binaries, you must also have synced down the OpenJDK source code
       
   201 from Windows. This is because Windows executables (such as Visual Studio and the boot
       
   202 JDK) must be able to access the source code. Also, the directory where the OpenJDK
       
   203 source code is stored must be case-insensitive (either by setting the individual
       
   204 directory as case insensitive using fsutil, changing /etc/fstab to mount the drive as
       
   205 case-insensitive, or editing /etc/wsl.conf to mark all mounted Windows drives as
       
   206 case-insensitive).
       
   207 
       
   208 Note that while it's possible to build on WSL, testing is still not fully supported.
       
   209 
       
   210 #### Cygwin
   189 #### Cygwin
   211 
   190 
   212 A functioning [Cygwin](http://www.cygwin.com/) environment is thus required for
   191 A functioning [Cygwin](http://www.cygwin.com/) environment is required for
   213 building the JDK on Windows. If you have a 64-bit OS, we strongly recommend
   192 building the JDK on Windows. If you have a 64-bit OS, we strongly recommend
   214 using the 64-bit version of Cygwin.
   193 using the 64-bit version of Cygwin.
   215 
   194 
   216 **Note:** Cygwin has a model of continuously updating all packages without any
   195 **Note:** Cygwin has a model of continuously updating all packages without any
   217 easy way to install or revert to a specific version of a package. This means
   196 easy way to install or revert to a specific version of a package. This means
   218 that whenever you add or update a package in Cygwin, you might (inadvertently)
   197 that whenever you add or update a package in Cygwin, you might (inadvertently)
   219 update tools that are used by the JDK build process, and that can cause
   198 update tools that are used by the JDK build process, and that can cause
   220 unexpected build problems.
   199 unexpected build problems.
   221 
   200 
   222 The JDK requires GNU Make 4.0 or greater on Windows. This is usually not a
   201 The JDK requires GNU Make 4.0 or greater in Cygwin. This is usually not a
   223 problem, since Cygwin currently only distributes GNU Make at a version above
   202 problem, since Cygwin currently only distributes GNU Make at a version above
   224 4.0.
   203 4.0.
   225 
   204 
   226 Apart from the basic Cygwin installation, the following packages must also be
   205 Apart from the basic Cygwin installation, the following packages must also be
   227 installed:
   206 installed:
   239 Unfortunately, Cygwin can be unreliable in certain circumstances. If you
   218 Unfortunately, Cygwin can be unreliable in certain circumstances. If you
   240 experience build tool crashes or strange issues when building on Windows,
   219 experience build tool crashes or strange issues when building on Windows,
   241 please check the Cygwin FAQ on the ["BLODA" list](
   220 please check the Cygwin FAQ on the ["BLODA" list](
   242 https://cygwin.com/faq/faq.html#faq.using.bloda) and the section on [fork()
   221 https://cygwin.com/faq/faq.html#faq.using.bloda) and the section on [fork()
   243 failures](https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures).
   222 failures](https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures).
       
   223 
       
   224 #### Windows Subsystem for Linux (WSL)
       
   225 
       
   226 Windows 10 1809 or newer is supported due to a dependency on the wslpath utility
       
   227 and support for environment variable sharing through WSLENV. Version 1803 can
       
   228 work but intermittent build failures have been observed.
       
   229 
       
   230 It's possible to build both Windows and Linux binaries from WSL. To build
       
   231 Windows binaries, you must use a Windows boot JDK (located in a
       
   232 Windows-accessible directory). To build Linux binaries, you must use a Linux
       
   233 boot JDK. The default behavior is to build for Windows. To build for Linux, pass
       
   234 `--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu` to
       
   235 `configure`.
       
   236 
       
   237 If building Windows binaries, the source code must be located in a Windows-
       
   238 accessible directory. This is because Windows executables (such as Visual Studio
       
   239 and the boot JDK) must be able to access the source code. Also, the drive where
       
   240 the source is stored must be mounted as case-insensitive by changing either
       
   241 /etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected
       
   242 using the fsutil tool in case the source was cloned before changing the mount
       
   243 options.
       
   244 
       
   245 Note that while it's possible to build on WSL, testing is still not fully
       
   246 supported.
   244 
   247 
   245 ### Solaris
   248 ### Solaris
   246 
   249 
   247 See `make/devkit/solaris11.1-package-list.txt` for a list of recommended
   250 See `make/devkit/solaris11.1-package-list.txt` for a list of recommended
   248 packages to install when building on Solaris. The versions specified in this
   251 packages to install when building on Solaris. The versions specified in this