"snapcraft cleanbuild --target-arch=i386" produces amd64 executables
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed without resolution. Cross-compilation for i386 via snapcraft cleanbuild continued producing amd64 binaries due to an incorrect container architecture and missing cross-compiler configuration.
Suggested action: —
No scores available.
Issue body
I wanted to locally build an i386 version of one of my snaps, so "snapcraft cleanbuild" seemed like a good option.
The snap used the autotools part plugin (that claims to support cross compilation) and used a simple automake project, but the resulting snap containd amd64 binaries.
Looking at the output, I can see a number of problems:
1. the container used to build the package appears to be an amd64 one, and the snapcraft installed the amd64 versions of packages I listed in "build-packages".
2. When configure is invoked, it doesn't find the cross compiler, so falls back to the amd64 compiler:
./configure --prefix= --host=i386-linux-gnu
checking for i386-linux-gnu-gcc... no
checking for gcc... gcc
The end result is a supposedly successful build containing binaries with the wrong architecture.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Cross-compilation for i386 via snapcraft cleanbuild continued producing amd64 binaries due to an incorrect container architecture and missing cross-compiler configuration. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or comments, indicating abandonment. The reported cross-compilation bug for i386 targets remains unresolved. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | The cross-compilation bug where snapcraft cleanbuild --target-arch=i386 produces amd64 binaries was closed without resolution. Zero comments and no patches indicate it remains unfixed. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1943603 snapcraft --target-arch=i386 does not build i386 images, because core20 does not support i386 and yet the build starts and wastes time | snapcraft (launchpad) | open | Reports that snapcraft --target-arch=i386 on a core20 base silently builds an amd64 snap instead of failing early, wasting build time. Unlabelled, 0 comments, inactive ~5 years; a related core20/i386 bug was closed as superseded by improved arch parsing. | |
| #1520248 snap with only scripts gets wrongs architecture set | snapcraft (launchpad) | closed | Closed without comments or resolution. Snapcraft 0.5 incorrectly flagged script-only snaps as missing amd64 binaries. The issue was abandoned and likely resolved in later snapcraft versions. | |
| #2149 Snap build breaking on non-amd64 architectures | charmcraft | closed | Closed without a public fix. The snap build failure on non-amd64 architectures due to a missing libgit2 dependency was abandoned, with no resolution or code changes provided. | |
| #1817288 snapcraft cleanbuild produces incorrect architecture snap | snapcraft (launchpad) | closed | Abandoned and closed without resolution. The legacy mode cleanbuild multi-arch naming bug remains unfixed due to lack of activity and deprecation of legacy mode. | |
| #1788654 snapcraft cleanbuild doesn't work with cross-compile stage-packages | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft cleanbuild fails during cross-compilation because it does not automatically configure multi-arch package support inside the container. No fix was implemented, and the report appears abandoned. | |
| #1665165 classic snaps fail to build in launchpad in archs other than amd64 | snapcraft (launchpad) | closed | Closed without resolution or comments. Classic snap build failures on non-amd64 architectures due to cross-compilation errors were abandoned or superseded by updated build infrastructure. | |
| #4627 Cannot build snaps in a 32-bit armhf container when running an arm64 kernel | snapcraft | closed | Closed without a public fix. An internal Jira ticket (CRAFT-2567) was created to track the architecture detection error, but no resolution or update was provided, leaving the issue deferred. | |
| #1569280 Snapcraft fails to strip go binaries on arm | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft failed to strip Go binaries on ARM during Launchpad builds, causing failures despite amd64 success. No fix or comments were provided. | |
| #1641123 snapcraft does not properly detect the architecture when kernel is 64 bits but userspace is 32 | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft incorrectly identified arm64 architecture in 64-bit kernel/32-bit userspace chroots, generating mismatched snaps. The report was abandoned due to inactivity. | |
| #2007790 core22: Only amd64 snap is built when multiple architectures are specified | snapcraft (launchpad) | open | Untriaged report that specifying multiple architectures in snapcraft.yaml only triggers amd64 builds in the Snapcraft build service. |