* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
@ 2023-08-11 11:10 Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-08-11 11:43 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2023-08-11 11:10 UTC (permalink / raw)
To: 65225
Hi,
ekaitz noticed this when building a mes-derived package that fails on
x86_64. Here's a reproducer that uses upstream Guix:
$ guix shell --system=riscv64-linux drawterm --no-grafts --rebuild-cache
--dry-run | grep drv$
/gnu/store/4c02fgswkbldys93w4vgj0gwax2ly4bh-profile.drv
$ guix build --dry-run
/gnu/store/4c02fgswkbldys93w4vgj0gwax2ly4bh-profile.drv | grep drawterm
/gnu/store/mkxyhjq117wdalc0gbz4468blqxih1kn-drawterm-20210628-1.c97fe46
/gnu/store/h8dk35aw2n8rj1hki6dkdrknfly26vq8-drawterm-20210628-1.c97fe46
/gnu/store/fl4iimlcdnlkarjm8m6z3392wss6b8yr-drawterm-20210628-1.c97fe46.drv
→
/gnu/store/mkxyhjq117wdalc0gbz4468blqxih1kn-drawterm-20210628-1.c97fe46
is riscv64-linux.
/gnu/store/9a1pji59hzacrmpb65nk3pp3m01niqf3-drawterm-20210628-1.c97fe46.drv
→
/gnu/store/h8dk35aw2n8rj1hki6dkdrknfly26vq8-drawterm-20210628-1.c97fe46
is x86_64-linux.
Eventually the ‘correct’ riscv64 drawterm ends up in the shell, but Guix
should never have built the x86_64 version.
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
2023-08-11 11:10 bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2023-08-11 11:43 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-08-11 15:58 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2023-08-11 11:43 UTC (permalink / raw)
To: 65225
Oh, OK.
Parts of scripts/shell.scm (and perhaps environment.scm) assume that
$ guix build --system={x86_64,riscv64}-linux foo
is equivalent to
$ guix build --system=riscv64-linux foo
It's not. This includes and causes things like commit
9c513303156b418567b9d2cde9f8df66190051ac. There's a lot of fast & loose
assoc-reffing going on here that makes me nervous.
Anyway, I'll get me to a PC and then fix the code that's injecting a
spurious extra ‘(system . (%current-system))’ that's causing these
double builds. Simple™.
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
2023-08-11 11:43 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
@ 2023-08-11 15:58 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
0 siblings, 0 replies; 7+ messages in thread
From: Tobias Geerinckx-Rice via Bug reports for GNU Guix @ 2023-08-11 15:58 UTC (permalink / raw)
To: 65225
Oh OK.
> the code that's injecting a spurious extra ‘(system .
> (%current-system))’ that's causing these double builds
is not actually the problem. Instead, the profile hooks are
unconditionally built for the host's (%current-system). Forcing them to
match ‘--system=’ does the trick. Simple™!
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
[not found] <cover.1697726601.git.ludo@gnu.org>
@ 2023-10-20 22:46 ` Maxim Cournoyer
2023-10-23 10:16 ` Simon Tournier
2023-10-23 10:36 ` bug#65225: [bug#66640] [PATCH 0/2] Build profile hooks for the right system Simon Tournier
1 sibling, 1 reply; 7+ messages in thread
From: Maxim Cournoyer @ 2023-10-20 22:46 UTC (permalink / raw)
To: Ludovic Courtès
Cc: Josselin Poiret, 65225, Mathieu Othacehe, Tobias Geerinckx-Rice,
Ricardo Wurmus, Christopher Baines, Simon Tournier, guix-patches
Hi,
Ludovic Courtès <ludo@gnu.org> writes:
> Hello Guix,
>
> This fixes <https://issues.guix.gnu.org/65225>, ensuring that profile
> hooks are built for the right system. It does so by passing each
> profile hook the targeted system.
>
> Thoughts?
>
> Thanks,
> Ludo'.
>
> Ludovic Courtès (2):
> packages: Add ‘system’ parameter for ‘set-guile-for-build’.
> profiles: Hooks honor the #:system parameter of ‘profile-derivation’.
>
> gnu/bootloader.scm | 5 +++--
> guix/channels.scm | 3 ++-
> guix/packages.scm | 7 ++++---
> guix/profiles.scm | 49 ++++++++++++++++++++++++++++++----------------
> tests/profiles.scm | 24 ++++++++++++++++++++++-
> 5 files changed, 64 insertions(+), 24 deletions(-)
I see the cover letter, but not the patches :-). Where did they go?
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
2023-10-20 22:46 ` bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Maxim Cournoyer
@ 2023-10-23 10:16 ` Simon Tournier
2023-10-23 14:29 ` Maxim Cournoyer
0 siblings, 1 reply; 7+ messages in thread
From: Simon Tournier @ 2023-10-23 10:16 UTC (permalink / raw)
To: Maxim Cournoyer, Ludovic Courtès
Cc: Josselin Poiret, 65225, Mathieu Othacehe, Tobias Geerinckx-Rice,
Ricardo Wurmus, Christopher Baines, guix-patches
Hi Maxim,
On Fri, 20 Oct 2023 at 18:46, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> I see the cover letter, but not the patches :-). Where did they go?
They are in #66640 [1]. The cover letter had been CC:
65225@debbugs.gnu.org, I guess.
1: https://issues.guix.gnu.org/issue/66640
Cheers,
simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: [bug#66640] [PATCH 0/2] Build profile hooks for the right system
[not found] <cover.1697726601.git.ludo@gnu.org>
2023-10-20 22:46 ` bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Maxim Cournoyer
@ 2023-10-23 10:36 ` Simon Tournier
1 sibling, 0 replies; 7+ messages in thread
From: Simon Tournier @ 2023-10-23 10:36 UTC (permalink / raw)
To: Ludovic Courtès, 66640
Cc: Josselin Poiret, 65225, Mathieu Othacehe, Ludovic Courtès,
Tobias Geerinckx-Rice, Ricardo Wurmus, Christopher Baines
Hi Ludo,
A naive question about the default value.
On Thu, 19 Oct 2023 at 16:48, Ludovic Courtès <ludo@gnu.org> wrote:
> packages: Add ‘system’ parameter for ‘set-guile-for-build’.
The change reads,
--8<---------------cut here---------------start------------->8---
+(define* (set-guile-for-build guile #:optional system)
[...]
+ (let ((guile (package-derivation store guile
+ (or system (%current-system)))))
--8<---------------cut here---------------end--------------->8---
> profiles: Hooks honor the #:system parameter of ‘profile-derivation’.
The change reads for all hooks,
--8<---------------cut here---------------start------------->8---
+ (define* (efi-bootloader-profile-hook manifest #:optional system)
[...]
(gexp->derivation "efi-bootloader-profile"
build
+ #:system system
--8<---------------cut here---------------end--------------->8---
Do I understand correctly when I consider that
’(efi-bootloader-profile-hook manifest)’ pass #false as ’system’ and
then it is ’set-guile-for-build’ that sets ’(%current-system)’?
Somehow, my question is about the readability of default values.
Why not,
#:system (or system (%current-system))
for all the hooks?
Cheers,
simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#65225: ‘guix shell --system=ALIEN’ builds for both systems
2023-10-23 10:16 ` Simon Tournier
@ 2023-10-23 14:29 ` Maxim Cournoyer
0 siblings, 0 replies; 7+ messages in thread
From: Maxim Cournoyer @ 2023-10-23 14:29 UTC (permalink / raw)
To: Simon Tournier
Cc: Josselin Poiret, 65225, Mathieu Othacehe, Ludovic Courtès,
Tobias Geerinckx-Rice, Ricardo Wurmus, Christopher Baines,
guix-patches
Hi Simon,
Simon Tournier <zimon.toutoune@gmail.com> writes:
> Hi Maxim,
>
> On Fri, 20 Oct 2023 at 18:46, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>
>> I see the cover letter, but not the patches :-). Where did they go?
>
> They are in #66640 [1]. The cover letter had been CC:
> 65225@debbugs.gnu.org, I guess.
Thanks!
--
Maxim
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-23 14:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1697726601.git.ludo@gnu.org>
2023-10-20 22:46 ` bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Maxim Cournoyer
2023-10-23 10:16 ` Simon Tournier
2023-10-23 14:29 ` Maxim Cournoyer
2023-10-23 10:36 ` bug#65225: [bug#66640] [PATCH 0/2] Build profile hooks for the right system Simon Tournier
2023-08-11 11:10 bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-08-11 11:43 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
2023-08-11 15:58 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
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).