Cross-Compiling Snaps for Core24: Building on AMD64 for ARM64

What is the current state of cross-compiling snaps for Core24? Specifically, is it possible to build snaps for ARM64 on an AMD64 machine?

On Core20, I was able to use the --target-arch and --enable-experimental-target-arch flags to achieve this. Outside of Snapcraft, I can cross-compile most software using CMake and appropriate toolchains. I cannot use Launchpad build farms, as the software is proprietary, and I don’t currently have access to a decent ARM64 build server.

For Core24, is there a way to emulate ARM64 for snap builds, or is building directly on an ARM64 machine still required?

We’ve recently improved cross-compiling for core24. See this how-to for more information. It’s currently only available on the latest/edge channel, but will be included in the Snapcraft 8.8 release later this month.

2 Likes