[JAVA] I tried to build AdoptOpenjdk 11 on CentOS 7

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)

Build

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

2nd build

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

I tried to build AdoptOpenjdk 11 on CentOS 7
I tried installing CentOS 8 on ESXi 6.7
I tried to build Ruby 3.0.0 from source
I tried to verify AdoptOpenJDK 11 (11.0.2) with Docker image
I tried OmniSci on CentOS 7 + GeForce RTX 2080 Ti.
I tried to build Micra mackerel in 1 hour!
I tried to verify yum-cron
I tried to build an environment using Docker (beginner)
A story that I had a hard time trying to build PHP 7.4 on GCE's CentOS 8
I tried adding a separator line to TabLayout on Android
I tried to create React.js × TypeScript × Material-UI on docker environment
I tried to build the environment little by little using docker
I tried to build the environment of WSL2 + Docker + VSCode
I tried upgrading from CentOS 6.5 to CentOS 7 with the upgrade tool
How to deploy Laravel on CentOS 7
I tried to summarize iOS 14 support
I tried to interact with Java
I tried to explain the method
Upgrade from MYSQL5.7 to 8.0 on CentOS 6.7
I tried putting Domino11 in CentOS7
How to install MariaDB 10.4 on CentOS 8
Steps to install MySQL 8 on CentOS 8
I tried to summarize Java learning (1)
I tried to understand nil guard
Steps to install devtoolset-6 on CentOS 7
How to build vim on Ubuntu 20.04
I tried to summarize Java 8 now
I tried to chew C # (polymorphism: polymorphism)
I installed F-Revo CRM 7.3 on CentOS 7.7
I tried to explain Active Hash
I tried to build the environment of PlantUML Server with Docker
Special Lecture on Multi-Scale Simulation: I tried to summarize the 5th
I tried to build an http2 development environment with Eclipse + Tomcat
I tried to create a Spring MVC development environment on Mac
Special Lecture on Multi-Scale Simulation: I tried to summarize the 8th
I tried to build a simple application using Dockder + Rails Scaffold
I tried to display the calendar on the Eclipse console using Java.
I tried to build a laravel operating environment while remembering Docker
Special Lecture on Multi-Scale Simulation: I tried to summarize the 7th
I tried to summarize the methods used
I tried to introduce CircleCI 2.0 to Rails app
I tried migrating Processing to VS Code
I tried running Docker on Windows Server 2019
Countermeasures for FDclone build failure on CentOS 8
I tried to summarize Java lambda expressions
I want to display background-ground-image on heroku.
I tried to get started with WebAssembly
I tried to solve AOJ's Binary Search
I want to install PHP 7.2 on Ubuntu 20.04.
How to install beta php8.0 on CentOS8
I tried to implement the Iterator pattern
Microservices 101-I tried putting Docker on Ubuntu-
I tried to summarize the Stream API
What is Docker? I tried to summarize
I tried to use Selenium like JQuery
I tried to touch JavaScript Part.2 Object-oriented
I tried to implement ModanShogi with Kinx
I tried to build a Firebase application development environment with Docker in 2020
01. I tried to build an environment with SpringBoot + IntelliJ + MySQL (MyBatis) (Windows10)
I tried migrating the portfolio created on Vagrant to the Docker development environment
I tried to publish the reflex measurement application on the Google Play store