← Back to issue list

fix(remotebuild): don't fail when cross-compiling

View original Github issue

Metadata

Project
snapcraft
Number
#5265
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #5265 fixed remote cross-compilation by sending build-on architectures to Launchpad; commit f94da8f13 closed #4996.

Resolution: closed resolved

Reason: PR canonical/snapcraft#5265 merged as commit f94da8f13. It passes build-on architectures to Launchpad and adds spread coverage, enabling cross-compilation and correct build-for: [all] placement.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] Have you successfully run `make lint`? - [x] Have you successfully run `make test`? --- This PR updates Snapcraft to pass `build-on` architectures to Launchpad rather than the `build-for` architectures. It updates the spread tests to exercise this. Benefits: * Previously, a snap with `build-for: [all]` would build on `amd64`. Now it builds on one of the `build-on` architectures in the `snapcraft.yaml`. * Cross-compiling works with remote builds. This is possible due to the following constraints: * Snapcraft only allows one artifact to be remotely built on each `build-on` architecture. * Launchpad accepts a list of architectures where to build an artifact and choose one architecture from that list. Spread tests: https://github.com/canonical/snapcraft/actions/runs/13401419675 Fixes #4996 (CRAFT-3280)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #5265 fixed remote cross-compilation by sending build-on architectures to Launchpad; commit f94da8f13 closed #4996.
stealth/space-bunny-alpha — closed resolved Merged PR #5265 (commit f94da8f13) fixed remote cross-compilation by passing build-on architectures to Launchpad, including builds with build-for: all.
stealth/space-bunny-alpha — closed resolved Merged PR #5265 (commit f94da8f13) fixed remote cross-compilation by sending build-on architectures to Launchpad, also correcting build-for: all builds.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Resolves #4996 by updating Snapcraft to pass build-on architectures to Launchpad instead of build-for, fixing remote build cross-compilation failures. Includes updated spread tests.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4996 (confidence 100%)

    PR #5265 explicitly fixed #4996, covering cross-compilation and build-for: [all] remote-build failures.

Related issues

Issue Project State Summary Similarity
#4996 remote build: fix cross-compiling errors and `build-for: all` errors snapcraft closed Fixed by merged PR canonical/snapcraft#5265 (commit f94da8f13), sending build-on architectures to Launchpad for correct cross-compilation and build-for: all behavior.
76%
#4793 fix(remote-build): don't fail with certain archs snapcraft merged Merged into the hotfix branch as commit 53ec55cef, fixing architecture-specific remote-build failures from #4780, with companion support in craft-application#343.
76%
#4826 fix(remote-build): fail if no artifacts are created snapcraft merged Merged in #4826 (commit 552897340): remote-build now fails when Launchpad creates no artifacts, fixing #4783.
75%
#4995 remote build: error if multiple artefacts can be built on the same architecture snapcraft closed Fixed by merged PR #5005 (commit ad3b54bbd): remote builds now fail early when multiple artifacts share a build-on architecture.
74%
#4480 fix(remote): return error when remote build failed snapcraft merged Merged PR #4480 as commit 13aedd1d2, making remote builds return an error when a build fails and fixing #4142.
73%
#3021 remote-build: remove artifact sanity check snapcraft merged Merged PR #3021 (commit e4a878561) removed remote-build's artifact arch sanity check, so Launchpad results with arch 'multi' from build-on are downloaded instead of rejected. Fixes LP bug #1870730.
73%
#5005 fix(remotebuild): error early for multiple artifacts per build-on snapcraft merged Merged PR #5005 as commit ad3b54bbd, adding preflight validation to reject remote builds with multiple artifacts on the same build-on architecture; fixes #4995.
73%
#6090 feat(remote-build/legacy): improve error when building with --build-for snapcraft merged Merged PR #6090 improved legacy remote-builder errors for core20, clarifying that --build-for requires shorthand architectures because of Launchpad limitations. It addresses #5817 and supersedes #5819.
72%
#224 fix(remotebuild): create the launchpad instance correctly craft-application merged Merged PR #224 as commit 87bc56a7, fixing remotebuild to create the Launchpad instance correctly.
72%
#5351 fix(remote): error early for invalid platform usage snapcraft merged PR #5351 merged as commit 0c224fc7d, adding an early, friendlier error when --build-for is used with shorthand project platforms instead of failing at Launchpad. Fixes #5270 (CRAFT-4186); restriction later lifted by #5687.
71%