← Back to issue list

Cannot build snaps in a 32-bit armhf container when running an arm64 kernel

View original Github issue

Metadata

Project
snapcraft
Number
#4627
Type
issue
State
closed
Author
IsaacJT
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

### Bug Description This is a follow-up to the bug report posted on Launchpad: https://bugs.launchpad.net/snapcraft/+bug/1987627 Snapcraft is unable to snaps inside armhf containers when running on an arm64 host. ### To Reproduce Create an armhf container on an arm64 host and try to build a Core22-based snap with Snapcraft. ### Environment Building with destructive mode in an Ubuntu 22.04 armhf container on an arm64 host ### snapcraft.yaml ```shell Any snapcraft.yaml for armhf ``` ### Relevant log output ```shell Traceback (most recent call last): File "/snap/snapcraft/10599/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/cli.py", line 258, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/cli.py", line 230, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/10599/lib/python3.10/site-packages/craft_cli/dispatcher.py", line 487, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 97, in run _expand_environment( File "/snap/snapcraft/10599/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 629, in _expand_environment info = craft_parts.ProjectInfo( File "/snap/snapcraft/10599/lib/python3.10/site-packages/craft_parts/infos.py", line 97, in __init__ self._set_machine(arch) File "/snap/snapcraft/10599/lib/python3.10/site-packages/craft_parts/infos.py", line 310, in _set_machine raise errors.InvalidArchitecture(self._host_arch) craft_parts.errors.InvalidArchitecture: Architecture 'armv8l' is not supported. Make sure the architecture name is correct. ``` ### Additional context ``` $ dpkg --print-architecture armhf $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy $ uname -m armv8l ``` Core20-based snaps build correctly on Ubuntu 20.04 in an armhf container on an arm64 host.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen/qwen3.8-27b
Impact: 45
Quick Win: 31.5
Staleness: 75
Complexity: 30
Confidence: 85
Support Request: 5
close stale Snapcraft failed to build armhf snaps in an armhf container on an arm64 host, raising InvalidArchitecture: 'armv8l' is not supported. Fixed in snapcraft 9.1 (PR #6394) and craft-parts #697; issue is stale and awaiting closure.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 60
Confidence: 80
Support Request: 5
needs triage Snapcraft fails to build armhf snaps in containers on arm64 hosts due to invalid architecture detection (armv8l). Unlabelled, no maintainer response, inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 50
Confidence: 75
Support Request: 15
needs triage Snapcraft crashes with InvalidArchitecture when building armhf snaps in containers on arm64 hosts. Report lacks maintainer assessment, labels, or activity for over two years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 75
Support Request: 10
needs triage Snapcraft fails building armhf snaps in containers on arm64 kernels due to an unsupported architecture detection error. An internal Jira ticket was created, but the issue remains unassigned and inactive for over a year. Needs triage.

Update history

Date Change
closed

Related issues

Issue Project State Summary Similarity
#1987627 Cannot build snaps in a 32-bit armhf container when running an arm64 kernel snapcraft (launchpad) closed Snapcraft failed to build armhf snaps in armhf containers on arm64 hosts due to unsupported armv8l architecture detection. The issue was resolved in Snapcraft 9.1 by adding native armv8l support, enabling successful builds in this configuration.
83%
#5638 Snapcraft fails to run on 32bit userspace container on 64bit ARM kernel. snapcraft closed Closed and moved to internal tracking (SNAPCRAFT-1190). No fix merged; the proposed architecture mapping remains unimplemented.
79%
#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.
74%
#655 "Architecture not supported" error in a armhf container on arm64 host craft-parts open Snapcraft crashes with InvalidArchitecture 'armv8l' when run in an armhf container on an arm64 host. The bug is in craft-parts' architecture mapping. Fixed in craft-parts PR #697 which added armv8l to the platform machine variations map.
72%
#1737532 "snapcraft cleanbuild --target-arch=i386" produces amd64 executables snapcraft (launchpad) closed 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.
71%
#5219 Snapcraft unable to compile ARM64 kernel snapcraft open Cross-compiling an ARM64 kernel with snapcraft 7.5.8/8.5.1 fails when the kernel plugin runs 'apt-get download snapd:arm64' for snap bootstrap, because the Focal build environment has no snapd arm64 candidate. No maintainer response; reporter reproduced the apt error on Ubuntu 20/22 in Jan 2025.
70%