-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenJDK 21 compilation issue #6359
Comments
@tofuHero I guess you need to use The regular way would be to use
The toolchain tools are defined in
if you need NM only, you could try to define it as
If you create a PR here, it will be much easier for you to get help. |
@tofuHero regarding x11: you should try to avoid the installation of x11 dev packages. You may find more information in previous PRs #5610 and #4784 |
I added |
I tried to disable X while compiling. so I added It seems that OpenJDK 21 requires an X environment. |
@tofuHero I got the x11 header files with this three lines:
There is another issue with libpng and lcms that are not found.
I used 21.0.5-11 since this is the latest (unstable) version in debian 21 BTW when building |
Yes, this is required to build openJDK, but not at runtime, so we do not include the X11 libraries in the package. |
I finally succeeded in compiling OpenJDK 21, but there were issues during the compilation process.
When compiling
cross/java-21-jdk
, I encountered the error--defined-only: command not found
. The reason is that the$(NM)
variable in line 56 of thespk/java-21-openjdk/work-x64-7.2/jdk21u-jdk-21.0.6-6/make/hotspot/lib/JvmMapfile.gmk
file was not defined asnm
. Therefore, I addedNM=/usr/bin/nm
before the compile command, so the command becameNM=/usr/bin/nm make arch-x64-7.2
, and it compiled successfully.When compiling
spk/java-21-jdk
, I encountered the error Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h) once again. I had already encountered this issue when compilingcross/java-21-jdk
, and based on the prompt, I executedsudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev
to install the corresponding header files.In order to successfully compile this package, I modified the code located in
spk/java-21-openjdk/work-x64-7.2/jdk21u-jdk-21.0.6-6/make/autoconf/lib-x11.m4
.I know that modifying the source code this way is not correct. How can I ensure that the X11 header libraries are properly recognized and that the
$(NM)
variable correctly points to/usr/bin/nm
?OS: Debian 12
Host: KVM on Proxmox VE
cross/java-21-jdk/Makefile (copy from cross/java-17-jdk/Makefile):
spk/java-21-jdk/Makefile (copy from spk/java-17-jdk/Makefile):
The text was updated successfully, but these errors were encountered: