Originally I tried to build AdoptOpenjdk 11 on Windows 10 and it didn't work, so I tried building on Linux first. Along the way, I noticed that there was a document in openjdk-jdk11u / doc / building.html, but I tried to see how random it would take.
environment --CentOS 7.6.1810 (minimum)
Here is the build script. https://github.com/AdoptOpenJDK/openjdk-build.git
First, install the git command and clone the git repository.
sudo yum -y install git
git clone https://github.com/AdoptOpenJDK/openjdk-build.git
You should move the directory and execute the build script, but it is said that you will need various things later, so install it first. As there are 9 lines, I tried 9 times. .. .. → After another 30 minutes, it is said that ALSA is not enough.
sudo yum -y install bzip2
sudo yum -y install autoconf
sudo yum -y install unzip
sudo yum -y install zip
sudo yum -y install java-11-openjdk-devel
sudo yum -y groupinstall "Development Tools"
sudo yum -y install libXtst-devel libXt-devel libXrender-devel libXi-devel
sudo yum -y install cups-devel
sudo yum -y install fontconfig-devel
sudo yum -y install alsa-lib-devel
Move the directory and run the build script.
cd openjdk-build/
./makejdk-any-platform.sh jdk11u
It's hard to move on from here. .. .. Creating support/modules_libs/java.base/server/libjvm.so from 914 file(s)
After about 20 minutes, it was the next line. .. .. Creating hotspot/variant-server/libjvm/gtest/libjvm.so from 102 file(s)
After about 30 minutes, it ends with a build error.
sound / PLATFORM_API_LinuxOS_ALSA_CommonUtils.h: 26: 28: Fatal error: alsa / asoundlib.h: No such file or directory
#include <alsa/asoundlib.h>
Add ALSA.
sudo yum -y install alsa-lib-devel
Delete workspace and run the build script.
cd openjdk-build/
rm -rf workspace/
./makejdk-any-platform.sh jdk11u
Completed in about 42 minutes!
Your final archive was created at /home/adopt/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/images/OpenJDK.tar.gz
Moving the artifact to /home/adopt/openjdk-build/workspace/target/
All done!
Try to unzip it.
cd ~
tar zxf openjdk-build/workspace/target/OpenJDK.tar.gz
cd jdk-11.0.3+7
Comparison of version display.
bin/java -version
java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7-201904210157)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7-201904210157, mixed mode)
openjdk version "11.0.3" 2019-04-16 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.3+7-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.3+7-LTS, mixed mode, sharing)
Recommended Posts