[PATCH] WIP: fix the linux build system

  • Done
  • quality assurance status badge
Details
4 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Christopher Baines
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Christopher Baines
Severity
important

Debbugs page

Christopher Baines wrote 3 years ago
(address . guix-patches@gnu.org)
20220523083332.21626-1-mail@cbaines.net
---
gnu/platform.scm | 6 +++++-
guix/build-system/linux-module.scm | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/platform.scm b/gnu/platform.scm
index fdc3685e7c..91a1854e68 100644
--- a/gnu/platform.scm
+++ b/gnu/platform.scm
@@ -66,10 +66,14 @@ (define-record-type* <platform> platform make-platform
platform?
(target platform-target)
(system platform-system)
- (linux-architecture platform-linux-architecture
+ (linux-architecture platform-linux-architecture*
(default #f))
(glibc-dynamic-linker platform-glibc-dynamic-linker))
+;; Provide a procedure so this can be used via module-ref
+(define (platform-linux-architecture platform)
+ (platform-linux-architecture* platform))
+
;;;
;;; Platforms.
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm
index 761ebe25b1..78a3ba95b2 100644
--- a/guix/build-system/linux-module.scm
+++ b/guix/build-system/linux-module.scm
@@ -51,7 +51,8 @@ (define (default-linux)
(define (system->arch system)
(let ((module (resolve-interface '(gnu platform))))
- ((module-ref module 'lookup-platform-by-target-or-system) system)))
+ ((module-ref module 'platform-linux-architecture)
+ ((module-ref module 'lookup-platform-by-target-or-system) system))))
(define (make-linux-module-builder linux)
(package
--
2.34.0
Liliana Marie Prikler wrote 3 years ago
6bcd4de97c04b3ced47a573eaeade3f9e0284d3b.camel@ist.tugraz.at
Am Montag, dem 23.05.2022 um 09:33 +0100 schrieb Christopher Baines:
Toggle quote (23 lines)
> ---
>  gnu/platform.scm                   | 6 +++++-
>  guix/build-system/linux-module.scm | 3 ++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/platform.scm b/gnu/platform.scm
> index fdc3685e7c..91a1854e68 100644
> --- a/gnu/platform.scm
> +++ b/gnu/platform.scm
> @@ -66,10 +66,14 @@ (define-record-type* <platform> platform make-
> platform
>    platform?
>    (target               platform-target)
>    (system               platform-system)
> -  (linux-architecture   platform-linux-architecture
> +  (linux-architecture   platform-linux-architecture*
>                          (default #f))
>    (glibc-dynamic-linker platform-glibc-dynamic-linker))
>  
> +;; Provide a procedure so this can be used via module-ref
> +(define (platform-linux-architecture platform)
> +  (platform-linux-architecture* platform))
> +
I'd use a percent prefix if the problem is that platform-linux-
architecture can not be called.

Toggle quote (16 lines)
>  ;;;
>  ;;; Platforms.
> diff --git a/guix/build-system/linux-module.scm b/guix/build-
> system/linux-module.scm
> index 761ebe25b1..78a3ba95b2 100644
> --- a/guix/build-system/linux-module.scm
> +++ b/guix/build-system/linux-module.scm
> @@ -51,7 +51,8 @@ (define (default-linux)
>  
>  (define (system->arch system)
>    (let ((module (resolve-interface '(gnu platform))))
> -    ((module-ref module 'lookup-platform-by-target-or-system)
> system)))
> +    ((module-ref module 'platform-linux-architecture)
> +     ((module-ref module 'lookup-platform-by-target-or-system)
> system))))
Why not add a helper function named lookup-platform-architecture-by-
target-or-system to (gnu platform), which performs the lookup followed
by the platform-linux-architecture accessor?

Cheers
Ludovic Courtès wrote 3 years ago
control message for bug #55591
(address . control@debbugs.gnu.org)
87r14iitck.fsf@gnu.org
severity 55591 important
quit
Mathieu Othacehe wrote 3 years ago
Re: bug#55591: [PATCH] WIP: fix the linux build system
(name . Christopher Baines)(address . mail@cbaines.net)(address . 55591-done@debbugs.gnu.org)
874k1exdue.fsf@gnu.org
Hello Chris,

Toggle quote (4 lines)
> +;; Provide a procedure so this can be used via module-ref
> +(define (platform-linux-architecture platform)
> + (platform-linux-architecture* platform))

Thanks for the patch! I guess it could have been a way to fix the
issue. Josselin proposed to move the platform part to (guix platform)
instead in the merged 55602 ticket.

Closing that one as it is not needed anymore.

Thanks,

Mathieu
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 55591@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 55591
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help