unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Patterson <andrewpatt7@gmail.com>
To: Guillaume Le Vaillant <glv@posteo.net>
Cc: 59331@debbugs.gnu.org
Subject: bug#59331: sbcl currently fails to build on aarch64
Date: Fri, 18 Nov 2022 14:37:16 -0500	[thread overview]
Message-ID: <87cz9khwwp.fsf@gmail.com> (raw)
In-Reply-To: <87y1s9ic5y.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

I contacted upstream 
(https://bugs.launchpad.net/sbcl/+bug/1996942); they've committed 
a fix and sent me a patch.  I tried to make a patch to guix that 
would fix it, but the patch apparently isn't being applied just by 
adding it to the patches field of the origin and I'm not sure why.

My current effort is attached.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Currently-failing patch --]
[-- Type: text/x-patch, Size: 2553 bytes --]

From 29d58ab55a3c6d2e626274c6a9f2ab8cfcc57d06 Mon Sep 17 00:00:00 2001
From: Andrew Patterson <andrewpatt7@gmail.com>
Date: Thu, 17 Nov 2022 21:53:01 -0500
Subject: [PATCH] gnu: sbcl: Fix build on aarch64

sbcl 2.2.10 currently doesn't build on aarch64.  Upstream has fixed the
issue (https://bugs.launchpad.net/sbcl/+bug/1996942), but this patch is
needed until the next release.
---
 gnu/packages/lisp.scm                         |  1 +
 ...ix-build-on-arm64-with-clisp-as-host.patch | 27 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 gnu/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 80018f8e1a..1b6b08d72f 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -429,6 +429,7 @@ (define-public sbcl
        (method url-fetch)
        (uri (string-append "mirror://sourceforge/sbcl/sbcl/" version "/sbcl-"
                            version "-source.tar.bz2"))
+       (patches (search-patches "sbcl-fix-build-on-arm64-with-clisp-as-host.patch"))
        (sha256
         (base32 "0cq8x4svkawirxq5s5gs4qxkl23m4q5p722a2kpss8qjfslc7hwc"))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch b/gnu/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch
new file mode 100644
index 0000000000..4fe3ed16db
--- /dev/null
+++ b/gnu/packages/patches/sbcl-fix-build-on-arm64-with-clisp-as-host.patch
@@ -0,0 +1,27 @@
+From 944f53fb00794f4bc96700dd14df1e88b6cd5623 Mon Sep 17 00:00:00 2001
+From: Christophe Rhodes <csr21@cantab.net>
+Date: Thu, 17 Nov 2022 22:29:26 +0000
+Subject: [PATCH] Fix build on arm64 with clisp as host
+
+Make sure the offset constants are defined while compiling vm.lisp.
+---
+ src/compiler/arm64/vm.lisp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/compiler/arm64/vm.lisp b/src/compiler/arm64/vm.lisp
+index ae6d7c7fa..2a151be58 100644
+--- a/src/compiler/arm64/vm.lisp
++++ b/src/compiler/arm64/vm.lisp
+@@ -23,7 +23,8 @@
+ (macrolet ((defreg (name offset)
+              (let ((offset-sym (symbolicate name "-OFFSET")))
+                `(progn
+-                  (defconstant ,offset-sym ,offset)
++                  (eval-when (:compile-toplevel :load-toplevel :execute)
++                    (defconstant ,offset-sym ,offset))
+                   (setf (svref *register-names* ,offset-sym) ,(symbol-name name)))))
+ 
+            (defregset (name &rest regs)
+-- 
+2.30.2
+
-- 
2.38.1


[-- Attachment #3: Type: text/plain, Size: 22 bytes --]


-- 
Andrew Patterson

  reply	other threads:[~2022-11-18 19:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  5:06 bug#59331: sbcl currently fails to build on aarch64 Andrew Patterson
2022-11-17 15:47 ` Guillaume Le Vaillant
2022-11-17 19:57   ` Andrew Patterson
2022-11-18 19:37     ` Andrew Patterson [this message]
2022-11-19  5:00       ` Andrew Patterson
2022-11-19 12:04         ` Guillaume Le Vaillant
2022-11-19 18:19           ` Andrew Patterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz9khwwp.fsf@gmail.com \
    --to=andrewpatt7@gmail.com \
    --cc=59331@debbugs.gnu.org \
    --cc=glv@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).