From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 宋文武 <iyzsong@outlook.com>
Cc: 44924@debbugs.gnu.org, "GNU Debbugs" <control@debbugs.gnu.org>,
"Ludovic Courtès" <ludo@gnu.org>
Subject: bug#44924: [PATCH v2 core-updates] build: gnu-build-system: Remove source from native inputs.
Date: Tue, 06 Dec 2022 22:07:15 -0500 [thread overview]
Message-ID: <87zgbz9ajg.fsf_-_@gmail.com> (raw)
In-Reply-To: <874ju89edb.fsf@gmail.com> (Maxim Cournoyer's message of "Tue, 06 Dec 2022 20:44:32 -0500")
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
Hi again,
Here's a v2, which guards against a #f native-inputs (when no
cross-compiling).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-gnu-build-system-Remove-source-from-native-inp.patch --]
[-- Type: text/x-patch, Size: 2201 bytes --]
From 8d2f8fafb66288969f41fcab7705de65f6d09432 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Tue, 6 Dec 2022 20:44:54 -0500
Subject: [PATCH] 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-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.
base-commit: b94724e8b2102be0fe9d19e9dfe44d6f7101bd4b
prerequisite-patch-id: ef7cada25908a9dec368cede7033b0fe6869ac97
prerequisite-patch-id: 660177fb9eee55d11983ea9360c072730d0d21a5
prerequisite-patch-id: 3af7d5aabc4b70d4709fcb150f072ae1ff16a859
prerequisite-patch-id: fd4074fb4cf068ccac3122c19138f098a610542a
prerequisite-patch-id: 51cecbabc04c69d4338addaece536c42a075660f
prerequisite-patch-id: 98e04821d56efe50aeb9bdcf640c25bebc2823c6
prerequisite-patch-id: b9b6f21a2db3f7a5ef82bb11ed23f69749cc6b3d
prerequisite-patch-id: 2c67bfd85b343a65440e6c63451e5417129dea6f
prerequisite-patch-id: a4a0de47739cb0fa71f5c3fd60ba31164a631812
prerequisite-patch-id: cc499b2ffd8c21315cd3760ed4107afc25b3f632
--
2.38.1
[-- Attachment #3: Type: text/plain, Size: 19 bytes --]
--
Thanks,
Maxim
next prev parent reply other threads:[~2022-12-07 3:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 14:58 bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH 宋文武
2020-12-03 16:58 ` Ludovic Courtès
2020-12-05 3:50 ` 宋文武
2020-12-07 9:08 ` Ludovic Courtès
2020-12-07 10:50 ` 宋文武
[not found] ` <874ju89edb.fsf@gmail.com>
2022-12-07 3:07 ` Maxim Cournoyer [this message]
2022-12-07 14:50 ` 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=87zgbz9ajg.fsf_-_@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=44924@debbugs.gnu.org \
--cc=control@debbugs.gnu.org \
--cc=iyzsong@outlook.com \
--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.