%current-target-system is #f for packages in the system profile, during system cross-compilation

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Mathieu Othacehe
Severity
normal
M
M
Mathieu Othacehe wrote on 29 Nov 2020 20:48
Guix cross-compilation is broken.
(address . bug-guix@gnu.org)
87y2ikosf1.fsf@gnu.org
Hello,

When I pushed this patchset[1], I didn't anticipate that Avahi depends
on glib which doesn't cross-compile. To fix the situation, I pushed
d9f05c70a6af1087de1717ff20036efa1afef5fb and
35a32fefb4695442265809805145b7a262ae4988.

While, it now allows to build and cross-build Guix, there's still an
issue when evaluating the "guix-master" specification with the CI.
It looks like "%current-target-system" doesn't have the expected value
in the propagated-inputs.

There's a backtrace of the situation as attachment. I'd like to find a
quick fix instead of reverting everything. Maybe removing "guile-avahi"
from the propagated-inputs of Guix could work. I'm not sure why it's
needed anyway because this library is already added to the wrapped guix
binary.

Thanks,

Mathieu
Attachment: trace.txt
L
L
Ludovic Courtès wrote on 1 Dec 2020 00:12
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 44952-done@debbugs.gnu.org)
87eekajv6v.fsf@gnu.org
Hi!

Mathieu Othacehe <othacehe@gnu.org> skribis:

Toggle quote (10 lines)
> When I pushed this patchset[1], I didn't anticipate that Avahi depends
> on glib which doesn't cross-compile. To fix the situation, I pushed
> d9f05c70a6af1087de1717ff20036efa1afef5fb and
> 35a32fefb4695442265809805145b7a262ae4988.
>
> While, it now allows to build and cross-build Guix, there's still an
> issue when evaluating the "guix-master" specification with the CI.
> It looks like "%current-target-system" doesn't have the expected value
> in the propagated-inputs.

One way to reproduce it is:

Toggle snippet (4 lines)
$ ./pre-inst-env guix build -e '((@ (gnu system image) system-image) (@ (gnu system images hurd) hurd-barebones-qcow2-image))' -n --no-grafts
guix build: error: gnu/packages/glib.scm:181:2: glib@2.62.6: build system `meson' does not support cross builds

or:

Toggle snippet (15 lines)
scheme@(guile-user)> ,use(gnu system images hurd)
scheme@(guile-user)> ,use(gnu image)
scheme@(guile-user)> ,use(guix)
scheme@(guile-user)> ,use(guix grafts)
scheme@(guile-user)> (%graft? #f)
$2 = #t
scheme@(guile-user)> ,use(gnu system image)
scheme@(guile-user)> (with-store s (run-with-store s (lower-object (system-image hurd-barebones-qcow2-image))))
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
ERROR:
1. &package-cross-build-system-error: #<package glib@2.62.6 gnu/packages/glib.scm:181 7f986f1ea780>

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.

The problem here is that, when populating in ‘packages->manifest’,
called from ‘packages->profile-entry’ in (gnu services),
(%current-target-system) is #false.

This is fixed by commit 07a33b1d21e240781072352f93206cfdc765f907.

Sorry that this spoiled the pleasure of merging service discovery
support!

Thanks,
Ludo’.
Closed
L
L
Ludovic Courtès wrote on 1 Dec 2020 00:13
control message for bug #44952
(address . control@debbugs.gnu.org)
87czzujv4w.fsf@gnu.org
retitle 44952 %current-target-system is #f for packages in the system profile, during system cross-compilation
quit
M
M
Mathieu Othacehe wrote on 1 Dec 2020 09:46
Re: bug#44952: Guix cross-compilation is broken.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 44952-done@debbugs.gnu.org)
871rg952x0.fsf@gnu.org
Hey,

Toggle quote (5 lines)
> This is fixed by commit 07a33b1d21e240781072352f93206cfdc765f907.
>
> Sorry that this spoiled the pleasure of merging service discovery
> support!

Oh what a relieve to see you've fixed it. I had indeed a bad time
discovering the cross-compilation issues just after merging. I guess my
tests were a bit light.

Anyway, many thanks for your support here.

Mathieu
Closed
?