canonical / craft-parts

https://canonical-craft-parts.readthedocs-hosted.com
GNU Lesser General Public License v3.0
11 stars 37 forks source link

InvalidArchitecture: Architecture ‘armv8l’ is not supported #696

Open sergey-borovkov opened 7 months ago

sergey-borovkov commented 7 months ago

Bug Description

I am trying to build an armhf snap on an aarch64 machine that runs armhf lxc container of Ubuntu.

Getting the error from the title when trying to build the snap:

craft_parts.errors.InvalidArchitecture: Architecture 'armv8l' is not supported.
Make sure the architecture name is correct.

See more details here: https://forum.snapcraft.io/t/invalidarchitecture-architecture-armv8l-is-not-supported/39455

To Reproduce

  1. On aarch64 machine that supports running in armhf compatibility mode create lxc image with armhf OS.
  2. For architectures field in snapcraft.yaml:
    architectures:
    - build-on: armhf
    build-for: armhf

    This error did happen without specifying the architectures field though.

part yaml

No response

Relevant log output

root@octo-pi3:/var/octo-avenger# snapcraft snap --destructive-mode --verbosity=debug
2024-03-24 14:09:11.570 Starting Snapcraft 7.5.5
Traceback (most recent call last):
  File "/snap/snapcraft/11046/bin/snapcraft", line 8, in <module>
    sys.exit(run())
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/snapcraft/cli.py", line 256, in run
    _run_dispatcher(dispatcher, global_args)
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/snapcraft/cli.py", line 229, in _run_dispatcher
    dispatcher.run()
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run
    return self._loaded_command.run(self._parsed_command_args)
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run
    parts_lifecycle.run(self.name, parsed_args)
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 209, in run
    _expand_environment(
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 728, in _expand_environment
    info = craft_parts.ProjectInfo(
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/craft_parts/infos.py", line 94, in __init__
    self._set_machine(arch)
  File "/snap/snapcraft/11046/lib/python3.8/site-packages/craft_parts/infos.py", line 281, 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.
syncronize-issues-to-jira[bot] commented 7 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2651.

This message was autogenerated