ludo@gnu.org (Ludovic Courtès) skribis: > Mark H Weaver skribis: > >> It would be great if we had a build hook to enable guix-daemon to >> natively build packages for any system supported by qemu, by running the >> build processes within qemu. > > QEMU has a ‘qemu-binfmt-conf.sh’ script that installs binfmt_misc > handlers for all the architecture-specific ELF variants. Once you’ve > run this script, you can transparently run, say, ARM executables (the > kernel takes care of invoking ‘qemu-arm’ for you). [...] > Then we just need to tell the daemon to not complain (“but I’m an > 'x86_64-linux'”). The attached patch does that. However, there’s an added complication: the file name of the qemu-* executables registered in binfmt_misc are apparently resolved relative to the root directory of the process that does ‘execve’. So we would need to add a guix-daemon --chroot-directory=DIR argument for each element in the closure of QEMU. Not great. Thoughts? Ludo’.