GNU bug report logs - #64670
[PATCH 0/1] Fixing failing builds of openjdk on aarch64

Previous Next

Package: guix-patches;

Reported by: Tim Johann <t1m <at> phrogstar.de>

Date: Sun, 16 Jul 2023 20:37:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64670 in the body.
You can then email your comments to 64670 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#64670; Package guix-patches. (Sun, 16 Jul 2023 20:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tim Johann <t1m <at> phrogstar.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 16 Jul 2023 20:37:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tim Johann <t1m <at> phrogstar.de>
To: guix-patches <at> gnu.org
Cc: Tim Johann <t1m <at> phrogstar.de>
Subject: [PATCH 0/1] Fixing failing builds of openjdk on aarch64
Date: Sun, 16 Jul 2023 22:35:51 +0200
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 <at> 9.181, openjdk <at> 10.46, and
openjdk <at> 11.0.17 successfully on one of my RPis.  I hope that subsequently all
versions of openjdk can be built on aarch64.

[1]  https://bugs.openjdk.org/browse/JDK-8237885
[2] https://hg.openjdk.org/jdk-updates/jdk11u/rev/15cc1c8a6371).

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





Information forwarded to guix-patches <at> gnu.org:
bug#64670; Package guix-patches. (Sun, 16 Jul 2023 21:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 64670 <at> debbugs.gnu.org (full text, mbox):

From: Tim Johann <t1m <at> phrogstar.de>
To: 64670 <at> debbugs.gnu.org
Cc: Tim Johann <t1m <at> phrogstar.de>
Subject: [PATCH 1/1] gnu: openjdk: patches for aarch64 build
 (openjdk9|openjdk10).
Date: Sun, 16 Jul 2023 23:16:29 +0200
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 <at> 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

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





Information forwarded to guix-patches <at> gnu.org:
bug#64670; Package guix-patches. (Mon, 17 Jul 2023 15:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 64670 <at> debbugs.gnu.org (full text, mbox):

From: Tim Johann <t1m <at> phrogstar.de>
To: 64670 <at> debbugs.gnu.org
Subject: This seems to be a duplicate issue to the on by Christopher Baines.
Date: Mon, 17 Jul 2023 17:41:34 +0200
[Message part 1 (text/plain, inline)]
Hello,

I just found a kinda duplicate of this from May 06:
<https://issues.guix.gnu.org/63327>

So, why isn't this already pushed?

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


Cheers

Tim
[Message part 2 (text/html, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#64670; Package guix-patches. (Fri, 11 Aug 2023 11:19:02 GMT) Full text and rfc822 format available.

Message #14 received at 64670 <at> debbugs.gnu.org (full text, mbox):

From: Tim Johann <t1m <at> phrogstar.de>
To: 64670 <at> debbugs.gnu.org
Subject: referenced patch does not apply to openjdk10
Date: Fri, 11 Aug 2023 12:56:30 +0200
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 05 Oct 2023 07:28:02 GMT) Full text and rfc822 format available.

Notification sent to Tim Johann <t1m <at> phrogstar.de>:
bug acknowledged by developer. (Thu, 05 Oct 2023 07:28:02 GMT) Full text and rfc822 format available.

Message #19 received at 64670-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Tim Johann <t1m <at> phrogstar.de>
Cc: 64670-done <at> debbugs.gnu.org
Subject: Re: [bug#64670] referenced patch does not apply to openjdk10
Date: Thu, 5 Oct 2023 10:26:53 +0300
[Message part 1 (text/plain, inline)]
On Fri, Aug 11, 2023 at 12:56:30PM +0200, Tim Johann wrote:
> 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 <at> 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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#64670; Package guix-patches. (Thu, 05 Oct 2023 11:51:02 GMT) Full text and rfc822 format available.

Message #22 received at 64670-done <at> debbugs.gnu.org (full text, mbox):

From: Tim Johann <t1m <at> phrogstar.de>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 64670-done <at> debbugs.gnu.org
Subject: Re: [bug#64670] referenced patch does not apply to openjdk10
Date: Thu, 05 Oct 2023 13:47:15 +0200
[Message part 1 (text/plain, inline)]
Thanks, Efraim!

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 03 Nov 2023 11:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 187 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.