GNU bug report logs - #64421
[PATCH] gnu: efivar: Fix cross-compilation.

Previous Next

Package: guix-patches;

Reported by: dan <i <at> dan.games>

Date: Sun, 2 Jul 2023 13:36:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 64421 in the body.
You can then email your comments to 64421 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#64421; Package guix-patches. (Sun, 02 Jul 2023 13:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to dan <i <at> dan.games>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 02 Jul 2023 13:36:02 GMT) Full text and rfc822 format available.

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

From: dan <i <at> dan.games>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: efivar: Fix cross-compilation.
Date: Sun,  2 Jul 2023 21:35:02 +0800
[version]: Temporarily change the version to a git-version.
[source]: Fetch source from git, use newer commit to fix cross-build.
[arguments]<#:make-flags>: Set HOSTCC to gcc.

copyright
---
 gnu/packages/linux.scm | 85 ++++++++++++++++++++++--------------------
 1 file changed, 44 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ffb736f447..16b9755f52 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -74,6 +74,7 @@
 ;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 dan <i <at> dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7223,48 +7224,50 @@ (define-public radeontop
     (license license:gpl3)))
 
 (define-public efivar
-  (package
-    (name "efivar")
-    (version "38")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/rhboot/" name
-                                  "/releases/download/" version "/" name
-                                  "-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h"))
-              (patches
-               (search-patches "efivar-211.patch"))))
-
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      ;; Tests require a UEFI system and is not detected in the chroot.
-       #:tests? #f
-       #:make-flags
-       #~(list (string-append "prefix=" #$output)
-               (string-append "libdir=" #$output "/lib")
-               (string-append "CC=" #$(cc-for-target))
-               (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
-       #:phases
-       #~(modify-phases %standard-phases
-           (add-after 'unpack 'build-deterministically
-             (lambda _
-               (substitute* "src/include/defaults.mk"
-                 ;; Don't use -march=native.
-                 (("-march=native")
-                  ""))))
-           (delete 'configure))))
-    (native-inputs
-     (list mandoc pkg-config))
-    (inputs
-     (list popt))
-    (home-page "https://github.com/rhboot/efivar")
-    (synopsis "Tool and library to manipulate EFI variables")
-    (description "This package provides a library and a command line
+  ;; XXX: 15622b7e5761f3dde3f0e42081380b2b41639a48 fixes compilation on i686.
+  ;; ca48d3964d26f5e3b38d73655f19b1836b16bd2d fixes cross-compilation.
+  (let ((commit "ca48d3964d26f5e3b38d73655f19b1836b16bd2d")
+        (revision "0"))
+    (package
+      (name "efivar")
+      (version (git-version "38" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/rhboot/efivar")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "0zsab3hcv1v53cxwkvsk09ifnwhs48a6xa3kxlwvs87yxswspvi8"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        ;; Tests require a UEFI system and is not detected in the chroot.
+        #:tests? #f
+        #:make-flags
+        #~(list (string-append "prefix=" #$output)
+                (string-append "libdir=" #$output "/lib")
+                (string-append "CC=" #$(cc-for-target))
+                "HOSTCC=gcc"
+                (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'build-deterministically
+              (lambda _
+                (substitute* "src/include/defaults.mk"
+                  ;; Don't use -march=native.
+                  (("-march=native")
+                   ""))))
+            (delete 'configure))))
+      (native-inputs
+       (list mandoc pkg-config))
+      (inputs
+       (list popt))
+      (home-page "https://github.com/rhboot/efivar")
+      (synopsis "Tool and library to manipulate EFI variables")
+      (description "This package provides a library and a command line
 interface to the variable facility of UEFI boot firmware.")
-    (license license:lgpl2.1+)))
+      (license license:lgpl2.1+))))
 
 (define-public efibootmgr
   (package

base-commit: a919a16898e7219fdd26bdfe33a9959e7156d59d
-- 
2.40.1





Information forwarded to guix-patches <at> gnu.org:
bug#64421; Package guix-patches. (Sun, 02 Jul 2023 13:45:02 GMT) Full text and rfc822 format available.

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

From: dan <i <at> dan.games>
To: 64421 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: efivar: Fix cross-compilation.
Date: Sun,  2 Jul 2023 21:44:37 +0800
[version]: Temporarily change the version to a git-version.
[source]: Fetch source from git, use newer commit to fix cross-build.
[arguments]<#:make-flags>: Set HOSTCC to gcc.
---
 gnu/packages/linux.scm | 85 ++++++++++++++++++++++--------------------
 1 file changed, 44 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ffb736f447..a8aacdffac 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -74,6 +74,7 @@
 ;;; Copyright © 2023 Bruno Victal <mirai <at> makinata.eu>
 ;;; Copyright © 2023 Yovan Naumovski <yovan <at> gorski.stream>
 ;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2023 dan <i <at> dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7223,48 +7224,50 @@ (define-public radeontop
     (license license:gpl3)))
 
 (define-public efivar
-  (package
-    (name "efivar")
-    (version "38")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/rhboot/" name
-                                  "/releases/download/" version "/" name
-                                  "-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h"))
-              (patches
-               (search-patches "efivar-211.patch"))))
-
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      ;; Tests require a UEFI system and is not detected in the chroot.
-       #:tests? #f
-       #:make-flags
-       #~(list (string-append "prefix=" #$output)
-               (string-append "libdir=" #$output "/lib")
-               (string-append "CC=" #$(cc-for-target))
-               (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
-       #:phases
-       #~(modify-phases %standard-phases
-           (add-after 'unpack 'build-deterministically
-             (lambda _
-               (substitute* "src/include/defaults.mk"
-                 ;; Don't use -march=native.
-                 (("-march=native")
-                  ""))))
-           (delete 'configure))))
-    (native-inputs
-     (list mandoc pkg-config))
-    (inputs
-     (list popt))
-    (home-page "https://github.com/rhboot/efivar")
-    (synopsis "Tool and library to manipulate EFI variables")
-    (description "This package provides a library and a command line
+  ;; XXX: 15622b7e5761f3dde3f0e42081380b2b41639a48 fixes compilation on i686.
+  ;; ca48d3964d26f5e3b38d73655f19b1836b16bd2d fixes cross-compilation.
+  (let ((commit "ca48d3964d26f5e3b38d73655f19b1836b16bd2d")
+        (revision "0"))
+    (package
+      (name "efivar")
+      (version (git-version "38" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/rhboot/efivar")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0zsab3hcv1v53cxwkvsk09ifnwhs48a6xa3kxlwvs87yxswspvi8"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        ;; Tests require a UEFI system and is not detected in the chroot.
+        #:tests? #f
+        #:make-flags #~(list (string-append "prefix="
+                                            #$output)
+                             (string-append "libdir="
+                                            #$output "/lib")
+                             (string-append "CC="
+                                            #$(cc-for-target)) "HOSTCC=gcc"
+                             (string-append "LDFLAGS=-Wl,-rpath="
+                                            #$output "/lib"))
+        #:phases #~(modify-phases %standard-phases
+                     (add-after 'unpack 'build-deterministically
+                       (lambda _
+                         (substitute* "src/include/defaults.mk"
+                           ;; Don't use -march=native.
+                           (("-march=native")
+                            ""))))
+                     (delete 'configure))))
+      (native-inputs (list mandoc pkg-config))
+      (inputs (list popt))
+      (home-page "https://github.com/rhboot/efivar")
+      (synopsis "Tool and library to manipulate EFI variables")
+      (description "This package provides a library and a command line
 interface to the variable facility of UEFI boot firmware.")
-    (license license:lgpl2.1+)))
+      (license license:lgpl2.1+))))
 
 (define-public efibootmgr
   (package

base-commit: a919a16898e7219fdd26bdfe33a9959e7156d59d
-- 
2.40.1





Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Wed, 06 Sep 2023 00:44:01 GMT) Full text and rfc822 format available.

Notification sent to dan <i <at> dan.games>:
bug acknowledged by developer. (Wed, 06 Sep 2023 00:44:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: dan <i <at> dan.games>
Cc: 64421-done <at> debbugs.gnu.org
Subject: Re: bug#64421: [PATCH] gnu: efivar: Fix cross-compilation.
Date: Tue, 05 Sep 2023 20:42:52 -0400
Hi Dan!

dan <i <at> dan.games> writes:

> [version]: Temporarily change the version to a git-version.
> [source]: Fetch source from git, use newer commit to fix cross-build.
> [arguments]<#:make-flags>: Set HOSTCC to gcc.

Looks good, installed!

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Oct 2023 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 219 days ago.

Previous Next


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