* [bug#68048] [PATCH] gnu: cdparanoia: Fix cross-compiling.
@ 2023-12-26 14:26 Zheng Junjie
2023-12-27 20:49 ` Mathieu Othacehe
2023-12-28 2:54 ` [bug#68048] [PATCH v2] " Zheng Junjie
0 siblings, 2 replies; 4+ messages in thread
From: Zheng Junjie @ 2023-12-26 14:26 UTC (permalink / raw)
To: 68048
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2748 bytes --]
* gnu/packages/cdrom.scm (cdparanoia)
[native-inputs]: when cross compiling to riscv64-linux-gnu, add config.
[arguments]: when target riscv64-linux-gnu, add update-config-scripts phase.
<#:configure-flags>: when cross-compiling, use `(assoc-ref %outputs "out")'.
Change-Id: I442c668c3d52c241f0d405f51ea8d995bfefd3fd
---
gnu/packages/cdrom.scm | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index aaa2e50293..4e858c571f 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -233,10 +234,33 @@ (define-public cdparanoia
`(#:tests? #f ; there is no check target
#:parallel-build? #f ;randomly fails to link
#:configure-flags ; Add $libdir to the RUNPATH of all the executables.
- (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+ (list (string-append "LDFLAGS=-Wl,-rpath="
+ ,(if (%current-target-system)
+ '(assoc-ref %outputs "out")
+ '%output)
+ "/lib"))
;; Building in parallel is flaky: “ld: […]/cachetest.c:393: undefined
;; reference to `paranoia_free'”.
- #:parallel-build? #f))
+ #:parallel-build? #f
+ ,@(if (and (target-riscv64?)
+ (%current-target-system))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '())))
+ (native-inputs
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list config)
+ '()))
(home-page "https://www.xiph.org/paranoia/")
(synopsis "Audio CD reading utility")
(description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
base-commit: 0d13d095420861022e68e87ceebd5e037e12a8b3
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#68048] [PATCH] gnu: cdparanoia: Fix cross-compiling.
2023-12-26 14:26 [bug#68048] [PATCH] gnu: cdparanoia: Fix cross-compiling Zheng Junjie
@ 2023-12-27 20:49 ` Mathieu Othacehe
2023-12-28 2:54 ` [bug#68048] [PATCH v2] " Zheng Junjie
1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Othacehe @ 2023-12-27 20:49 UTC (permalink / raw)
To: Zheng Junjie; +Cc: 68048
Hello,
When cross-compiling for aarch64-linux-gnu, I have the following error:
--8<---------------cut here---------------start------------->8---
configure: error: /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash ./config.sub aarch64-linux-gnu failed
error: in phase 'configure': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" arguments: ("./configure" "CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" "SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" "--prefix=/gnu/store/qn2iwmdv7k5105qds7vczrhyyp2587ic-cdparanoia-10.2" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=aarch64-linux-gnu" "LDFLAGS=-Wl,-rpath=/gnu/store/qn2iwmdv7k5105qds7vczrhyyp2587ic-cdparanoia-10.2/lib") exit-status: 1 term-signal: #f stop-signal: #f>
phase `configure' failed after 0.3 seconds
command "/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" "./configure" "CC_FOR_BUILD=gcc" "CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" "SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash" "--prefix=/gnu/store/qn2iwmdv7k5105qds7vczrhyyp2587ic-cdparanoia-10.2" "--enable-fast-install" "--build=x86_64-unknown-linux-gnu" "--host=aarch64-linux-gnu" "LDFLAGS=-Wl,-rpath=/gnu/store/qn2iwmdv7k5105qds7vczrhyyp2587ic-cdparanoia-10.2/lib" failed with status 1
builder for `/gnu/store/w02ly1dkxf4n8ndfccmvny9nawir4pjs-cdparanoia-10.2.drv' failed with exit code 1
build of /gnu/store/w02ly1dkxf4n8ndfccmvny9nawir4pjs-cdparanoia-10.2.drv failed
--8<---------------cut here---------------end--------------->8---
> + ,@(if (and (target-riscv64?)
> + (%current-target-system))
This condition may need to be extended?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#68048] [PATCH v2] gnu: cdparanoia: Fix cross-compiling.
2023-12-26 14:26 [bug#68048] [PATCH] gnu: cdparanoia: Fix cross-compiling Zheng Junjie
2023-12-27 20:49 ` Mathieu Othacehe
@ 2023-12-28 2:54 ` Zheng Junjie
2023-12-28 9:18 ` bug#68048: " Mathieu Othacehe
1 sibling, 1 reply; 4+ messages in thread
From: Zheng Junjie @ 2023-12-28 2:54 UTC (permalink / raw)
To: 68048
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2854 bytes --]
* gnu/packages/cdrom.scm (cdparanoia)
[native-inputs]: when cross compiling to {riscv,aarch}64-linux-gnu, add config.
[arguments]: when target {riscv,aarch}64-linux-gnu, add update-config-scripts phase.
<#:configure-flags>: when cross-compiling, use `(assoc-ref %outputs "out")'.
Change-Id: I442c668c3d52c241f0d405f51ea8d995bfefd3fd
---
gnu/packages/cdrom.scm | 30 ++++++++++++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm
index aaa2e50293..d473ab41ed 100644
--- a/gnu/packages/cdrom.scm
+++ b/gnu/packages/cdrom.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -233,10 +234,35 @@ (define-public cdparanoia
`(#:tests? #f ; there is no check target
#:parallel-build? #f ;randomly fails to link
#:configure-flags ; Add $libdir to the RUNPATH of all the executables.
- (list (string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+ (list (string-append "LDFLAGS=-Wl,-rpath="
+ ,(if (%current-target-system)
+ '(assoc-ref %outputs "out")
+ '%output)
+ "/lib"))
;; Building in parallel is flaky: “ld: […]/cachetest.c:393: undefined
;; reference to `paranoia_free'”.
- #:parallel-build? #f))
+ #:parallel-build? #f
+ ,@(if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ ;; Replace outdated config.guess and config.sub.
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '())))
+ (native-inputs
+ (if (and (or (target-riscv64?)
+ (target-aarch64?))
+ (%current-target-system))
+ (list config)
+ '()))
(home-page "https://www.xiph.org/paranoia/")
(synopsis "Audio CD reading utility")
(description "Cdparanoia retrieves audio tracks from CDDA capable CDROM
base-commit: 0d13d095420861022e68e87ceebd5e037e12a8b3
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#68048: [PATCH v2] gnu: cdparanoia: Fix cross-compiling.
2023-12-28 2:54 ` [bug#68048] [PATCH v2] " Zheng Junjie
@ 2023-12-28 9:18 ` Mathieu Othacehe
0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Othacehe @ 2023-12-28 9:18 UTC (permalink / raw)
To: Zheng Junjie; +Cc: 68048-done
> * gnu/packages/cdrom.scm (cdparanoia)
> [native-inputs]: when cross compiling to {riscv,aarch}64-linux-gnu, add config.
> [arguments]: when target {riscv,aarch}64-linux-gnu, add update-config-scripts phase.
> <#:configure-flags>: when cross-compiling, use `(assoc-ref %outputs "out")'.
Applied, thanks,
Mathieu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-28 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-26 14:26 [bug#68048] [PATCH] gnu: cdparanoia: Fix cross-compiling Zheng Junjie
2023-12-27 20:49 ` Mathieu Othacehe
2023-12-28 2:54 ` [bug#68048] [PATCH v2] " Zheng Junjie
2023-12-28 9:18 ` bug#68048: " Mathieu Othacehe
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).