← Back to issue list

Cannot use --build-on, architecture list is already set in snapcraft.yaml.

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1885150
Type
issue
State
closed
Author
~chipaca
Labels
—
Created
Updated
Closed

Current evaluation

Resolved in Snapcraft 8.7.0: remote-build added --build-for filtering for projects defining architectures or platforms, replacing the unusable --build-on workaround.

Resolution: closed resolved

Reason: Snapcraft's 8.7.0 release notes state that remote-build can now use --build-for to filter architectures or platforms entries, and the closing comment confirms this release resolved the Launchpad issue #1885150.

Evaluated by: mr-cal-bot

No scores available.

Issue body

If my snap has no 'architectures' entry, I can happily do snapcraft remote-build --build-on=armhf However as soon as I add something like, say architectures:   - build-on: armhf   - build-on: amd64 then I can no longer ask for just the armhf build from the commandline; I need to edit the yaml directly. This is awkward when I'm trying to fix build errors in particular architectures in my snap.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Resolved in Snapcraft 8.7.0: remote-build added --build-for filtering for projects defining architectures or platforms, replacing the unusable --build-on workaround.
stealth/space-bunny-alpha — closed resolved Resolved in Snapcraft 8.7.0: PR #5216 added --build-for filtering for snaps declaring architectures or platforms, replacing the old --build-on workflow.
stealth/space-bunny-alpha — closed stale Closed without resolution: --build-on remained incompatible with architectures already declared in snapcraft.yaml; no fixing PR or commit was linked.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The --build-on CLI flag conflicts with pre-defined architectures in snapcraft.yaml, preventing selective remote builds. No fix was implemented.
qwen/qwen3.6-35b-a3b — — Closed without fix due to inactivity. The --build-on CLI flag remains ignored when architectures is defined in snapcraft.yaml, requiring manual YAML edits for architecture-specific builds.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The --build-on CLI flag remains incompatible with architectures defined in snapcraft.yaml. Issue abandoned due to inactivity.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The --build-on CLI flag remains ignored when architectures are defined in snapcraft.yaml, requiring manual YAML edits for targeted builds. No fix or workaround was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft (launchpad)#1885150 (confidence 98%)

    The 8.7.0 release notes document the --build-for remote-build capability that resolves the reported architecture-selection limitation.

Related issues

Issue Project State Summary Similarity
#4150 meta: use build-for in snap.yaml architecture snapcraft merged Merged #4150 as 77d3454d: build-for: all now writes architectures: all to meta/snap.yaml instead of the build-on architecture, fixing CRAFT-1535.
75%
#4214 snapcraft 7.4.3 doesn't adequately complain about non-existent architectures snapcraft closed Fixed in Snapcraft 8: invalid build-on architectures now produce a clear validation error listing all supported architectures.
73%
#4543 fix(remote): parse comma-separated architectures snapcraft merged Merged in snapcore/snapcraft#4543 as b8eed87c0, fixing comma-separated remote-build architectures and enforcing --build-for/--build-on exclusivity.
73%
#4780 remote build: fails with some architecture definitions snapcraft closed Remote-build architecture handling was fixed by merged PR canonical/snapcraft#4793 (commit 53ec55cef), with companion support in canonical/craft-application#343.
73%
#4854 Accept `build-for: [all]` and `--build-for=all` for architecture-independent snaps snapcraft closed Resolved: Snapcraft supports build-for [all] and --build-for=all for remote builds/core24 in 8.4.0 and core22 in 8.7.0; requested core22/core24 regression tests were added.
72%
#5859 Non-list `build-for` values are no longer allowed snapcraft open A valid scalar build-for value regresses in Snapcraft 8.13.0: core22 falls back, then crashes with “cannot determine build-for architecture.” The issue is triaged and remains open.
72%
#2007789 `snapcraft remote-build` does not support long syntax of the `architectures` top-level key. snapcraft (launchpad) closed Fixed by migrating `snapcraft remote-build` to the core22 implementation, which correctly parses the long `architectures` syntax.
72%
#1685 Implement support for architecture in snapcraft.yaml snapcraft closed Architecture support for snapcraft.yaml landed in PR #2080 (commit c60ac3891), adding CI-oriented build-on/run-on lists. build.snapcraft.io adoption was tracked separately by cjwatson.
71%
#5335 `build-on` when running snapcraft locally uses stage packages from the wrong architecture snapcraft closed Closed as expected behavior, not a bug: mr-cal explained build-on uses build-on arch for build/stage-packages; cross-compiling requires :$CRAFT_ARCH_BUILD_FOR suffixes plus ubuntu-ports repo. Later documented in craft-a-cross-compiled-app guide.
70%
#1999580 core22: wrong arch in snap.yaml when building for all archs snapcraft (launchpad) closed Fixed in merged canonical/snapcraft#4150 (commit 77d3454d): core22 snap.yaml now records build-for (all) instead of the build-on architecture.
70%