[PATCH 0/1] Fixing failing builds of openjdk on aarch64

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Tim Johann
Owner
unassigned
Submitted by
Tim Johann
Severity
normal
T
T
Tim Johann wrote on 16 Jul 2023 22:35
(address . guix-patches@gnu.org)(name . Tim Johann)(address . t1m@phrogstar.de)
20230716203552.180767-1-t1m@phrogstar.de
When I wanted to install Clojure on my Raspberry Pis, I was stumped to see
that there was no installable version of openjdk available on aarch64. Seeing
the build fail, I saw that this was a very simple issue fixed in openjdk11
(cf.: [1] and [2]). So, I created a patch and applied it to openjdk9 and
openjdk10, after which I was able to build openjdk@9.181, openjdk@10.46, and
openjdk@11.0.17 successfully on one of my RPis. I hope that subsequently all
versions of openjdk can be built on aarch64.


Tim Johann (1):
gnu: openjdk: patches for aarch64 build (openjdk9|openjdk10).

gnu/packages/java.scm | 6 ++++--
.../openjdk-10-duplicate-using-declaration.patch | 15 +++++++++++++++
.../openjdk-9-duplicate-using-declaration.patch | 15 +++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch
create mode 100644 gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch


base-commit: 796c823a0d1d0aec9f4af908eca462e58e5675b5
--
2.41.0
T
T
Tim Johann wrote on 16 Jul 2023 23:16
[PATCH 1/1] gnu: openjdk: patches for aarch64 build (openjdk9|openjdk10).
(address . 64670@debbugs.gnu.org)(name . Tim Johann)(address . t1m@phrogstar.de)
20230716211629.181979-1-t1m@phrogstar.de
OpenJDK source code prior to version 11 have a duplicate 'using' statement
in hotspot's interp_masm_aarch64.hpp, which let's compilation of
openjdk@9.181 fail on aarch64, and in consequence all openjdk versions,
since each version larger than major 9 depends on the next lower major
version of openjdk.

This patch will make openjdk available on aarch64, again.

* gnu/packages/java.scm (openjdk9|openjdk10)[source](patches): adding patches
to remove duplicate 'using' statements causing build to fail on aarch64.
* gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch,
gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch: New files
---
gnu/packages/java.scm | 6 ++++--
.../openjdk-10-duplicate-using-declaration.patch | 15 +++++++++++++++
.../openjdk-9-duplicate-using-declaration.patch | 15 +++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch
create mode 100644 gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch

Toggle diff (68 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 5a6288581e..69c4e604a8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -873,7 +873,8 @@ (define-public openjdk9
(base32
"1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
(patches (search-patches "openjdk-9-pointer-comparison.patch"
- "openjdk-9-setsignalhandler.patch"))))
+ "openjdk-9-setsignalhandler.patch"
+ "openjdk-9-duplicate-using-declaration.patch"))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
@@ -1060,7 +1061,8 @@ (define-public openjdk10
(patches (search-patches
"openjdk-10-idlj-reproducibility.patch"
"openjdk-10-pointer-comparison.patch"
- "openjdk-10-setsignalhandler.patch"))))
+ "openjdk-10-setsignalhandler.patch"
+ "openjdk-10-duplicate-using-declaration.patch"))))
(arguments
(substitute-keyword-arguments (package-arguments openjdk9)
((#:phases phases)
diff --git a/gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch b/gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch
new file mode 100644
index 0000000000..48cded60e3
--- /dev/null
+++ b/gnu/packages/patches/openjdk-10-duplicate-using-declaration.patch
@@ -0,0 +1,15 @@
+Patch from changeset of openjdk11:
+https://hg.openjdk.org/jdk-updates/jdk11u/rev/15cc1c8a6371
+
+diff -u -r openjdk-10.alt/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp openjdk-10/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp
+--- openjdk-10.alt/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp 2023-07-16 14:33:27.570165136 +0200
++++ openjdk-10/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp 2023-07-16 14:34:55.325163199 +0200
+@@ -39,8 +39,6 @@
+ protected:
+
+ protected:
+- using MacroAssembler::call_VM_leaf_base;
+-
+ // Interpreter specific version of call_VM_base
+ using MacroAssembler::call_VM_leaf_base;
+
diff --git a/gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch b/gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch
new file mode 100644
index 0000000000..3fa933ad36
--- /dev/null
+++ b/gnu/packages/patches/openjdk-9-duplicate-using-declaration.patch
@@ -0,0 +1,15 @@
+Patch from changeset of openjdk11:
+https://hg.openjdk.org/jdk-updates/jdk11u/rev/15cc1c8a6371
+
+diff -u -r openjdk-9.alt/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp openjdk-9/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp
+--- openjdk-9.alt/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp 2023-07-15 19:03:09.063790084 +0200
++++ openjdk-9/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp 2023-07-15 19:01:12.289447197 +0200
+@@ -39,8 +39,6 @@
+ protected:
+
+ protected:
+- using MacroAssembler::call_VM_leaf_base;
+-
+ // Interpreter specific version of call_VM_base
+ using MacroAssembler::call_VM_leaf_base;
+
--
2.41.0
T
T
Tim Johann wrote on 17 Jul 2023 17:41
This seems to be a duplicate issue to the on by Christopher Baines.
(address . 64670@debbugs.gnu.org)
87v8eir183.fsf@phrogstar.de
Hello,

I just found a kinda duplicate of this from May 06:

So, why isn't this already pushed?

I'll keep this one open until one of our patches is applied.


Cheers

Tim
Attachment: file
T
T
Tim Johann wrote on 11 Aug 2023 12:56
referenced patch does not apply to openjdk10
(address . 64670@debbugs.gnu.org)
871qg9aku1.fsf@phrogstar.de
Hello again,

said issue is merged (https://issues.guix.gnu.org/63327) now.

Unfortunately, it does not affect openjdk10, since it uses a different file system organisation than the former version.

I already suggested this solution to bug#63069 (https://issues.guix.gnu.org/63069) where a fix along the lines of separate patch files was proposed as a better alternative to issue #63327.

Still keeping this open until a patch for openjdk10 has been merged, too, which I would love to see soon.

Cheers

Tim
Attachment: file
E
E
Efraim Flashner wrote on 5 Oct 2023 09:26
(name . Tim Johann)(address . t1m@phrogstar.de)(address . 64670-done@debbugs.gnu.org)
ZR5lPT24OiRUbSwj@3900XT
On Fri, Aug 11, 2023 at 12:56:30PM +0200, Tim Johann wrote:
Toggle quote (10 lines)
> Hello again,
>
> said issue is merged (<https://issues.guix.gnu.org/63327>) now.
>
> Unfortunately, it does not affect openjdk10, since it uses a different file system organisation than the former version.
>
> I already suggested this solution to bug#63069 (<https://issues.guix.gnu.org/63069>) where a fix along the lines of separate patch files was proposed as a better alternative to issue #63327.
>
> Still keeping this open until a patch for openjdk10 has been merged, too, which I would love to see soon.

Sorry for this issue taking so long to get resolved. I've added a phase
for openjdk-10 that replaces the phase for openjdk-9 with one that uses
the updated path. Openjdk-11 doesn't inherit from openjdk-10 so it
doesn't look like we need to override the phase there, and I didn't see
the duplicate line when I checked the source file.

I've added you as a co-author for the patch.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmUeZT0ACgkQQarn3Mo9
g1Fk2w//QlK4G4SPvHW6H3IsMxsrxAtdcnMCl2jXLAm4gsUeAbsgqHU0KNc0rpGZ
3b9rMyPkcmVd4EpKqiNutzlKDWWnw7EvwgQbUcMwTyCB30v0PbAdyThSsgAH03PO
pYj+ytbTcxz7+nNCBcZauILYEFcwFD5n+Js7rj424Nho7bX5KBwDSdjFzWXZe6aZ
PIsQrbUSUS86sxgU88Uwsl+/QXyKvaBgw3i2XrHhW593G48ykfMJctL72kO1k3O+
AdlG1K/cQqqRosoLykKgeNI8XTV4UmOQ/j1B04TiprGpf1WFk76/Ksu/CZYdjK/t
bzBNFFiIoQEmq1wOOCsQ6A6r6hXHR/pTK2Q1f/QBMVlesTHzAHYZcm/gu3RLqKte
Vj9hbvSJdsmSvTLsJpCJagJptQc2s4aFruntT24WUH/XdLeOMF+r8pgH4/FaoL7V
ShXOo+63adtZBKmliQRKMeq+cVP5bW+JgWxTThHZviZb4q1VmhPjaph2SLQoTvOE
4tzRNEJpuszNIiWhTYPZjEBemryK8DlXF42gl/xqTCLadF6twrwix7rrY45+fn1i
jgySXdK0+qPTxN7RQNe0zsaxSYLLE0lhc3ds/ArO21gsVo4SerUxSrMLWhgf/xlh
pt78hV6X0d/lr23peXQvnzEEgqkQgFXkmIB4kDgwTSK8ctblTLo=
=ljyj
-----END PGP SIGNATURE-----


Closed
T
T
Tim Johann wrote on 5 Oct 2023 13:47
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 64670-done@debbugs.gnu.org)
87bkddwao0.fsf@phrogstar.de
Thanks, Efraim!
Closed
?