Closed mr-cal closed 5 months ago
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2868.
This message was autogenerated
I've also seen failures without architectures
(or platforms
) in the .yaml. With, for example,
snapcraft remote-build --launchpad-accept-public-upload --build-for armhf
(Which works for Miriway, but not for several of canonical's Mir based projects. Not spotted what the significant difference between these is.)
Also:
This works: snapcraft remote-build --build-for riscv64
This does not: snapcraft remote-build --build-for amd64,riscv64,arm64
2024-05-02 23:33:24.773 Starting snapcraft, version 8.2.3
2024-05-02 23:33:24.773 Log verbosity level set to BRIEF
2024-05-02 23:33:24.774 Configuring application...
2024-05-02 23:33:24.774 Preparing application...
2024-05-02 23:33:24.774 Build plan: platform=None, build_for=amd64,riscv64,arm64
2024-05-02 23:33:24.774 Loading project file '/home/alan/Temp/Test/snap/snapcraft.yaml'
2024-05-02 23:33:24.779 Architecture 'amd64,riscv64,arm64' is not supported.
2024-05-02 23:33:24.779 Traceback (most recent call last):
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_application/application.py", line 508, in run
2024-05-02 23:33:24.779 self.services.project = self.get_project(
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_application/application.py", line 303, in get_project
2024-05-02 23:33:24.779 yaml_data = self._transform_project_yaml(yaml_data, build_on, build_for)
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_application/application.py", line 601, in _transform_project_yaml
2024-05-02 23:33:24.779 self._expand_environment(yaml_data=yaml_data, build_for=build_for)
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_application/application.py", line 629, in _expand_environment
2024-05-02 23:33:24.779 info = craft_parts.ProjectInfo(
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_parts/infos.py", line 99, in __init__
2024-05-02 23:33:24.779 self._set_machine(arch)
2024-05-02 23:33:24.779 File "/snap/snapcraft/11591/lib/python3.10/site-packages/craft_parts/infos.py", line 333, in _set_machine
2024-05-02 23:33:24.779 raise errors.InvalidArchitecture(arch)
2024-05-02 23:33:24.779 craft_parts.errors.InvalidArchitecture: Architecture 'amd64,riscv64,arm64' is not supported.
2024-05-02 23:33:24.779 Make sure the architecture name is correct.
2024-05-02 23:33:24.779 Recommended resolution: Make sure the architecture name is correct.
2024-05-02 23:33:24.779 Full execution log: '/home/alan/.local/state/snapcraft/log/snapcraft-20240502-233324.772745.log'
snapcraft 2.8.4 appears to have fixed some cases. https://github.com/canonical/mir/pull/3369 builds mir-libs for a matrix of core{22,24}, {amd64,armhf,arm64). The only one failing now is core24,armhf
https://github.com/canonical/mir/actions/runs/8939586899/job/24620012565?pr=3369
Running locally, doesn't retrieve any build results to investigate further
$ cp snap/local/core24~snapcraft.yaml snap/snapcraft.yaml
$ sed -i 's@version: testing@version: '$(git describe)'@' snap/snapcraft.yaml
$ snapcraft remote-build --launchpad-accept-public-upload --build-for armhf
$ snapcraft remote-build --launchpad-accept-public-upload --build-for armhf
remote-build is experimental and is subject to change. Use with caution.
Build completed.rtifacts...
Log files:
Artifacts:
$
Fixes via #4793 and https://github.com/canonical/craft-application/pull/343
Bug Description
Snapcraft does not handle some definitions of architectures for remote builds and fails immediately with no error or explanation.
It's possible that other variations of
architectures:
will fail too, so we should add a set of regression tests.To Reproduce
snapcraft remote-build
Environment
n/a
snapcraft.yaml
Relevant log output
Additional context
From @jnsgruk on the snapcrafters channel (source)