GNU bug report logs - #53503
[PATCH] gnu: Add %final-inputs-riscv64.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Mon, 24 Jan 2022 15:21: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 53503 in the body.
You can then email your comments to 53503 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#53503; Package guix-patches. (Mon, 24 Jan 2022 15:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 24 Jan 2022 15:21:02 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH] gnu: Add %final-inputs-riscv64.
Date: Mon, 24 Jan 2022 17:19:26 +0200
* gnu/packages/commencement.scm (%final-inputs-riscv64): New variable.
* guix/build-system/gnu.scm (standard-inputs): Use %final-inputs-riscv64
when targeting riscv64-linux.
---

This is the final piece needed to make hello (and most other packages)
build on riscv64-linux, when offloading from a non-riscv64 machine or
when built natively. Commit 94c70b5440334c7c844e20350351bd5565aff137
from the wip-riscv branch only worked when building natively on riscv64
since %final-inputs is sourced first, then the actual system it is going
to be built on. I believe this is due to the lazy resolving of
(gnu packages commencement) and %final inputs. Due to the above I was
unable to start from the commit on wip-riscv and use parameterize to
override %current-system, since by the time that part of the code was
reached %final-inputs was already evaluated.

 gnu/packages/commencement.scm | 6 +++++-
 guix/build-system/gnu.scm     | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 26769d2626..96d914344d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2012 Nikita Karetnikov <nikita <at> karetnikov.org>
 ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw <at> netris.org>
-;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
 ;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius <at> gnu.org>
@@ -3736,6 +3736,10 @@ (define-public %final-inputs
       ("libc:static" ,glibc-final "static")
       ("locales" ,glibc-utf8-locales-final))))
 
+(define-public %final-inputs-riscv64
+  `(("gcc:lib" ,gcc-final "lib")
+    ,@%final-inputs))
+
 (define-public canonical-package
   (let ((name->package (fold (lambda (input result)
                                (match input
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 651415098e..2f74000eef 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -273,7 +273,9 @@ (define (standard-packages)
 
   ;; Resolve (gnu packages commencement) lazily to hide circular dependency.
   (let ((distro (resolve-module '(gnu packages commencement))))
-    (module-ref distro '%final-inputs)))
+    (if (target-riscv64?)
+      (module-ref distro '%final-inputs-riscv64)
+      (module-ref distro '%final-inputs))))
 
 (define* (lower name
                 #:key source inputs native-inputs outputs target

base-commit: 1bfd634e335702d0b9b0189d685d14ec79f1cbf6
-- 
2.34.0





Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Thu, 27 Jan 2022 07:56:01 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Thu, 27 Jan 2022 07:56:01 GMT) Full text and rfc822 format available.

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

From: Efraim Flashner <efraim <at> flashner.co.il>
To: 53503-done <at> debbugs.gnu.org
Subject: Re: bug#53503: Acknowledgement ([PATCH] gnu: Add
 %final-inputs-riscv64.)
Date: Thu, 27 Jan 2022 09:55:08 +0200
[Message part 1 (text/plain, inline)]
Patch pushed

-- 
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)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Feb 2022 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 115 days ago.

Previous Next


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