foreign architecture builds doesn't work with classic snaps

Bug #1660302 reported by Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
Confirmed
Undecided
Unassigned

Bug Description

Building the teleconsole snap, which is a pre-built binary for amd64 and armhf, I discovered that --target-arch=armhf doesn't work when the snap is a classic. I presume snapcraft is doing some cross-build environment setup and as a result core isn't installed.

"classic confinement requires the core snap to be installed. Install it by running `snap install core`."

A workaround I used was to fudge prime/meta/snap.yaml to change the architecture from amd64 to armhf, and then use mksquashfs to make the snap:-

$ mksquashfs ./prime teleconsole_0.3.1_armhf.snap -noappend -comp xz -no-xattrs -all-root

Tags: isv kubernetes
ryeterrell (ryeterrell)
tags: added: kubernetes
Revision history for this message
Oliver Grawert (ogra) wrote :

given that --target-arch is plugin specific (like the documentation explicitly says) and we only have exactly one plugin supporting this (kernel), i'd say this is no surprise ...

to make this work generally you would have to fix debian to actually support cross compilation in deb packages (which is far from ready)

Cris Dywan (kalikiana)
Changed in snapcraft:
status: New → Confirmed
Evan (ev)
summary: - --target-arch doesn't work with classic snaps
+ foreign architecture builds doesn't work with classic snaps
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.