[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60056: [PATCH RFC 2/6] build: gnu-build-system2: Remove source from
From: |
Maxim Cournoyer |
Subject: |
bug#60056: [PATCH RFC 2/6] build: gnu-build-system2: Remove source from native inputs. |
Date: |
Wed, 14 Dec 2022 22:23:24 -0500 |
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-system2.scm (set-paths): Remove any "source" native
input.
---
guix/build/gnu-build-system2.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/guix/build/gnu-build-system2.scm b/guix/build/gnu-build-system2.scm
index 54129549c2..1766f9d474 100644
--- a/guix/build/gnu-build-system2.scm
+++ b/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 (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.
--
2.38.1
- bug#60056: cross-compilation doesn't honor gcc native input, Maxim Cournoyer, 2022/12/13
- bug#60056: [PATCH RFC 1/6] build: Add gnu-build-system v2., Maxim Cournoyer, 2022/12/14
- bug#60056: [PATCH RFC 3/6] build-systems: gnu: Infer cross-toolchain from native-inputs components., Maxim Cournoyer, 2022/12/14
- bug#60056: [PATCH RFC 4/6] gnu: glibc-2.30: Use gnu-build-system2 to fix cross-compiled build., Maxim Cournoyer, 2022/12/14
- bug#60056: [PATCH RFC 2/6] build: gnu-build-system2: Remove source from native inputs.,
Maxim Cournoyer <=
- bug#60056: [PATCH RFC 5/6] gnu: make-linux-libre*: Use gnu-build-system2 to fix cross compilation., Maxim Cournoyer, 2022/12/14
- bug#60056: [PATCH RFC 6/6] gnu: u-boot: Fix cross-compilation by using gnu-build-system2., Maxim Cournoyer, 2022/12/14
- bug#60056: [PATCH RFC 1/6] build: Add gnu-build-system v2., Ludovic Courtès, 2022/12/15