Cross build with core20

So far I have been able to build my snaps for different archs using this command: docker run -v /tmp/snapData:/build -w /build snapcore/snapcraft:stable snapcraft --target-arch=arm64

After switching to core20, this error message appears:

–target-arch has been deprecated and is no longer supported on core20.

I could not find anything, how to create snaps based on core20 for different platforms. How can I do that?

--target-arch has been prefixed with an experimental tag, try --experimental-target-arch=

1 Like

Thank you ogra. After switching to newest version of snapcraft, I was able to create my snap via snapcraft --enable-experimental-target-arch --target-arch=arm64

Unfortunately the docker images seems not to be updated any more. I build my own image with the Dockerfile on github and the following command:

docker build . --no-cache --build-arg RISK=stable --build-arg UBUNTU=latest

Now I am able to use version 5.0 of snapcraft and the --enable-experimental-target-arch parameter

1 Like