From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 60056@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>, ludo@gnu.org
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 [thread overview]
Message-ID: <20221215032328.3368-2-maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <20221215032328.3368-1-maxim.cournoyer@gmail.com>
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
next prev parent reply other threads:[~2022-12-15 3:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 2:16 bug#60056: cross-compilation doesn't honor gcc native input Maxim Cournoyer
2022-12-15 3:23 ` bug#60056: [PATCH RFC 1/6] build: Add gnu-build-system v2 Maxim Cournoyer
2022-12-15 3:23 ` Maxim Cournoyer [this message]
2022-12-15 3:23 ` bug#60056: [PATCH RFC 3/6] build-systems: gnu: Infer cross-toolchain from native-inputs components Maxim Cournoyer
2022-12-15 3:23 ` bug#60056: [PATCH RFC 4/6] gnu: glibc-2.30: Use gnu-build-system2 to fix cross-compiled build Maxim Cournoyer
2022-12-15 3:23 ` bug#60056: [PATCH RFC 5/6] gnu: make-linux-libre*: Use gnu-build-system2 to fix cross compilation Maxim Cournoyer
2022-12-15 3:23 ` bug#60056: [PATCH RFC 6/6] gnu: u-boot: Fix cross-compilation by using gnu-build-system2 Maxim Cournoyer
2022-12-15 15:09 ` bug#60056: [PATCH RFC 1/6] build: Add gnu-build-system v2 Ludovic Courtès
2022-12-16 4:56 ` Maxim Cournoyer
2022-12-17 11:53 ` zimoun
2022-12-17 15:58 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221215032328.3368-2-maxim.cournoyer@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=60056@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.