guix build u-boot-pinebook --with-git-url failed due to "source" in C_INCLUDE_PATH

DoneSubmitted by 宋文武.
Details
2 participants
  • 宋文武
  • Ludovic Courtès
Owner
unassigned
Severity
normal
宋文武 wrote on 28 Nov 2020 15:58
(address . bug-guix@gnu.org)
TYAP286MB018562975536727DAE1128FCA3F70@TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
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`.
L
L
Ludovic Courtès wrote on 3 Dec 2020 17:58
(name . 宋文武)(address . iyzsong@outlook.com)(address . 44924@debbugs.gnu.org)
87mtyuddyc.fsf@gnu.org
Hi,

宋文武 <iyzsong@outlook.com> skribis:

Toggle quote (9 lines)
> 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’?

Toggle quote (3 lines)
> 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’.
宋文武 wrote on 5 Dec 2020 04:50
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 44924@debbugs.gnu.org)
TYAP286MB01854DDDE3EAA98E87C7F6E2A3F00@TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (15 lines)
> 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".

Toggle quote (6 lines)
>
>> 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:
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.


* 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(-)

Toggle diff (17 lines)
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
Thanks!
L
L
Ludovic Courtès wrote on 7 Dec 2020 10:08
(name . 宋文武)(address . iyzsong@outlook.com)(address . 44924@debbugs.gnu.org)
87mtyq0yqi.fsf@gnu.org
Hi,

宋文武 <iyzsong@outlook.com> skribis:

Toggle quote (14 lines)
> 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’.
宋文武 wrote on 7 Dec 2020 11:50
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 44924-done@debbugs.gnu.org)
TYAP286MB01859B8EC95593E703B9FE11A3CE0@TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM
Toggle quote (7 lines)
> 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!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 44924@debbugs.gnu.org