0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

adoptopenjdkをソースからビルドする(未解決)

Last updated at Posted at 2020-08-02

adoptopenjdkをビルドしてインストールする(CentOS7)

事前準備

ここから必要なboot jdkを落としておく。この手順があっているかは不明

12を入れたいから11を落としてくる

cd $HOME/local/src
wget https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz
tar xvzf OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz

エラー1: gpgでエラー

この署名が所有者のものかどうかの検証手段がありません

Failed to verify signature of freetype.tar.gz

LANG=C でlocaleを変えれば直る(gpgの標準出力をechoしてパイプでgrepに渡していたからlocaleが日本語だとだめだったみたい)

LANG=C JAVA_HOME=$HOME/local/src/jdk-11.0.8+10 ./makejdk-any-platform.sh jdk12u

エラー2: gitでエラー

***省略***/openjdk-build/sbin/prepareWorkspace.sh: line 523: .git/info/sparse-checkout: No such file or directory

下記diffで直る(原因調べるのが面倒だったので無理やり)

diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh
index f57838b..ba0d9eb 100644
--- a/sbin/prepareWorkspace.sh
+++ b/sbin/prepareWorkspace.sh
@@ -520,6 +520,8 @@ checkingAndDownloadCaCerts() {
     git init
     git remote add origin -f "${BUILD_CONFIG[OPENJDK_BUILD_REPO_URI]}"
     git config core.sparsecheckout true
+    mkdir .git/info
+    touch .git/info/sparse-checkout
     echo "security/*" >>.git/info/sparse-checkout
     git pull origin "${BUILD_CONFIG[OPENJDK_BUILD_REPO_BRANCH]}"
   fi

エラー3: boot jdkが見つからないエラー

configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at . did not contain bin/java; ignoring
configure: error: The path given by --with-boot-jdk does not contain a valid Boot JDK
configure exiting with result code 1
Error: No configurations found for /****省略****/openjdk-build/workspace/build/src.
Please run 'bash configure' to create a configuration.

これこそちゃんとドキュメント読めば解決できそう

-Jオプションでboot jdkのディレクトリを指定しなければいけなかったみたい

LANG=C JAVA_HOME=$HOME/local/src/jdk-11.0.8+10 bash ./makejdk-any-platform.sh -J $HOME/local/src/jdk-11.0.8+10 jdk12u

エラー4: cupsがない

checking cups/cups.h usability... no
checking cups/cups.h presence... no
checking for cups/cups.h... no
checking cups/ppd.h usability... no
checking cups/ppd.h presence... no
checking for cups/ppd.h... no
configure: error: Could not find cups! You might be able to fix this by running 'sudo yum install cups-devel'.

これはインストールすれば良いだけ

cd $HOME/local/src
wget https://github.com/apple/cups/releases/download/v2.3.3/cups-2.3.3-source.tar.gz
tar xvzf cups-2.3.3-source.tar.gz
cd cups-2.3.3
./configure --prefix=$HOME/local
make
sudo make install #/etcの中にsymlinkを貼っていたのでやむを得ず

エラー5: ALSAがない

checking for ALSA... no
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
configure: error: Could not find alsa! You might be able to fix this by running 'sudo yum install alsa-lib-devel'.
checking for alsa/asoundlib.h... no
configure exiting with result code 1

これもインストールすれば良いだけ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?