← Back to issue list

lxd: Setup image and target arch for cross-compilation

View original Github issue

Metadata

Project
snapcraft
Number
#1286
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

Merged into master. Configures LXD container image and target architecture for cross-compilation, using the host architecture image to avoid slow QEMU emulation. Approved by two reviewers and passed CI.

Suggested action:

No scores available.

Issue body

To support cross-compilation in LXD containers the image for the host architecture needs to be used, rather than for the target architecture, which would require slow qemu emulation. It's worth noting that host here means the host running LXD which may not be the same as the host running snapcraft eg. snapcraft executed on an armhf machine using an amd64 remote building for arm64. Note: this is orthogonal to actual support for cross-compilation in individual plugins and only deals with the container setup.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged into master. Configures LXD container image and target architecture for cross-compilation, using the host architecture image to avoid slow QEMU emulation. Approved by two reviewers and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Configures LXD containers to use the host architecture image for cross-compilation, avoiding slow QEMU emulation. Optimizes container setup without affecting plugin-level logic.
qwen3.6-35b-a3b-mtp-q6 Merged into master. Configures LXD containers to use the host architecture image for cross-compilation, avoiding slow QEMU emulation. Addresses container setup independently of plugin support and achieved 92.85% diff coverage.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1493 lxd: only pass target arch if specified explicitly snapcraft merged Merged after two approvals and CI. It fixes container build architecture handling by only passing the target arch when explicitly specified, defaulting to the container's arch. PR #1498 context and description clarity were resolved before merge.
76%
#1718 lxd: let lxd choose the architecture snapcraft merged Merged after two approvals and passing CI. Removes snapcraft's redundant LXD architecture selection logic, delegating it to LXD. Architecture recording now occurs post-container startup. Released with version 2.35.
73%
#2232 lxd: proper filename set when using architectures snapcraft merged Merged into master, fixing LP #1789882 by ensuring proper filename handling when using architectures in LXD. Approved by reviewer, passed CI checks, and modified 3 files (+14/-6 lines). Code coverage impact was negligible.
72%
#1577 lxd: don't inject local snaps on a different arch snapcraft merged Merged a fix preventing Snapcraft from injecting local snaps into LXD containers with mismatched architectures. Cross-arch remotes now install snaps from the store. Approved by reviewers and merged after CI checks.
72%
#1315 lxd: mock platform in the FakeLXD fixture snapcraft merged Merged external contribution moving platform mocking to the FakeLXD fixture for consistent architecture and cross-compilation testing. Approved by one reviewer with no unresolved comments.
71%