guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: build: gnu-build-system: Remove source from


From: guix-commits
Subject: branch core-updates updated: build: gnu-build-system: Remove source from native inputs.
Date: Wed, 07 Dec 2022 09:49:09 -0500

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new 6454208222 build: gnu-build-system: Remove source from native inputs.
6454208222 is described below

commit 6454208222d6e7760daa964b590f35ea75ffe0e5
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Dec 6 20:44:54 2022 -0500

    build: gnu-build-system: Remove source from native inputs.
    
    Fixes <https://issues.guix.gnu.org/44924>, in a cross-compilation context.
    
    Having the source in inputs when computing search paths can break builds.  
One
    example is a git checkout of the Linux source tree, where the source (a
    directory) 'include' subdirectory gets picked up in C_INCLUDE_PATH and 
causes
    conflicts with the includes provided by glibc.
    
    * guix/build/gnu-build-system.scm (set-paths): Remove any "source" native
    input.
    
    Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
 guix/build/gnu-build-system.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index b5b4468a45..ef5873d793 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -83,10 +83,12 @@ there are none."
        dir)))
 
   (define native-input-directories
-    (match native-inputs
+    ;; When cross-compiling, the source appears in native-inputs rather than
+    ;; inputs.
+    (match (and=> native-inputs (cut alist-delete "source" <>))
       (((_ . dir) ...)
        dir)
-      (#f                                         ; not cross compiling
+      (#f                               ;not cross-compiling
        '())))
 
   ;; Tell 'ld-wrapper' to disallow non-store libraries.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]