snapcraft cannot build snap by default on aarch64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
On aarch64 architecture calling the snapcraft command without additional options doesn't work.
Indeed, snapcraft tries to launch a multipass instance based on the image snapcraft:core20. This image doesn't seem to exist on arm (not listed in `multipass list` on arm64 while listed on amd64)
To reproduce this behaviour on an aarch64 ubuntu:
sudo snap install snapcraft --classic
snapcraft init
snapcraft
Then we get this error:
Launching a VM.
warning: "--mem" long option will be deprecated in favour of "--memory" in a future release.Please update any scripts, etc.
launch failed: Unable to find an image matching "core20". Please use `multipass find` for supported remotes and images.
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again.
snapcraft --version
snapcraft 7.3.1
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
Thanks for raising this!
I can confirm this behavior. The root cause is that Mulitpass's images for snapcraft are only available on amd64.
There are 2 parts to the solution: /github. com/canonical/ craft-providers /issues/ 211)
1. craft-providers should give a more useful error message and link to documentation (tracking here: https:/
2. snapcraft (and other craft applications) should default to use lxd when the host architecture is not amd64
I'll wait on @townsend to chime in. We may not need to implement #2 if it's possible for the Multipass team to work with the Launchpad team and release snapcraft images on other architectures.
I wonder, what is the user story for running snapcraft on MacOS on Apple silicon?