* bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH @ 2020-11-28 14:58 宋文武 2020-12-03 16:58 ` Ludovic Courtès 0 siblings, 1 reply; 7+ messages in thread From: 宋文武 @ 2020-11-28 14:58 UTC (permalink / raw) To: 44924 Running: guix build u-boot-pinebook \ --with-git-url=u-boot-pinebook=https://github.com/u-boot/u-boot Would fail with "fatal error: asm/string.h: No such file or directory". And it's caused by the first entry in C_INCLUDE_PATH, which is "/gnu/store/xxx-u-boot-xxx/include". I think we should filter out "source" in `set-paths` of the `gnu-build-system`. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH 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 ` 宋文武 0 siblings, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2020-12-03 16:58 UTC (permalink / raw) To: 宋文武; +Cc: 44924 Hi, 宋文武 <iyzsong@outlook.com> skribis: > Running: > guix build u-boot-pinebook \ > --with-git-url=u-boot-pinebook=https://github.com/u-boot/u-boot > > Would fail with "fatal error: asm/string.h: No such file or directory". > > And it's caused by the first entry in C_INCLUDE_PATH, which is > "/gnu/store/xxx-u-boot-xxx/include". Why don’t we have that problem when omitting ‘--with-git-url’? > I think we should filter out "source" in `set-paths` of the > `gnu-build-system`. Yes, sounds like a good idea. We can do it in ‘core-updates’. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* 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 [not found] ` <874ju89edb.fsf@gmail.com> 0 siblings, 2 replies; 7+ messages in thread From: 宋文武 @ 2020-12-05 3:50 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 44924 [-- Attachment #1: Type: text/plain, Size: 765 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > Hi, > > 宋文武 <iyzsong@outlook.com> skribis: > >> Running: >> guix build u-boot-pinebook \ >> --with-git-url=u-boot-pinebook=https://github.com/u-boot/u-boot >> >> Would fail with "fatal error: asm/string.h: No such file or directory". >> >> And it's caused by the first entry in C_INCLUDE_PATH, which is >> "/gnu/store/xxx-u-boot-xxx/include". > > Why don’t we have that problem when omitting ‘--with-git-url’? When not use git, source is a tarball, not a directory, so it's ignored by "set-paths". > >> I think we should filter out "source" in `set-paths` of the >> `gnu-build-system`. > > Yes, sounds like a good idea. We can do it in ‘core-updates’. Here is patch: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-build-system-gnu-Remove-the-source-directory-from-se.patch --] [-- Type: text/x-patch, Size: 1150 bytes --] From 77283132c6eeeb75900afad5782b989ceee1506a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@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))) -- 2.29.1 [-- Attachment #3: Type: text/plain, Size: 10 bytes --] Thanks! ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH 2020-12-05 3:50 ` 宋文武 @ 2020-12-07 9:08 ` Ludovic Courtès 2020-12-07 10:50 ` 宋文武 [not found] ` <874ju89edb.fsf@gmail.com> 1 sibling, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2020-12-07 9:08 UTC (permalink / raw) To: 宋文武; +Cc: 44924 Hi, 宋文武 <iyzsong@outlook.com> skribis: > From 77283132c6eeeb75900afad5782b989ceee1506a Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@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(-) LGTM! You can push it right away to ‘core-updates’, but since it triggers a full rebuild, now’s a good time to push another change that triggers a full rebuild. :-) Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH 2020-12-07 9:08 ` Ludovic Courtès @ 2020-12-07 10:50 ` 宋文武 0 siblings, 0 replies; 7+ messages in thread From: 宋文武 @ 2020-12-07 10:50 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 44924-done > LGTM! > > You can push it right away to ‘core-updates’, but since it triggers a > full rebuild, now’s a good time to push another change that triggers a > full rebuild. :-) > Pushed bravely, thank you! ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <874ju89edb.fsf@gmail.com>]
* bug#44924: [PATCH v2 core-updates] build: gnu-build-system: Remove source from native inputs. [not found] ` <874ju89edb.fsf@gmail.com> @ 2022-12-07 3:07 ` Maxim Cournoyer 2022-12-07 14:50 ` bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH Maxim Cournoyer 0 siblings, 1 reply; 7+ messages in thread From: Maxim Cournoyer @ 2022-12-07 3:07 UTC (permalink / raw) To: 宋文武; +Cc: 44924, GNU Debbugs, Ludovic Courtès [-- 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 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH 2022-12-07 3:07 ` bug#44924: [PATCH v2 core-updates] build: gnu-build-system: Remove source from native inputs Maxim Cournoyer @ 2022-12-07 14:50 ` Maxim Cournoyer 0 siblings, 0 replies; 7+ messages in thread From: Maxim Cournoyer @ 2022-12-07 14:50 UTC (permalink / raw) To: 宋文武; +Cc: 44924-done, Ludovic Courtès Hello, Maxim Cournoyer <maxim.cournoyer@gmail.com> writes: > Hi again, > > Here's a v2, which guards against a #f native-inputs (when no > cross-compiling). Pushed to core-updates with commit 6454208222. Closing! -- Thanks, Maxim ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-07 14:51 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` bug#44924: [PATCH v2 core-updates] build: gnu-build-system: Remove source from native inputs Maxim Cournoyer 2022-12-07 14:50 ` bug#44924: guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH Maxim Cournoyer
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).