← Back to issue list

"Architecture not supported" error in a armhf container on arm64 host

View original Github issue

Metadata

Project
craft-parts
Number
#655
Type
issue
State
open
Author
Saviq
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

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.

Suggested action: close stale

Reason: The underlying bug has been fixed in craft-parts PR #697 (commit 83679d41 'feat(info): support armv8l'), which added 'armv8l' to _PLATFORM_MACHINE_VARIATIONS mapping it to 'armv7l'. The current code in craft_parts/infos.py confirms armv8l is now properly handled. The issue is 935 days old with last activity 362 days ago, and the fix has been merged upstream, making this issue no longer applicable.

Impact: 50 Quick Win: 37.5 Staleness: 75 Complexity: 25 Confidence: 82 Support Request: 5

Issue body

### Bug Description Snapcraft assumes the kernel architecture is the userspace architecture. ``` craft_parts.errors.InvalidArchitecture: Architecture 'armv8l' is not supported. Make sure the architecture name is correct. ``` ### To Reproduce On e.g. a Raspberry Pi: ``` $ lxc launch jammy/armhf jammy-armhf $ lxc shell jammy-armhf $ snapcraft ### part yaml _No response_ ### Relevant log output ```shell $ snapcraft --verbose --destructive-mode Starting Snapcraft 8.0.2 Logging execution to '/root/.local/state/snapcraft/log/snapcraft-20240208-122038.888225.log' Running on armhf for armhf T raceback (most recent call last): File "/snap/snapcraft/10428/bin/snapcraft", line 8, in <module> sys.exit(run()) File "/snap/snapcraft/10428/lib/python3.10/site-packages/snapcraft/cli.py", line 258, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/10428/lib/python3.10/site-packages/snapcraft/cli.py", line 230, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/10428/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/10428/lib/python3.10/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/10428/lib/python3.10/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/10428/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 97, in run _expand_environment( File "/snap/snapcraft/10428/lib/python3.10/site-packages/snapcraft/parts/lifecycle.py", line 616, in _expand_environment info = craft_parts.ProjectInfo( File "/snap/snapcraft/10428/lib/python3.10/site-packages/craft_parts/infos.py", line 97, in __init__ self._set_machine(arch) File "/snap/snapcraft/10428/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. ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 37.5
Staleness: 75
Complexity: 25
Confidence: 82
Support Request: 5
close stale 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.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 65
Confidence: 85
Support Request: 15
close stale Snapcraft fails with InvalidArchitecture error when running an armhf container on an arm64 host due to kernel/userspace architecture mismatch. Issue is triaged but inactive for over 10 months.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 60
Confidence: 75
Support Request: 10
close stale Snapcraft fails with InvalidArchitecture error when running armhf container on arm64 host due to kernel/userspace architecture mismatch. Currently triaged but inactive.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 55
Confidence: 70
Support Request: 5
keep open Snapcraft fails with an invalid architecture error when running armhf containers on arm64 hosts due to incorrect kernel versus userspace detection. Triaged and labeled as an enhancement. Internal Jira ticket created. Waiting to be assigned.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: craft-parts#697 (confidence 90%)

    PR #697 'feat(info): support armv8l' added armv8l to _PLATFORM_MACHINE_VARIATIONS in craft_parts/infos.py, directly addressing the InvalidArchitecture error reported in this issue.

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.
80%
#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.
78%
#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.
72%
#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.
70%