I develop an Ubuntu Core app on a x86 system for an arm target with snapcraft.

The snapcraft.yaml contains architectures: [armhf] and snapcraft generated a .armhf.snap file. That seems to be OK.

But if a part contains an Ubuntu dependency using stage-packages, the resulting snap contains only x86_64 libs.

How can it fix this?


Unfortunately Snapcraft doesn't yet support cross-building. In order to build a snap for x86 it needs to be run on an x86 host; for arm, an arm host.

Indeed, as mentioned by didrocks, you can run Snapcraft directly on the Snappy device by using the Classic Dimension on Ubuntu Core 16.04.


Note also that Snappy Ubuntu Core 16.04 (still in development) have a classic dimension which enables you to directly build on the device, so you won't have cross-arch issues anymore with this.


You can also install docker app, and import from ubuntu image from docker hub, then you will have the environement for native compile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.