all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ian Eure" <ian@retrospec.tv>
To: help-guix@gnu.org
Subject: Re: Compiling aarch64-linux packages on x86_64-linux
Date: Sun, 05 Jan 2025 23:26:54 +0000	[thread overview]
Message-ID: <3234a23a-580d-41da-a025-a5772bf97eda@app.fastmail.com> (raw)
In-Reply-To: <87sepxb0k9.fsf@retrospec.tv>

Hi all,

Not sure why this was needed, but running:

    $ sudo herd restart file-system-/proc/sys/fs/binfmt_misc

...solved the problem for me.  I assume a reboot would have as well.  I'm not sure why this was needed -- seems like it shouldn't be -- but at least builds are building for me now.

  -- Ian

On Sun, Jan 5, 2025, at 6:03 PM, Ian Eure wrote:
> 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


      reply	other threads:[~2025-01-05 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-05 18:03 Compiling aarch64-linux packages on x86_64-linux Ian Eure
2025-01-05 23:26 ` Ian Eure [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3234a23a-580d-41da-a025-a5772bf97eda@app.fastmail.com \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.