GNU bug report logs -
#64304
[PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp.
Previous Next
Reported by: Z572 <873216071 <at> qq.com>
Date: Mon, 26 Jun 2023 16:58:01 UTC
Severity: normal
Tags: patch
Done: 宋文武 <iyzsong <at> envs.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#64304: [PATCH] gnu: a2jmidid: Fix building on riscv64-linux and use gexp.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 64304 <at> debbugs.gnu.org.
--
64304: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64304
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Z572 <873216071 <at> qq.com> writes:
> [arguments]: Use gexps.
Pushed as commit a66a5d55c5.
> * gnu/packages/music.scm(a2jmidid)[source]: add patch.
> * gnu/packages/patches/a2jmidid-enable-riscv-build.patch: new file.
> * gnu/local.mk: register it.
As the patch is trivial, I replace it with 'snippet' as in commit
8dbc9b4658.
Thank you!
[Message part 3 (message/rfc822, inline)]
* gnu/packages/music.scm(a2jmidid)[source]: add patch.
[arguments]: Use gexps.
* gnu/packages/patches/a2jmidid-enable-riscv-build.patch: new file.
* gnu/local.mk: register it.
---
gnu/local.mk | 1 +
gnu/packages/music.scm | 27 ++++++------
.../patches/a2jmidid-enable-riscv-build.patch | 44 +++++++++++++++++++
3 files changed, 59 insertions(+), 13 deletions(-)
create mode 100644 gnu/packages/patches/a2jmidid-enable-riscv-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4566f1b4a4..6833df10db 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -872,6 +872,7 @@ MODULES_NOT_COMPILED += \
patchdir = $(guilemoduledir)/%D%/packages/patches
dist_patch_DATA = \
+ %D%/packages/patches/a2jmidid-enable-riscv-build.patch \
%D%/packages/patches/abcl-fix-build-xml.patch \
%D%/packages/patches/ableton-link-system-libraries-debian.patch \
%D%/packages/patches/abiword-explictly-cast-bools.patch \
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 5069e6f0df..9017966f2f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -54,6 +54,7 @@
;;; Copyright © 2023 Antero Mejr <antero <at> mailbox.org>
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus <at> gmail.com>
;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
+;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -7014,20 +7015,20 @@ (define-public a2jmidid
(commit version)))
(sha256
(base32 "1x6rcl3f4nklnx4p5jln9a7fpj9y7agjxs9rw7cccmwnski7pnsq"))
- (file-name (git-file-name name version))))
+ (file-name (git-file-name name version))
+ ;; https://github.com/jackaudio/a2jmidid/pull/18
+ (patches (search-patches "a2jmidid-enable-riscv-build.patch"))))
(arguments
- `(#:tests? #f ; No tests.
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'wrap-programs
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin/")))
- (substitute* (string-append bin "a2j")
- (("a2j_control") (string-append bin "a2j_control")))
- (wrap-program (string-append bin "a2j_control")
- `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))
- #t))))))
+ (list #:tests? #f ; No tests.
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-programs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((bin (string-append #$output "/bin/")))
+ (substitute* (string-append bin "a2j")
+ (("a2j_control") (string-append bin "a2j_control")))
+ (wrap-program (string-append bin "a2j_control")
+ `("PYTHONPATH" prefix (,(getenv "GUIX_PYTHONPATH"))))))))))
(build-system meson-build-system)
(inputs
(list alsa-lib
diff --git a/gnu/packages/patches/a2jmidid-enable-riscv-build.patch b/gnu/packages/patches/a2jmidid-enable-riscv-build.patch
new file mode 100644
index 0000000000..2b9e2ed1c5
--- /dev/null
+++ b/gnu/packages/patches/a2jmidid-enable-riscv-build.patch
@@ -0,0 +1,44 @@
+From 2c3fbef6854743416d95d85b1565dde51668488c Mon Sep 17 00:00:00 2001
+From: Heinrich Schuchardt <heinrich.schuchardt <at> canonical.com>
+Date: Fri, 1 Oct 2021 16:15:29 +0200
+Subject: [PATCH] sigsegv: enable RISC-V build
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Avoid build error
+
+../sigsegv.c:104:39: error: ‘mcontext_t’ has no member named ‘gregs’;
+did you mean ‘__gregs’?
+ 104 | ucontext->uc_mcontext.gregs[i]
+ | ^~~~~
+
+Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt <at> canonical.com>
+---
+ sigsegv.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sigsegv.c b/sigsegv.c
+index fb4456e..6930185 100644
+--- a/sigsegv.c
++++ b/sigsegv.c
+@@ -91,7 +91,9 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+ a2j_error("info.si_errno = %d", info->si_errno);
+ a2j_error("info.si_code = %d (%s)", info->si_code, si_codes[info->si_code]);
+ a2j_error("info.si_addr = %p", info->si_addr);
+-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__)
++#if !defined(__alpha__) && !defined(__ia64__) && \
++ !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && \
++ !defined(__sh__) && !defined(__aarch64__) && !defined(__riscv)
+ for(i = 0; i < NGREG; i++)
+ a2j_error("reg[%02d] = 0x" REGFORMAT, i,
+ #if defined(__powerpc__) && !defined(__powerpc64__)
+@@ -108,7 +110,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+ ucontext->uc_mcontext.gregs[i]
+ #endif
+ );
+-#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64 */
++#endif /* alpha, ia64, kFreeBSD, arm, hppa, aarch64, riscv */
+
+ #if defined(SIGSEGV_STACK_X86) || defined(SIGSEGV_STACK_IA64)
+ # if defined(SIGSEGV_STACK_IA64)
base-commit: 269cfe341f242c2b5f37774cb9b1e17d9aa68e2c
--
2.40.1
This bug report was last modified 1 year and 59 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.