GNU bug report logs - #44924
guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH

Previous Next

Package: guix;

Reported by: 宋文武 <iyzsong <at> outlook.com>

Date: Sat, 28 Nov 2020 16:53:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 宋文武 <iyzsong <at> outlook.com>, GNU Debbugs
 <control <at> debbugs.gnu.org>
Cc: 44924 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#44924: guix build u-boot-pinebook --with-git-url failed due
 to "source" in C_INCLUDE_PATH
Date: Tue, 06 Dec 2022 20:44:32 -0500
unarchive 44924
reopen 44924
thanks

Hello!

宋文武 <iyzsong <at> outlook.com> writes:


[...]

> Here is patch:
>
>>From 77283132c6eeeb75900afad5782b989ceee1506a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong <at> member.fsf.org>
> Date: Sat, 5 Dec 2020 11:35:37 +0800
> Subject: [PATCH] build-system/gnu: Remove the source directory from search
>  paths.
>
> Fixes <https://issues.guix.gnu.org/44924>.
>
> * guix/build/gnu-build-system.scm (set-paths): Delete 'source' from
> 'input-directories'.
> ---
>  guix/build/gnu-build-system.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
> index 5f08b9d6ac..f9e6f5013d 100644
> --- a/guix/build/gnu-build-system.scm
> +++ b/guix/build/gnu-build-system.scm
> @@ -72,7 +72,9 @@ See https://reproducible-builds.org/specs/source-date-epoch/."
>                      (search-paths '()) (native-search-paths '())
>                      #:allow-other-keys)
>    (define input-directories
> -    (match inputs
> +    ;; The "source" input can be a directory, but we don't want it for search
> +    ;; paths.  See <https://issues.guix.gnu.org/44924>.
> +    (match (alist-delete "source" inputs)
>        (((_ . dir) ...)
>         dir)))

I've rediscovered this same bug, but when cross-compiling.  The same fix
needs to be applied to the native-inputs in this context, as this is
where the "source" is:

--8<---------------cut here---------------start------------->8---
modified   guix/build/gnu-build-system2.scm
@@ -83,10 +83,12 @@ (define input-directories
        dir)))
 
   (define native-input-directories
-    (match native-inputs
+    ;; When cross-compiling, the source appears in native-inputs rather than
+    ;; inputs.
+    (match (alist-delete "source" native-inputs)
       (((_ . dir) ...)
        dir)
-      (#f                                         ; not cross compiling
+      (#f                               ;not cross-compiling
        '())))
 
   ;; Tell 'ld-wrapper' to disallow non-store libraries.
--8<---------------cut here---------------end--------------->8---

If that looks OK, I'll push it to core-updates.

-- 
Thanks,
Maxim




This bug report was last modified 2 years and 258 days ago.

Previous Next


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