From: Ian Eure <ian@retrospec.tv>
To: help-guix@gnu.org
Subject: Compiling aarch64-linux packages on x86_64-linux
Date: Sun, 05 Jan 2025 10:03:18 -0800 [thread overview]
Message-ID: <87sepxb0k9.fsf@retrospec.tv> (raw)
In "(guix) Additional Build Options", documenting the --system
option,
the Guix manual says:
Similarly, when transparent emulation with QEMU and
‘binfmt_misc’
is enabled (*note ‘qemu-binfmt-service-type’: Virtualization
Services.), you can build for any system for which a QEMU
‘binfmt_misc’ handler is installed.
So, I added this -- the exact configuration from "(guix)
Virtualization Services" in the manual -- to my operating-system’s
services:
(service qemu-binfmt-service-type
(qemu-binfmt-configuration
(platforms (lookup-qemu-platforms "arm"
"aarch64"))))
And `guix system reconfigure'd. The service is running:
# herd status qemu-binfmt
Status of qemu-binfmt:
It is running since Mon Dec 30 20:47:07 2024 (6 days ago).
Running value is #t.
It is enabled.
Provides: qemu-binfmt
Requires: file-system-/proc/sys/fs/binfmt_misc
Will be respawned.
If I try to build a package with --system specified, it fails due
to the wrong architecture:
$ guix build --system=aarch64-linux guix
The following derivation will be built:
/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv
building
/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv...
@ unsupported-platform
/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv
aarch64-linux
while setting up the build environment: a `aarch64-linux' is
required to build
`/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv',
but I am a `x86_64-linux'
builder for
`/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv'
failed with exit code 1
build of
/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv
failed
View build log at
'/var/log/guix/drvs/6w/wbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv.gz'.
guix build: error: build of
`/gnu/store/6wwbzsry0c3sm5s0aifgj4sfzahmkk30-guix-1.4.0-31.121e96d.drv'
failed
The "(guix) Native Builds" part of the manual mentions that this
error will occur "If the ‘binfmt_misc’ mechanism is not setup
correctly..."
What is the correct way to set Guix up so I can build
aarch64-linux packages on x86_64-linux?
Thanks,
-- Ian
next reply other threads:[~2025-01-05 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 18:03 Ian Eure [this message]
2025-01-05 23:26 ` Compiling aarch64-linux packages on x86_64-linux Ian Eure
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sepxb0k9.fsf@retrospec.tv \
--to=ian@retrospec.tv \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).