Package Details: jre18-openjdk-headless 18.0.2.u1-3

Git Clone URL: https://aur.archlinux.org/java18-openjdk.git (read-only, click to copy)
Package Base: java18-openjdk
Description: OpenJDK Java 18 headless runtime environment
Upstream URL: https://openjdk.java.net/
Licenses: custom
Provides: java-runtime-headless, java-runtime-headless-openjdk, jre18-openjdk-headless
Submitter: HLFH
Maintainer: HLFH
Last Packager: HLFH
Votes: 1
Popularity: 0.000000
First Submitted: 2022-11-06 15:52 (UTC)
Last Updated: 2022-11-06 16:17 (UTC)

Dependencies (40)

Required by (174)

Sources (4)

Latest Comments

FabioLolix commented on 2023-10-15 15:50 (UTC)

I am using the same PKGBUILD as the one for jdk19-openjdk.

That is incomplete and this is too

I ran this PKGBUILD in a clean chroot and it gave the following error:

What is your default Java environment? And your available Java environments?

There isn't a default in chroot, you need to set it if the pkgbuild need a specific version

jdk17 is lts and still available in Arch repo

https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Convenience_way

HLFH commented on 2022-12-06 08:54 (UTC) (edited on 2022-12-06 08:55 (UTC) by HLFH)

@gnaggnoyil

yay -S jdk18-openjdk works as well. This package can be installed.

Are you using a modified PKGBUILD? Did you empty the cache before the installation?

I am using the same PKGBUILD as the one for jdk19-openjdk.

Maybe you want to read the end of this discussion about ccache. Looks like an issue with how ccache is setup with you.

Don't hesitate to submit a bug report for jdk19-openjdk and if accepted, I will backport.

gnaggnoyil commented on 2022-12-05 16:00 (UTC) (edited on 2022-12-05 16:00 (UTC) by gnaggnoyil)

@HLFH

"What is your default Java environment? And your available Java environments?"

Available Java environments:
  java-11-openjdk
  java-17-openjdk (default)
  java-19-openjdk
  java-8-openjdk

"Can you set it to java-17-openjdk to build?"

By running sudo archlinux-java set java-17-openjdk this package can be built with makepkg -s. However:

  1. Just as you know, setting default Java environment for the host won't affect the default one in the clean chroot build environment. Running extra-x86_64-build will still fail as before.
  2. I personally don't think it's a good idea for a PKGBUILD to impose on the user to set some extra options before makepkg. It should either prepare things for a clean chroot, or just assume no prerequisites on build environments at all.
  3. Even if I run makepkg -s directly as described above, the PKGBUILD still requires the option ccache to be off to build, otherwise it will emit the following error:
configure: Using default toolchain gcc (GNU Compiler Collection)
checking for gcc... /usr/lib/ccache/bin/gcc
checking resolved symbolic links for CC... /usr/bin/ccache
configure: Please use --enable-ccache instead of providing a wrapped compiler.
configure: error: /usr/lib/ccache/bin/gcc is a symbolic link to ccache. This is not supported.
configure exiting with result code 1
==> ERROR: A failure occurred in build().
    Aborting...

Therefore, I would like to see the PKGBUILD improved to cover the above 3 I mentioned. (I used to believe the java environment problem can be resolved by specifying a more strict version range for java-environment, but I failed to find a solution.)

HLFH commented on 2022-12-05 10:51 (UTC) (edited on 2022-12-05 10:51 (UTC) by HLFH)

@gnaggnoyil

What is your default Java environment? And your available Java environments? It seems you have put it to java-19-openjdk? Can you set it to java-17-openjdk to build?

archlinux-java status
Available Java environments:
  java-17-openjdk
  java-18-openjdk
  java-19-openjdk (default)
sudo archlinux-java set java-17-openjdk

gnaggnoyil commented on 2022-12-04 18:24 (UTC)

I ran this PKGBUILD in a clean chroot and it gave the following error:

checking for javac... /usr/bin/javac
checking for java... /usr/bin/java
configure: Found potential Boot JDK using java(c) in PATH
configure: Potential Boot JDK found at /usr/lib/jvm/java-19-openjdk is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/java-19-openjdk)
configure: Potential Boot JDK found at /usr/lib/jvm/java-19-openjdk is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default-runtime)
configure: Potential Boot JDK found at /usr/lib/jvm/default-runtime is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default)
configure: Potential Boot JDK found at /usr/lib/jvm/default is incorrect JDK version (openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment (build 19.0.1+10) OpenJDK 64-Bit Server VM (build 19.0.1+10, mixed mode)); ignoring
configure: (Your Boot JDK version must be one of: 17 18)
configure: Could not find a valid Boot JDK. OpenJDK distributions are available at http://jdk.java.net/.
configure: This might be fixed by explicitly setting --with-boot-jdk
configure: error: Cannot continue
configure exiting with result code 1
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/gnaggnoyil/build

Does anyone know how to eliminate this error?