Building for different architectures

Some of the posts regarding multiple architectures are quite old so I wanted to check what is the most up to date strategy for building using snapcraft for different architectures.
I am currently using multipass to build on amd64 and run the resulting snap on another amd64 device.
I want to now build using multipass a snap or snaps that will run on amd64 and armhf.
For starters I added to my snapcraft file:
- build-on: amd64
run-on: armhf

The I build using snapcraft --target-arch=armhf.
The build completed, but the resulting snap did not run on the armhf paltform (raspberry-pi). No obvious errors reported, I need to dig more, but probably the snap had fundamental issues.
Any advice appreciated. I would really prefer NOT to have to build on armhf (raspberry-pi).

1 Like