[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Qemu binfmt on foreign distro
From: |
Mathieu Othacehe |
Subject: |
Qemu binfmt on foreign distro |
Date: |
Thu, 21 Nov 2019 11:01:31 +0100 |
User-agent: |
mu4e 1.2.0; emacs 26.3 |
Hello,
When running a guix build command with --system argument set to a
foreign architecture, guix-daemon will use linux binfmt mechanism to
emulate binary execution.
On a Guix system, the qemu-binfmt-service-type service has to be
installed, so that linux binfmt mechanism is hooked to QEMU. This
service also adds a bunch of "--chroot-directory" arguments to
guix-daemon command line, so that QEMU and all its dependencies are
accessible from the guix-daemon chroot.
On a foreign distro, one can install QEMU and setup the binfmt mechanism
(installing binfmt-support and qemu-user-static packages on
Ubuntu). However, without the proper --chroot-directory arguments passed
to guix-daemon, all binaries execution relying on binfmt will throw
ENOENT from within the guix-daemon.
So I can see two solutions here:
* Remove --system argument support for guix on foreign distributions
(except when using this argument does not require binfmt support, 32
bits build on a 64 bits machine).
* Provide some kind of script that generates the correct guix-daemon
command line, enabling binfmt support on foreign distros.
Anyhow, the current behaviour where guix build --system=... fails
misteriously because of an ENOENT error on a foreign distro is not
acceptable in my opinion.
What do you think?
Thanks,
Mathieu
- Qemu binfmt on foreign distro,
Mathieu Othacehe <=