[JAVA] Manually build OpenJDK on Windows

A manual build or something that will surely hurt your stomach. Maybe penance. Memorandum. Work according to README.

procedure

Environmental preparation

  1. Install Cygwin. It doesn't have to be Cygwin, but you can use whatever you like.
  2. Install the Mercurial client. Install your favorite from here. I installed TortoiseHg because it is weak against sounds that seem to be fun. (Press Next innocently) It seems to be a little popular with ggr and GUI clients
  3. In the case of Cygwin, it seems that the tools required to build OpenJDK are not available, so README Install everything listed in the .html # get_source) table. By the way, you can add the package by starting setup.exe used to install Cygwin again. Proceed in the same way as when installing, and in Select Packages, set View to Not Installed and select the one you need. (The image is an example of zip installation) image.png
    A list of things to install that comes up after pressing Next. image.png

Build version

  1. Execute get_source.sh in the root repository to fetch the entire OpenJDK source.
$ cd /cygdrive/d
$ hg clone http://hg.openjdk.java.net/jdk8/jdk8
$ cd jdk8
$ bash ./get_source.sh
 If the script execution is successful, the contents of the folder will be as follows (probably)
$ ls
ASSEMBLY_EXCEPTION  hotspot    LICENSE   README-builds.html
common              jaxp       make      test
configure           jaxws      Makefile  THIRD_PARTY_README
corba               jdk        nashorn
get_source.sh       langtools  README
  1. Start build.
$ bash ./configure

I got an error.

configure: Your cygwin is too old. You are running 3.0.7(0.338/5/3), but at least cygwin 1.7 is required. Please upgrade.
configure: error: Cannot continue
configure exiting with result code 1

It seems that the version of Cygwin is bad. At first glance, 1.7 or higher is required and it looks good because it is 3.X, but if you look at jdk8 / common / autoconf / basics_windows.m4, the following description is found.

CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
    if test "x$CYGWIN_VERSION_OK" = x; then
      AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])

Is it repelled except for 1.7 series? Since my knowledge of autotools is almost 0, I'm worried about whether to rewrite this setting to 1.7 or higher or fetch the old Cygwin of 1.7 series. It seems that learning is better if you do your best in the former.

That's all for today. Updated as needed as work progresses.

Recommended Posts

Manually build OpenJDK on Windows
Ubuntu on Windows build speed
Build ffmpeg 4.3.1 on Ubuntu for Windows
Install Corretto 8 on Windows
Install OpenJDK on macOS
OpenJDK installation on CentOS 7
Install openjdk11 on mac
M.S. docker on Windows
Install OpenJDK 8 on mac
Build Zabbix on Ubuntu 20.04
Easily build Redmine on Windows using WSL2 and Docker
Install Docker on Windows 10 PRO
Install OpenJDK7 (JAVA) on ubuntu 14.04
Build VNC Server on Ubuntu 20.04
Ubuntu on Windows Community Preview
Run openvpn on Docker (windows)
Try Docker on Windows 10 Home
Use Java Web Start in an OpenJDK environment on Windows
Ruby ① Build a Windows environment
gradle build gives java.nio.file.InvalidPathException: Illegal char <:> at index error on windows
Build a development environment where Ruby on Rails breakpoints work on Windows
Install openjdk8 on Docker image (Debian)
Error when npm install on Windows 7
Enable Openjdk10 and maven on CentOS
Install Java with zip on Windows
How to install ImageMagick on Windows 10
Build the latest Samba 4 on Ubuntu 20.04
Use Docker Compose on Windows 10 Home
Easily handle war files on Windows
Build a Minecraft server on AWS
Note Book: OpenBLAS Install On Windows10
Build Clang x VSCode on Docker (1)
Windows version of OpenJDK installation procedure
Build a XAMPP environment on Ubuntu
Try Docker on Windows Home (September 2020)
Note Book: LAPACK Install On Windows 10
How to build vim on Ubuntu 20.04
Using Docker on Windows10 Home WSL2
Note Book: VTK Install On Windows10
Install Java 9 on windows 10 and CentOS 7
Develop gRPC on Windows + Java 7 + Maven 2
Build Unity development environment on docker
Build Redmine on Azure App Service