Multipass arm64 architecture build on core20

Hi guys,

I am trying to use multipass to accelerate my snap building process. I am building the snap for use on a RPi with a core20 image, however, building using lxd on the RPi is slower than I would like. As a result, I want to use MacOSX to build the snap and test the snap using core20 multipass images.

I want to have the snap built for use on arm64 so I specified that in the snapcraft.yaml:

name: testapp
version: '0.1'
#version-script: git describe --abbrev=1 --tags
summary: python test package
description: |
 test app for python
     - build-on: arm64
       run-on: arm64
base: core20
grade: stable
confinement: strict

    command: bin/hello
      - home
      - network-bind
    plugin: python
    source: .
      - ncbi-blast+

When I multipass list the image seems to adhere to my base specification:

Name                    State             IPv4             Image
snapcraft-testapp       Delayed Shutdown     Ubuntu Snapcraft builder for Core 20

However the build environment and .snap file is using an amd64 architecture. Is there anyone else that has experienced this and can lend some insight?

Many thanks,

Hi @csdesign, welcome!

Unfortunately there is no currently available cross-build capability supported by snapcraft. Neither multipass or LXD will allow you create arm64 instances on an amd64 host, and even if they did, I don’t know that I would assume your performance would be improved – the last time I booted qemu aarch64 on my laptop it was quite slow (but have never benchmarked it, so perhaps I am wrong).

If it is open source you can consider using or snapcraft remote-build.

Thanks for your help! Would be nice if we could have cross platform support but Ill take what I can get.

Just a note that in addition to what @cjp256 said, I don’t think multipass supports running Ubuntu Core 20 images yet, if you really mean to be running Ubuntu Core 20 via multipass.

1 Like

It doesn’t. Hopefully soon though. :confused: