← 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 #1286 as 6a7372297: LXD now uses a host-architecture image while retaining the target architecture, avoiding slow QEMU emulation during cross-compilation.

Resolution: closed resolved

Reason: PR #1286 was approved and merged into master as commit 6a7372297, implementing host-architecture image setup for LXD cross-compilation.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged #1286 as 6a7372297: LXD now uses a host-architecture image while retaining the target architecture, avoiding slow QEMU emulation during cross-compilation.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#1286 as 6a7372297: LXD uses the host-architecture image while retaining the target architecture, avoiding slow QEMU emulation during cross-compilation.
stealth/space-bunny-alpha — closed resolved Merged PR #1286; LXD cross-compilation now uses the host-architecture image while setting the target architecture, avoiding slow QEMU emulation.
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.

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 via commit 0a7de4515, passing --target-arch to LXD only when explicitly set so builds default to the container architecture.
74%
#2046 lxd: specify arch in lxc image list command snapcraft merged Merged PR #2046 fixed incorrect LXD image metadata by specifying the architecture in lxc image list; merged as commit 828ea5120.
73%
#922 feat(LXD): add other-architecture option craft-providers merged Merged PR #922 added LXD support for selecting a non-host architecture by including the requested architecture in the remote image name. Prerequisite #921 had merged.
70%