You are not logged in.

#1 2020-05-14 22:17:55

Senshi
Member
Registered: 2019-01-15
Posts: 17

[SOLVED]Installing OpenJDK 14

I have an app that requires openjdk version 14. This version is fairly new, and thus not yet available via pacman: https://wiki.archlinux.org/index.php/Java

My question: Is there a way to manually install it in a manner that integrates nicely with the way archlinux handles its java versions (e.g. archlinux-java helper script), or at the least so it doesn't cause me severe pains once jdk14 is available via pacman?

Bonus questions: Where can I find the discussion (which probably exists somewhere already?) regarding updates to common packages such as openjdk to be integrated into the repo?

Last edited by Senshi (2020-05-16 18:37:42)

Offline

#2 2020-05-14 22:27:23

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [SOLVED]Installing OpenJDK 14

This AUR package looks like the 14 build:
https://aur.archlinux.org/packages/java-openjdk-bin/

Offline

#3 2020-05-15 01:22:28

loqs
Member
Registered: 2014-03-06
Posts: 18,859

Re: [SOLVED]Installing OpenJDK 14

You could try locally updating java-openjdk
patch is from https://github.com/openjdk/panama-forei … 725b.patch

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index aa5c6b3..ecc461b 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -5,10 +5,10 @@
 
 pkgbase=java-openjdk
 pkgname=('jre-openjdk-headless' 'jre-openjdk' 'jdk-openjdk' 'openjdk-src' 'openjdk-doc')
-_majorver=13
+_majorver=14
 _minorver=0
-_securityver=2
-_updatever=8
+_securityver=1
+_updatever=7
 pkgrel=1
 pkgver=${_majorver}.${_minorver}.${_securityver}.u${_updatever}
 _hg_tag=jdk-${_majorver}.${_minorver}.${_securityver}+${_updatever}
@@ -22,11 +22,13 @@ makedepends=('java-environment>=11' 'cpio' 'unzip' 'zip' 'libelf' 'libcups' 'lib
 source=(https://hg.openjdk.java.net/jdk-updates/jdk${_majorver}u/archive/${_hg_tag}.tar.gz
         freedesktop-java.desktop
         freedesktop-jconsole.desktop
-        freedesktop-jshell.desktop)
-sha256sums=('d38fb17795782dffe84e98f21f1d6293b0a45ea8f1e9c81e99cd71acac03a4e0'
+        freedesktop-jshell.desktop
+        af5c725b.patch)
+sha256sums=('301203cbda9c40a5fc496b3299806995ac4833b39c6d2e8470fd85a35461afd4'
             '4edd8475037062cdff87993c1745ddb6df31f49e76c2774bca3841da70675580'
             'd759e5e360abe9fae7b5f87498f81dd786aa568aa997d0cb8ba3e75fa0c364dd'
-            '939b2d8b24f18ad82c4868880e337c6291daee9b7edcfeadb8951bf99d6c2acc')
+            '939b2d8b24f18ad82c4868880e337c6291daee9b7edcfeadb8951bf99d6c2acc'
+            '1d40400aa10addadea168100e2a2879e74611b0e31b90aaf5958b14c369f057c')
 
 case "${CARCH}" in
   x86_64) _JARCH='x86_64';;
@@ -44,6 +46,7 @@ _nonheadless=(lib/libawt_xawt.{so,debuginfo}
 
 build() {
   cd ${_jdkdir}
+  patch -p1 -i "$srcdir"/af5c725b.patch
 
   NUM_PROC_OPT=''
   MAKEFLAG_J=$(echo ${MAKEFLAGS} | sed -En 's/.*-j([0-9]+).*/\1/p')
@@ -79,7 +82,7 @@ build() {
     --with-version-pre="" \
     --with-version-opt="" \
     --with-stdc++lib=dynamic \
-    --with-extra-cflags="${_CFLAGS}" \
+    --with-extra-cflags="${_CFLAGS} -fcommon" \
     --with-extra-cxxflags="${_CXXFLAGS}" \
     --with-extra-ldflags="${_LDFLAGS}" \
     --with-libjpeg=system \

Offline

#4 2020-05-16 18:38:28

Senshi
Member
Registered: 2019-01-15
Posts: 17

Re: [SOLVED]Installing OpenJDK 14

Thanks for the replies. I ended up installing from the AUR, and then I could just use archlinux-java to switch to 14. Easier than expected, guess I was worried for no reason smile .

Offline

Board footer

Powered by FluxBB