Snapcraft fails to run on 32bit userspace container on 64bit ARM kernel.
Metadata
Current evaluation
Closed and moved to internal tracking (SNAPCRAFT-1190). No fix merged; the proposed architecture mapping remains unimplemented.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
40
Complexity:
45
Confidence:
85
Support Request:
10
|
keep open | Snapcraft crashes on 32-bit ARM userspace (armv8l) on 64-bit ARM kernels due to inconsistent architecture mapping in craft libraries. Currently triaged and under discussion, awaiting developer consensus to map armv8l to armv7l. Internal ticket created. |
Update history
| Date | Change |
|---|---|
| closed |
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. | |
| #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. | |
| #1907721 Snapcraft broken on ARM64 | snapcraft (launchpad) | closed | Closed without comments. No fix or merge was applied. The ARM64 Multipass QEMU error and YAML !PrimeState deserialization bug were likely resolved by upstream Snapcraft updates or abandoned. | |
| #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. | |
| #1570835 snapcraft 2.8 fails on s390x | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft 2.8 failed on s390x due to a missing architecture table entry, but no fix or follow-up was recorded. | |
| #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. | |
| #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. |