You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building core22 snaps fails due to how craft-parts parses system architecture from the python call platform.machine().
This issue was uncovered when Multipass 1.12.0 was released, which enables using snapcraft on Apple silicon.
To Reproduce
snapcraft
Environment
MacOS on Apple silicon (M1 or M2), snapcraft 7.3.1 via brew
snapcraft.yaml
name: my-snap-name
base: core22
version: '0.1'
summary: hello world
description: hello world
grade: devel
confinement: devmode
parts:
my-part:
plugin: nil
Relevant log output
snapcraft --trace
Options -t and --trace are deprecated, use --verbosity=debug instead.
2023-06-15 09:29:08.520 Starting Snapcraft 7.3.1
2023-06-15 09:29:08.520 Logging execution to '/Users/<user>/Library/Logs/snapcraft/snapcraft-20230615-092908.520220.log'
2023-06-15 09:29:08.521 lifecycle command: 'pack', arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2023-06-15 09:29:08.521 command: pack, arguments: Namespace(destructive_mode=False, use_lxd=False, debug=False, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None)
2023-06-15 09:29:08.525 CPU count (from multiprocessing): 8
2023-06-15 09:29:08.525 Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT ''
2023-06-15 09:29:08.525 Running on arm64 for arm64 Traceback (most recent call last):
File "/opt/homebrew/bin/snapcraft", line 8, in<module>sys.exit(run())
^^^^^
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/cli.py", line 243, in run
_run_dispatcher(dispatcher)
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/cli.py", line 219, in _run_dispatcher
dispatcher.run()
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/craft_cli/dispatcher.py", line 448, in run
return self._loaded_command.run(self._parsed_command_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/commands/lifecycle.py", line 259, in run
super().run(parsed_args)
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/commands/lifecycle.py", line 132, in run
parts_lifecycle.run(self.name, parsed_args)
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/parts/lifecycle.py", line 208, in run
_expand_environment(
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/snapcraft/parts/lifecycle.py", line 681, in _expand_environment
info = craft_parts.ProjectInfo(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/craft_parts/infos.py", line 92, in __init__
self._set_machine(arch)
File "/opt/homebrew/Cellar/snapcraft/7.3.1/libexec/lib/python3.11/site-packages/craft_parts/infos.py", line 268, in _set_machine
raise errors.InvalidArchitecture(self._host_arch)
craft_parts.errors.InvalidArchitecture: Architecture 'arm64' is not supported.
Make sure the architecture name is correct.
Bug Description
Building core22 snaps fails due to how craft-parts parses system architecture from the python call
platform.machine()
.This issue was uncovered when Multipass 1.12.0 was released, which enables using snapcraft on Apple silicon.
To Reproduce
snapcraft
Environment
MacOS on Apple silicon (M1 or M2), snapcraft 7.3.1 via brew
snapcraft.yaml
name: my-snap-name base: core22 version: '0.1' summary: hello world description: hello world grade: devel confinement: devmode parts: my-part: plugin: nil
Relevant log output
Additional context
https://forum.snapcraft.io/t/architecture-arm64-is-not-supported-error-on-apple-m1-with-core22-base/35634/10
The text was updated successfully, but these errors were encountered: