问题现象
configure: error: Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h).
问题分析
configure时遇到的问题,主要是环境上对应的包未安装,检查失败。
解决过程
对应安装如下几个包即可
安装包 | 对应的头文件 | 备注 |
---|---|---|
yum install libXrender-devel.x86_64 | Xrender.h | 没什么说的 |
yum install libXrandr-devel.x86_64 | Xrandr.h | 没什么说的 |
yum install libXtst-devel.x86_64 | XTest.h | 这里包名和头文件不一样,找了好久 |
yum install libXt-devel.x86_64 | Intrinsic.h | 这里包名和头文件不一样,找了好久 |
结果
所有关联依赖库安装完成后
checking for X11/extensions/shape.h... yes
checking for X11/extensions/Xrender.h... yes
checking for X11/extensions/XTest.h... yes
checking for X11/Intrinsic.h... yes
checking for X11/extensions/Xrandr.h... yes
configure执行完成后
configure: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/configure-support/config.status
config.status: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/spec.gmk
config.status: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/bootcycle-spec.gmk
config.status: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/buildjdk-spec.gmk
config.status: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/compare.sh
config.status: creating /root/dragonwell11/build/linux-x86_64-normal-server-release/Makefile
====================================================
A new configuration has been successfully created in
/root/dragonwell11/build/linux-x86_64-normal-server-release
using default settings.
Configuration summary:
* Debug level: release
* HS debug level: product
* JVM variants: server
* JVM features: server: 'aot cds cmsgc compiler1 compiler2 epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services vm-structs zgc'
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
* Version string: 11.0.19-internal+0-adhoc.root.dragonwell11 (11.0.19-internal)
Tools summary:
* Boot JDK: openjdk version "11.0.19" 2023-04-18 LTS OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-1.0.1.an8) (build 11.0.19+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-1.0.1.an8) (build 11.0.19+7-LTS, mixed mode, sharing) (at /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.0.1.an8.x86_64)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 8.5.0 (at /usr/bin/gcc)
* C++ Compiler: Version 8.5.0 (at /usr/bin/g++)
Build performance summary:
* Cores to use: 2
* Memory limit: 3709 MB
再接下要就是执行make & make install
即可成功编译完成Dragonwell JDK。