remote build: fix cross-compiling errors and `build-for: all` errors
Metadata
Current evaluation
Fixed by passing build-on architectures to Launchpad instead of build-for, enabling cross-compiling and correct architecture selection for build-for: all.
Suggested action: —
No scores available.
Issue body
### What needs to get done
Pass the `build-on` architectures to Launchpad rather than the `build-for` architectures.
### Why it needs to get done
* To allow for cross-compiling with remote builds rather than failing with an unhelpful error from Launchpad.
* To allow `build-for: [all]` to build on the correct architecture rather than `amd64`.
Launchpad doesn't support cross-compiling nor does it have a concept of `build-on` vs `build-for` architectures. This is a problem for Snapcraft, because remote-build accepts a `--build-for` argument but has to provide the `build-on` to Launchpad.
Thanks to craft-application's build plan filtering, we can easily enable cross-compiles with the following constraints:
* Snapcraft only allows one artifact to be remotely built on each build-on architecture (due to #4995).
* Launchpad accepts a list of architectures where to build an artifact and choose one architecture from that list.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Fixed by passing build-on architectures to Launchpad instead of build-for, enabling cross-compiling and correct architecture selection for build-for: all. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after fixing the remote build configuration to pass build-on architectures to Launchpad instead of build-for. This resolves cross-compiling failures and ensures build-for: all targets the correct architecture. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and superseded by internal Jira ticket CRAFT-3280. The issue outlines passing build-on architectures to Launchpad instead of build-for to resolve cross-compiling and build-for: all errors, but no code changes were merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and deferred to internal Jira ticket CRAFT-3280. The proposed fix to pass build-on architectures to Launchpad instead of build-for was tracked internally without an external merge or implementation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed and tracked internally via Jira ticket CRAFT-3280, effectively abandoned in this repository. No public fix or merge was documented. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5265 fix(remotebuild): don't fail when cross-compiling | snapcraft | merged | Merged fix resolving remote build cross-compilation failures. Snapcraft now passes build-on architectures to Launchpad instead of build-for, enabling correct cross-compilation and addressing issue #4996. Approved by reviewers and passed CI. | |
| #4495 remote build: odd errors for certain `architectures:` setups | snapcraft | closed | Remote build architecture validation errors and misleading logs were fixed via remote-builder improvements and PR 4994. Conflicting build-for flags now yield a user-friendly error, and Launchpad reporting was corrected. Closed. | |
| #5351 fix(remote): error early for invalid platform usage | snapcraft | merged | Merged a fix that raises an early error when --build-for conflicts with shorthand platform entries, preventing unfriendly Launchpad failures. The change passed CI checks and received approvals, resolving issue #5270. |