Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote build: error if cross-compiling #4996

Open
mr-cal opened this issue Aug 21, 2024 · 1 comment · May be fixed by #5265
Open

remote build: error if cross-compiling #4996

mr-cal opened this issue Aug 21, 2024 · 1 comment · May be fixed by #5265
Labels
enhancement New features or optimizations triaged

Comments

@mr-cal
Copy link
Collaborator

mr-cal commented Aug 21, 2024

What needs to get done

Check if the build plan will create an artefact that can only be produced by cross-compiling.

If it will, then raise an error before sending the project to Launchpad.

Additionally, we need to add a task in craft-application to upstream Snapcraft's build-plan validation. This includes this cross-compile check and a check for the same build-for for multiple platforms.

Why it needs to get done

Launchpad does not support cross-compiling or have a concept of build-on vs build-for architectures. This is a problem for Snapcraft, because remote-build accepts a --build-for argument but has to provide the build-on to Launchpad. This is why build-on has to be the same as build-for.

This is a poor UX because the project will be uploaded to Launchpad and Launchpad will not build any artefacts or provide useful error messages.

Example:

platforms:
  platform1:
    build-on: amd64
    build-for: riscv64
@mr-cal mr-cal added enhancement New features or optimizations triaged labels Aug 21, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

@mr-cal mr-cal changed the title Remote build should error early if cross-compiling remote build: error early if cross-compiling Aug 21, 2024
@mr-cal mr-cal changed the title remote build: error early if cross-compiling remote build: error if cross-compiling Aug 21, 2024
@mr-cal mr-cal linked a pull request Feb 18, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or optimizations triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant