Snapcraft fails to run on 32bit userspace container on 64bit ARM kernel.
Metadata
Current evaluation
Fixed by merged PR #6394 (commit e51640488): Snapcraft now maps armv8l to armv7l, supporting ARMHF builds in 32-bit ARM userspace on 64-bit ARM kernels.
Resolution: closed resolved
Reason: PR #6394 merged as commit e51640488 and added armv8l-to-armv7l architecture mapping. Snapcraft 9.1 release notes confirm armv8l support for 32-bit ARM userspace on 64-bit ARM systems.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
On compatible hardware, where the vendor has not saved silicon to exclude 32bit support, one can use the `personality` system call to set the personality of a process to the 32bit sub-architecture of the 64bit architecture. Notably, 64bit kernels set such personality on 32bit programs automatically.
This is perfect for running snapcraft on fast 64bit arm hardware, while using a lightweight 32bit container, so that one can build arm 32bit snaps natively, without having to add explicit support for full cross compilation.
This fails, because snapcraft and the numerous `craft_` libraries don't universally understand this architecture mode, all while trying to understand architecture modes.
On aarch64 kernel running 32bit userspace profile, or running with the 32bit personality flag set (see the setarch program for details) `uname -m` returns `armv8l`.
```
$ uname -m
aarch64
$ setarch armv7l uname -m
armv8l
```
Snapcraft should treat `armv8l` as an alias of `armv7l` across the board.
I found
### To Reproduce
On an arm64 system spawn an 32bit userspace container with lxd:
```
$ lxc launch ubuntu-daily:n/armhf
```
Then `lxc shell` into the container and install snapcraft:
```
# snap install --classic snapcraft
```
Finally run `--help`:
```
# snapcraft --help
root@classic-sawfly:~# uname -a
Linux classic-sawfly 6.14.0-1009-raspi #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 23 16:47:03 UTC 2025 armv8l armv8l armv8l GNU/Linux
root@classic-sawfly:~# snapcraft --help
[traceback]
```
### Environment
Ubuntu daily armhf on Ubuntu LTS aarch64
### snapcraft.yaml
```yaml
N/A
```
### Relevant log output
```shell
Traceback (most recent call last):
File "/snap/snapcraft/15372/bin/snapcraft", line 5, in <module>
from snapcraft.application import main
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/application.py", line 39, in <module>
from snapcraft import cli, commands, errors, models, services, store
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/cli.py", line 33, in <module>
from snapcraft import errors, store, utils
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/store/__init__.py", line 22, in <module>
from .client import StoreClientCLI
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/store/client.py", line 35, in <module>
from snapcraft import __version__, errors, models, utils
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/models/__init__.py", line 26, in <module>
from .project import (
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/models/project.py", line 2236, in <module>
class ArchitectureProject(models.CraftBaseModel, extra="ignore"):
File "/snap/snapcraft/15372/lib/python3.12/site-packages/snapcraft/models/project.py", line 2240, in ArchitectureProject
default=[str(DebianArchitecture.from_host())],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/15372/lib/python3.12/site-packages/craft_platforms/_architectures.py", line 64, in from_host
return cls.from_machine(platform.machine())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/15372/lib/python3.12/site-packages/craft_platforms/_architectures.py", line 59, in from_machine
return cls(_ARCH_TRANSLATIONS_PLATFORM_TO_DEB.get(arch.lower(), arch.lower()))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/current/usr/lib/python3.12/enum.py", line 757, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/snap/snapcraft/current/usr/lib/python3.12/enum.py", line 1171, in __new__
raise ve_exc
ValueError: 'armv8l' is not a valid DebianArchitecture
```
### Additional context
_No response_
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #6394 (commit e51640488): Snapcraft now maps armv8l to armv7l, supporting ARMHF builds in 32-bit ARM userspace on 64-bit ARM kernels. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #6394 (commit e51640488): Snapcraft now maps armv8l to armv7l, allowing 32-bit ARM userspace containers on 64-bit ARM kernels. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #6394 (commit e51640488), adding armv8l-to-armv7l handling for 32-bit ARM userspace on 64-bit ARM kernels. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and moved to internal tracking (SNAPCRAFT-1190). No fix merged; the proposed architecture mapping remains unimplemented. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
75
Complexity:
15
Confidence:
90
Support Request:
0
|
keep open | Snapcraft crashes on 32-bit ARM userspace due to unmapped armv8l architecture. Triaged and acknowledged by maintainers, awaiting further review or implementation. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
68
Complexity:
20
Confidence:
85
Support Request:
0
|
keep open | Snapcraft crashes on 32-bit userspace over 64-bit ARM kernel due to unrecognized armv8l architecture string. Triaged as enhancement, awaiting maintainer review on consistent architecture mapping. |
Update history
| Date | Change |
|---|---|
| closed |
Related work
-
Likely Fixed By:
canonical/snapcraft#6394
(confidence 100%)
Merged PR adding armv8l support and explicitly resolving #5638.
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 | Fixed in Snapcraft 9.1 by PR #6394 (commit e5164048), adding armv8l support so a 32-bit ARM userspace on an ARM64 kernel maps to armhf. | |
| #4627 Cannot build snaps in a 32-bit armhf container when running an arm64 kernel | snapcraft | closed | Fixed in Snapcraft 9.1 by merged PR #6394 (commit e51640488), which maps armv8l to armv7l for armhf container builds on arm64 kernels. | |
| #1641123 snapcraft does not properly detect the architecture when kernel is 64 bits but userspace is 32 | snapcraft (launchpad) | closed | Fixed in snapcore/snapcraft#1089 by deriving the build architecture from the compiler target, preventing 32-bit ARM artifacts from being mislabeled arm64. | |
| #1769551 snapcraft 2.42 not working in trusty armhf | snapcraft (launchpad) | closed | Snapcraft 2.42's armhf startup failure was fixed by merged PR #2126 (commit 5230460c7); the reporter confirmed it in edge rev 1561. | |
| #655 "Architecture not supported" error in a armhf container on arm64 host | craft-parts | closed | Added armv8l-to-armv7l support in craft-parts PR #697 (83679d41); Snapcraft PR #6394 (e51640488) delivered the fix in version 9.1. | |
| #5132 push of locally built snap fails on arm64 device | snapcraft | closed | Fixed in Snapcraft 8.6 by merged PR #5136 (commit 2e7f5c3b), which migrated Snapcraft to core24 and updated bundled unsquashfs to 4.6.1; overlapping PR #5147 was closed. | |
| #2012074 snapcraft cannot build snap by default on aarch64 | snapcraft (launchpad) | open | ARM64 default builds failed on Snapcraft 7.3.1 because core20 selected amd64-only Multipass images; later defaults use core22/LXD on Linux, addressing the reported path. | |
| #1570835 snapcraft 2.8 fails on s390x | snapcraft (launchpad) | closed | Snapcraft 2.8's missing s390x handling was fixed by ubuntu-core/snapcraft PR #461, merged as commit d3c242fa2. | |
| #5219 Snapcraft unable to compile ARM64 kernel | snapcraft | open | ARM64 core20 kernel cross-builds fail while fetching snapd:arm64; a minimal apt reproducer exists, but the report has no maintainer triage or release mapping. | |
| #4443 snapcraft on ARM 64 - stuck at lxd | snapcraft | closed | The ARM64 hang was traced to missing LXD container networking, not a Snapcraft architecture defect; Snapcraft 7.5.4 added a timeout instead of looping indefinitely. |