Building guile on x86_64 for aarch64 fails because of a missing guile

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Ludovic Courtès
  • Stefan
Owner
unassigned
Submitted by
Stefan
Severity
normal
S
S
Stefan wrote on 4 Jan 2021 16:32
(address . bug-guix@gnu.org)
780E2538-D765-456F-9D81-FF1A9C9B3C13@vodafonemail.de
Hi!

I setup my virtual x86_64 system with an qemu-binfmt-service-type for aarch64 and tried to build guix for aarch64. But this failed because of a missing guile:

stefan@guix ~$ guix build -s aarch64-linux guix@1.2.0-8.7624ebb
Folgende Ableitung wird erstellt:
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv wird erstellt …
while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
builder for `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed with exit code 1
Erstellung von /gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv fehlgeschlagen
Das Erstellungsprotokoll kann unter „/var/log/guix/drvs/4w/dh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv.bz2“ eingesehen werden.
guix build: error: build of `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed

I did a guix gc and then tried to build guile itself. But again it failed to build because it is missing guile itself.

stefan@guix ~$ guix build --check --no-grafts --system=aarch64-linux guile@3.0.2
24,0 MB werden heruntergeladen:
/gnu/store/6yw1j6n9rklnfgxs2fsi81fis23lvkjw-bash-minimal-5.0.16
Substituiere /gnu/store/z18hwxwgk551y4a0f6j1dxhmp208i4ha-bash-static-5.0.16 …
bash-static-5.0.16 502KiB 3.3MiB/s 00:00 [##################] 100.0%
/gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv wird erstellt …
while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
builder for `/gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv' failed with exit code 1
Erstellung von /gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv fehlgeschlagen
Das Erstellungsprotokoll kann unter „/var/log/guix/drvs/qa/15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv.bz2“ eingesehen werden.
guix build: error: build of `/gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv' failed

Then I thought to try to download the referred but missing guile:

Starting download of /tmp/guix-file.q3Qwo3
…62s2i8y7rl-guile-3.0.2 6.8MiB 5.6MiB/s 00:01 [##################] 100.0%
/gnu/store/5aq0m64wlh6mhi6g61z13asdnv8dmq3k-x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2
159d8i1yp0ksh7c9fib2ki7pljjhszk6l3bs9xibnx0kjh78rvli

Afterwards building guix for aarch64 was possible.


Bye

Stefan
S
S
Stefan wrote on 4 Jan 2021 19:08
(address . bug-guix@gnu.org)
F321ACC9-60D9-440A-901B-F4FAF2902662@vodafonemail.de
Hi!

Toggle quote (11 lines)
> Then I thought to try to download the referred but missing guile:
>
> stefan@guix ~$ guix download https://ci.guix.gnu.org/nar/lzip/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2
> Starting download of /tmp/guix-file.q3Qwo3
> From https://ci.guix.gnu.org/nar/lzip/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2...
> …62s2i8y7rl-guile-3.0.2 6.8MiB 5.6MiB/s 00:01 [##################] 100.0%
> /gnu/store/5aq0m64wlh6mhi6g61z13asdnv8dmq3k-x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2
> 159d8i1yp0ksh7c9fib2ki7pljjhszk6l3bs9xibnx0kjh78rvli
>
> Afterwards building guix for aarch64 was possible.

I was too optimistic with this, I didn't wait for the result before sending the e-mail.

Well, the rebuild failed again, as the freshly downloaded guile is not part of the build environment. So the same error happened again:

while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
builder for `/gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv' failed with exit code 1

This becomes a blocker now:

• There is no substitute of guix@1.2.0-8.7624ebb for aarch64.
• Due to https://issues.guix.gnu.org/41654 building locally an aarch64 is not possible for me.
• Due to ‘guix system’ not supporting ‘--without-test’ I can’t avoid that error when reconfiguring.
• Due to this error with a missing guile even building on x86_64 is impossible.
• Cross-building on x86_64 is possible but creates a derivation with a different hash. So it will not satisfy the need for a ‘guix system reconfigure’ on aarch64.


Bye

Stefan
E
E
Efraim Flashner wrote on 5 Jan 2021 13:25
Re: bug#45654: Building guile on x86_64 for aarch64 fails because of a missing guile
(name . Stefan)(address . stefan-guix@vodafonemail.de)(address . 45654@debbugs.gnu.org)
X/RavzutNlbnIc2W@3900XT
On Mon, Jan 04, 2021 at 07:08:24PM +0100, Stefan wrote:
Toggle quote (29 lines)
> Hi!
>
> > Then I thought to try to download the referred but missing guile:
> >
> > stefan@guix ~$ guix download https://ci.guix.gnu.org/nar/lzip/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2
> > Starting download of /tmp/guix-file.q3Qwo3
> > From https://ci.guix.gnu.org/nar/lzip/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2...
> > …62s2i8y7rl-guile-3.0.2 6.8MiB 5.6MiB/s 00:01 [##################] 100.0%
> > /gnu/store/5aq0m64wlh6mhi6g61z13asdnv8dmq3k-x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2
> > 159d8i1yp0ksh7c9fib2ki7pljjhszk6l3bs9xibnx0kjh78rvli
> >
> > Afterwards building guix for aarch64 was possible.
>
> I was too optimistic with this, I didn't wait for the result before sending the e-mail.
>
> Well, the rebuild failed again, as the freshly downloaded guile is not part of the build environment. So the same error happened again:
>
> while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
> builder for `/gnu/store/qa15xk65hfx8vhwbnff62iy6g8q9d764-guile-3.0.2.drv' failed with exit code 1
>
> This becomes a blocker now:
>
> • There is no substitute of guix@1.2.0-8.7624ebb for aarch64.
> • Due to <https://issues.guix.gnu.org/41654> building locally an aarch64 is not possible for me.
> • Due to ‘guix system’ not supporting ‘--without-test’ I can’t avoid that error when reconfiguring.
> • Due to this error with a missing guile even building on x86_64 is impossible.
> • Cross-building on x86_64 is possible but creates a derivation with a different hash. So it will not satisfy the need for a ‘guix system reconfigure’ on aarch64.
>

I just came across this today myself. try 'sudo herd restart
guix-daemon'. It's what made it suddenly start working for me (I
reconfigured to add qemu-binfmt service without restarting).

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl/0Wr8ACgkQQarn3Mo9
g1F5nBAAvh1Dm6vPJSY+EQftF51CMaVQ46d4MNlZ10mU7zF8MHA3m1wVZby6Q75v
neUJ7cvboERBx6ooUO+3p+kDuRXdCTasxW1NyATQM/oSfQJMeZTHloKl2Jsz+Stt
GdmcdJVjKdrZsrvl4D8K741iJkAwPvCUgTulnvbMAGyPOgo4l9YE/arjgJaFr/6P
nWRDt/nb2Uf6D6I7M2pVNfpIkcr6i2Cc/cKXIKY01yTJmEGF0PBA7wt0mV2/fyKO
5z6x2IMbitMhv3i4ulVTJs19e32NSurZL7S9Kvjy4EoyNwWxdUHcSEcHY/n1PZ2Q
VoPKfp/tptIVqcV4z1kuR42w5+YjzbWI3ynvGHsNKIDImYZuNlfJjYkdQBGCz0sX
yR7eiRcFwbmHgqGPgE+OzXoAQ/VAnEV2Y7b+50MBtWjcKWHTfuyPP1VRETyHrF6X
djg4E7nVmFtwcfAeCzR8r5hT6v1oiIo4rEzDzFm/la+cZTpQdYSkTkLNSqUhM/w2
iGDRQe1rmx9qGNPKN8596SAyt6YjQ6V8mgGZ2s4Z43ljZMW6WfA3/Zr7FwR/FZ2V
2BIdn/wrmWGgADNdm01vrIarselDfYGREffxJ5/oENK3u6L2bUgmTcHiOMPCWQBc
6AKanwVnja5PxtCNw0InbOJsYWYbCCchk7oPvogbLSG81yXOsCM=
=/CkU
-----END PGP SIGNATURE-----


S
S
Stefan wrote on 5 Jan 2021 15:55
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 45654@debbugs.gnu.org)
93BCD540-208C-4407-A0CD-2133F4CE96AE@vodafonemail.de
Hi Efraim!

Toggle quote (4 lines)
> I just came across this today myself. try 'sudo herd restart
> guix-daemon'. It's what made it suddenly start working for me (I
> reconfigured to add qemu-binfmt service without restarting).

Indeed I didn’t restart guix-daemon after the reconfigure. I looked through my console log again and I see that I did a reboot after facing this problem. So the guix-daemon should not have been the problem in the end.

I retried everything now: reconfigure, restart guix-daemon, build guix for aarch64, but unfortunately the problem remains.

Thanks for your response Efraim, it gives me some hope that I can escape my deadlock somehow.


stefan@guix ~$ sudo -E guix system reconfigure guix-system.scm
Passwort:
/gnu/store/bhz37cjjhqsfd26vrnlka6qxirqnw6q8-system
/gnu/store/7f385ijy7r9j3vxsisizhk7r9xpf2q5n-grub.cfg

System wird aktiviert …
making '/gnu/store/bhz37cjjhqsfd26vrnlka6qxirqnw6q8-system' the current system...
setting up setuid programs in '/run/setuid-programs'...
populating /etc from /gnu/store/xkd47jda21whyc70gfy4ackvlkmjaslp-etc...
`/gnu/store/4blizgsx21j1hfn4v25gs4235cq8ani7-openssh-authorized-keys/stefan' -> `/etc/ssh/authorized_keys.d/stefan'
Folgende Ableitungen werden erstellt:
/gnu/store/ipsj88x3bxm0i1ygs6sh03c87g3qq8lx-install-bootloader.scm.drv
/gnu/store/y201j3lz7cc5sxv4fx8094aan4dyaxps-module-import.drv

0,7 MB werden heruntergeladen
module-import-compiled 671KiB 2.0MiB/s 00:00 [##################] 100.0%

/gnu/store/y201j3lz7cc5sxv4fx8094aan4dyaxps-module-import.drv wird erstellt …
/gnu/store/ipsj88x3bxm0i1ygs6sh03c87g3qq8lx-install-bootloader.scm.drv wird erstellt …
guix system: Bootloader erfolgreich auf „/boot/efi“ installiert
0,0 MB werden heruntergeladen
module-import-compiled 24KiB 65KiB/s 00:00 [##################] 100.0%

Folgende Ableitung wird erstellt:
/gnu/store/jympl6hv53c7df6mm0jkjjzq0zzxi2yw-upgrade-shepherd-services.scm.drv

/gnu/store/jympl6hv53c7df6mm0jkjjzq0zzxi2yw-upgrade-shepherd-services.scm.drv wird erstellt …
shepherd: Service host-name has been started.
shepherd: Service user-homes has been started.
shepherd: Service host-name has been started.
shepherd: Service term-auto could not be started.
Um die Aktualisierung abzuschließen, können Sie für jeden Dienst, der
nicht automatisch neu gestartet werden konnte, „herd restart DIENST“
ausführen, um ihn anzuhalten, zu aktualisieren und neu zu starten.
Führen Sie „herd status“ aus, um die Dienste auf Ihrem System zu sehen.
stefan@guix ~$ sudo herd restart guix-daemon
Service guix-daemon has been stopped.
Service guix-daemon has been started.
stefan@guix ~$ guix build --system=aarch64-linux guix
Folgende Ableitung wird erstellt:
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv wird erstellt …
while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
builder for `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed with exit code 1
Erstellung von /gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv fehlgeschlagen
Das Erstellungsprotokoll kann unter „/var/log/guix/drvs/4w/dh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv.bz2“ eingesehen werden.
guix build: error: build of `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed


Bye

Stefan
S
S
Stefan wrote on 5 Jan 2021 18:20
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 45654@debbugs.gnu.org)
DDC7F9C1-AC99-4BDA-AAE1-FAC0EBD83895@vodafonemail.de
Hi!

I found a workaround, starting the guix-daemon manually with PATH and --disable-chroot:

stefan@guix ~$ sudo herd stop guix-daemon
Service guix-daemon has been stopped.
stefan@guix ~$ sudo PATH=/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin /gnu/store/ca91bk34z3hmzv5d8j5xi0z8f4riyx7m-guix-1.2.0-8.7624ebb/bin/guix-daemon --build-users-group guixbuild --max-silent-time 0 --timeout 0 --log-compression bzip2 --discover=no --substitute-urls https://ci.guix.gnu.org--disable-chroot &

Now ‘guix build --system=aarch64-linux guix’ is running, however, it is not finished yet.


Bye

Stefan
L
L
Ludovic Courtès wrote on 6 Jan 2021 12:14
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87v9cami5j.fsf@gnu.org
Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (2 lines)
>> while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory

[...]

Toggle quote (4 lines)
> I just came across this today myself. try 'sudo herd restart
> guix-daemon'. It's what made it suddenly start working for me (I
> reconfigured to add qemu-binfmt service without restarting).

For the record, this is necessary because when you reconfigure,
qemu-binfmt might set store file names that differ from those passed as
‘--chroot-directory’ options to guix-daemon.

To make sure both are in sync:

sudo herd restart qemu-binfmt
sudo herd restart guix-daemon

Stefan: I recommend against ‘--disable-chroot’ as anything could leak
into build processes.

Thanks,
Ludo’.
S
S
Stefan wrote on 6 Jan 2021 12:35
(name . Ludovic Courtès)(address . ludo@gnu.org)
AD2F7847-93C2-4692-8C32-B1D478F4D61A@vodafonemail.de
Hi Ludo’!

Toggle quote (3 lines)
> Stefan: I recommend against ‘--disable-chroot’ as anything could leak
> into build processes.

Thanks for your reply. I understand that ‘--disable-chroot’ is not a good idea. In the end my try building guix over night fails with test errors. As I wrote in the bug ticket, I even did a reboot after the reconfigure. But just restarting qemu-binfmt and guix-daemon is no solution in my case:

stefan@guix ~$ sudo herd restart qemu-binfmt
Service qemu-binfmt has been stopped.
Service qemu-binfmt has been started.
stefan@guix ~$ sudo herd restart guix-daemon
Service guix-daemon has been stopped.
Service guix-daemon has been started.
stefan@guix ~$ guix build --system=aarch64-linux guix
Folgende Ableitung wird erstellt:
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv
/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv wird erstellt …
while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory
builder for `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed with exit code 1
Erstellung von /gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv fehlgeschlagen
Das Erstellungsprotokoll kann unter „/var/log/guix/drvs/4w/dh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv.bz2“ eingesehen werden.
guix build: error: build of `/gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv' failed

I’ll now retry with

sudo -b env -i PATH=/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin /gnu/store/ca91bk34z3hmzv5d8j5xi0z8f4riyx7m-guix-1.2.0-8.7624ebb/bin/guix-daemon --build-users-group guixbuild --max-silent-time 0 --timeout 0 --log-compression bzip2 --discover=no --substitute-urls https://ci.guix.gnu.org--disable-chroot

What else could I try otherwise?


Bye

Stefan
L
L
Ludovic Courtès wrote on 6 Jan 2021 14:29
(name . Stefan)(address . stefan-guix@vodafonemail.de)
87pn2ikxc8.fsf@gnu.org
Hi Stefan,

Stefan <stefan-guix@vodafonemail.de> skribis:

Toggle quote (19 lines)
> Hi Ludo’!
>
>> Stefan: I recommend against ‘--disable-chroot’ as anything could leak
>> into build processes.
>
> Thanks for your reply. I understand that ‘--disable-chroot’ is not a good idea. In the end my try building guix over night fails with test errors. As I wrote in the bug ticket, I even did a reboot after the reconfigure. But just restarting qemu-binfmt and guix-daemon is no solution in my case:
>
> stefan@guix ~$ sudo herd restart qemu-binfmt
> Service qemu-binfmt has been stopped.
> Service qemu-binfmt has been started.
> stefan@guix ~$ sudo herd restart guix-daemon
> Service guix-daemon has been stopped.
> Service guix-daemon has been started.
> stefan@guix ~$ guix build --system=aarch64-linux guix
> Folgende Ableitung wird erstellt:
> /gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv
> /gnu/store/4wdh7yy6g7imycaz9c21vcmk9l97qnpv-guix-1.2.0-8.7624ebb.drv wird erstellt …
> while setting up the build environment: executing `/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile': No such file or directory

I have:

Toggle snippet (4 lines)
$ file /gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile
/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin/guile: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/ld-linux-aarch64.so.1, for GNU/Linux 2.6.32, not stripped

So ENOENT above means that the ELF interpreter of this file is not in
the build chroot, and that in turns almost certainly hints at an
inconsistency between the ‘--chroot-directory’ flags passed to
guix-daemon and the file name that shows up in
/proc/sys/fs/binfmt_misc/qemu-aarch64 (set up by ‘qemu-binfmt’).

I don’t see why restarting the two services has no effect. Could you
compare the output of:

guix gc -R $(cat /proc/sys/fs/binfmt_misc/qemu-aarch64 |grep interpreter|cut -d ' ' -f 2-)

with the ‘--chroot-directory’ flags shown by:

cat /proc/$(LC_ALL=C sudo -E herd status guix-daemon | grep Running| sed -'es/.* \([0-9]\+\).*/\1/g')/cmdline | xargs -0 echo

?

Toggle quote (4 lines)
> I’ll now retry with
>
> sudo -b env -i PATH=/gnu/store/x3gq648qnfnla7nppyfjvj62s2i8y7rl-guile-3.0.2/bin /gnu/store/ca91bk34z3hmzv5d8j5xi0z8f4riyx7m-guix-1.2.0-8.7624ebb/bin/guix-daemon --build-users-group guixbuild --max-silent-time 0 --timeout 0 --log-compression bzip2 --discover=no --substitute-urls https://ci.guix.gnu.org --disable-chroot

Setting PATH like this won’t make any difference.

HTH!

Ludo’.
S
S
Stefan wrote on 6 Jan 2021 19:00
(name . Ludovic Courtès)(address . ludo@gnu.org)
97F6E0D3-9E54-4290-9743-03A275838F53@vodafonemail.de
Hi Ludo’!

Thanks for caring!

Toggle quote (10 lines)
> I don’t see why restarting the two services has no effect. Could you
> compare the output of:
>
> guix gc -R $(cat /proc/sys/fs/binfmt_misc/qemu-aarch64 |grep interpreter|cut -d ' ' -f 2-)

>
> with the ‘--chroot-directory’ flags shown by:
>
> cat /proc/$(LC_ALL=C sudo -E herd status guix-daemon | grep Running| sed -'es/.* \([0-9]\+\).*/\1/g')/cmdline | xargs -0 echo

There were no ‘--chroot-directory’ flags in my case. So I wondered what is wrong and re-read the manual. I figured that I managed to copy-paste the ‘wrong’ example code from the “Transparent Emulation with QEMU” section into my operating-system definition, the first one. I was missing (guix-support? #t).

I know that I read the ‘guix-support’ documentation before changing my operating-system. I think in the end I copied the first example, I freshly navigated to the “Transparent Emulation with QEMU” chapter after looking-up something else, maybe also because it is mentioning the aarch64, which I needed.

So now it is working. Thanks again for you support. :-)

Would you accept a patch for the manual to contain (guix-support? #t) in the first example as well?

Actually I would even prefer a default change of ‘guix-support’ to #t.

Would it also possible to print some proper error message, if guix build is used with an unsupported ‘--system’ argument.


Bye

Stefan
L
L
Ludovic Courtès wrote on 7 Jan 2021 09:24
(name . Stefan)(address . stefan-guix@vodafonemail.de)
87pn2hjgt5.fsf@gnu.org
Hi,

Stefan <stefan-guix@vodafonemail.de> skribis:

Toggle quote (2 lines)
> There were no ‘--chroot-directory’ flags in my case. So I wondered what is wrong and re-read the manual. I figured that I managed to copy-paste the ‘wrong’ example code from the “Transparent Emulation with QEMU” section into my operating-system definition, the first one. I was missing (guix-support? #t).

Ah ha!

Toggle quote (4 lines)
> Would you accept a patch for the manual to contain (guix-support? #t) in the first example as well?
>
> Actually I would even prefer a default change of ‘guix-support’ to #t.

Yeah, we should probably change the default to #t if nobody disagrees.

The downsides I can see are: (1) changing defaults in general means
breaking user assumptions, and (2) setting ‘guix-support?’ means that
the build environment is no longer completely hermetic (it contains
extra store items), though it’s arguably still very much under control.

Overall, it’s probably OK.

Could you send a patch?

Toggle quote (1 lines)
> Would it also possible to print some proper error message, if guix build is used with an unsupported ‘--system’ argum
ent.

I don’t think so: all we get is ENOENT from execve(2). There’s no way
to distinguish this kind of ENOENT from the other kind of ENOENT.

Thanks,
Ludo’.
S
S
Stefan wrote on 7 Jan 2021 21:44
[PATCH 1/1] gnu: qemu-binfmt-service-type: Change 'guix-support?' default to #t.
(name . Ludovic Courtès)(address . ludo@gnu.org)
B28D8A12-8921-40F5-B78D-108B92DA1176@vodafonemail.de
* gnu/services/virtualization.scm (qemu-binfmt-service-type)[guix-support?]:
Change the default from #f to #t.
* doc/guix.texi (Transparent Emulation with QEMU): Change the default of
‘guix-support?’ from #f to #t. Describe the implication of setting it to #f.
---
doc/guix.texi | 8 +++++++-
gnu/services/virtualization.scm | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)

Toggle diff (41 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 884224fce6..3a22709821 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -27221,7 +27221,7 @@ This is the configuration for the @code{qemu-binfmt} service.
The list of emulated QEMU platforms. Each item must be a @dfn{platform
object} as returned by @code{lookup-qemu-platforms} (see below).
-@item @code{guix-support?} (default: @code{#f})
+@item @code{guix-support?} (default: @code{#t})
When it is true, QEMU and all its dependencies are added to the build
environment of @command{guix-daemon} (@pxref{Invoking guix-daemon,
@option{--chroot-directory} option}). This allows the @code{binfmt_misc}
@@ -27250,6 +27250,12 @@ build}, transparently using QEMU to emulate the ARMv7 CPU. Pretty handy
if you'd like to test a package build for an architecture you don't have
access to!
+When @code{guix-support?} is set to @code{#f}, then of course programs for
+other architectures can still be executed transparently, but invoking commands
+like @command{guix build -s armhf-linux inksake} will fail with an unobvious
+error that @command{guile} cannot be executed. However, the build environment
+of @command{guix-daemon} then needs less store items.
+
@item @code{qemu} (default: @code{qemu})
The QEMU package to use.
@end table
diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index f435630faf..2f5a258bfe 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -717,7 +717,7 @@ potential infinite waits blocking libvirt."))
(platforms qemu-binfmt-configuration-platforms
(default '())) ;safest default
(guix-support? qemu-binfmt-configuration-guix-support?
- (default #f)))
+ (default #t)))
(define (qemu-platform->binfmt qemu platform)
"Return a gexp that evaluates to a binfmt string for PLATFORM, using the
--
2.29.2
L
L
Ludovic Courtès wrote on 16 Jan 2021 22:39
Re: [PATCH 1/1] gnu: qemu-binfmt-service-type: Change 'guix-support?' default to #t.
(name . Stefan)(address . stefan-guix@vodafonemail.de)
87h7ngy323.fsf@gnu.org
Hi Stefan,

Stefan <stefan-guix@vodafonemail.de> skribis:

Toggle quote (5 lines)
> * gnu/services/virtualization.scm (qemu-binfmt-service-type)[guix-support?]:
> Change the default from #f to #t.
> * doc/guix.texi (Transparent Emulation with QEMU): Change the default of
> ‘guix-support?’ from #f to #t. Describe the implication of setting it to #f.

I’ve shrinked and tweaked the doc and applied it.

Thanks!

Ludo’.
Closed
?