← Back to issue list

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

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1987627
Type
issue
State
closed
Author
~itrue
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

Running Snapcraft inside of an armhf LXD container running on an arm64 host produces the following error: --- $ sudo snapcraft --destructive-mode Traceback (most recent call last): File "/snap/snapcraft/8062/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/cli.py", line 186, in run _run_dispatcher(dispatcher) File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/cli.py", line 175, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/8062/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 419, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 235, in run super().run(parsed_args) File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 108, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 193, in run _expand_environment( File "/snap/snapcraft/8062/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 513, in _expand_environment info = craft_parts.ProjectInfo( File "/snap/snapcraft/8062/lib/python3.8/site-packages/craft_parts/infos.py", line 88, in __init__ self._set_machine(arch) File "/snap/snapcraft/8062/lib/python3.8/site-packages/craft_parts/infos.py", line 264, 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. --- Expected behavious: This should build an armhf snap, but instead it fails out due to the architecture detection. System information: $ 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 $ snapcraft version snapcraft 7.1.1 $ uname -m armv8l

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6
Impact: 75
Quick Win: 41.25
Staleness: 95
Complexity: 45
Confidence: 90
Support Request: 0
close stale armhf container on arm64 kernel fails with InvalidArchitecture: 'armv8l' not supported. Fixed in snapcraft 9.1 via PR #6394 and craft-parts #697.
qwen/qwen3.6-35b-a3b
Staleness: 92
Complexity: 50
Confidence: 88
Support Request: 5
close stale Bug report detailing a crash in snapcraft 7.1.1 when building armhf snaps in an armhf LXD container on an arm64 host due to unsupported architecture detection. Issue remains untriaged and inactive for nearly four years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 45
Confidence: 85
Support Request: 10
close stale snapcraft crashes with InvalidArchitecture error when building armhf snaps in an armhf LXD container on an arm64 host. Issue is four years old, unlabelled, and has no maintainer engagement.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 45
Confidence: 85
Support Request: 15
close stale Unresolved crash in snapcraft v7.1.1 when building armhf snaps in an arm64 container due to architecture detection failing on 'armv8l'. No maintainer interaction in over four years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 65
Confidence: 85
Support Request: 10
close stale Snapcraft fails to build armhf snaps in a 32-bit container on an arm64 kernel due to an architecture detection error in craft-parts. Issue is nearly 4 years old with no maintainer response.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
83%
#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.
80%
#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.
73%
#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.
72%
#696 InvalidArchitecture: Architecture ‘armv8l’ is not supported craft-parts closed Fixed an InvalidArchitecture error for 'armv8l' during armhf snap builds in aarch64/armhf LXC environments. Resolved via pull request #697, which updated architecture detection to correctly recognize the armv8l identifier.
72%
#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.
71%