Skip to content

CI: skip ninja installation in linux_qemu workflows #27827

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

Merged
merged 2 commits into from
Nov 24, 2024

Conversation

mayeut
Copy link
Contributor

@mayeut mayeut commented Nov 24, 2024

The ninja used in the workflow is the one from the host.
Skipping ninja installation in the container allows to workaround issues that could arise when building it from source as is currently the case with riscv64.

xref: scikit-build/ninja-python-distributions#226 (comment)
cc @mattip

The ninja used in the workflow is the one from the host.
Skipping ninja installation in the container allows to workaround issues that could arise when building it from source as is currently the case with riscv64.
@charris
Copy link
Member

charris commented Nov 24, 2024

Could add a comment about why the ninja requirement is removed. I'm wondering what upstream change caused the sudden appearance of these failures.

@mattip
Copy link
Member

mattip commented Nov 24, 2024

there really is no good reason to build ninja from source inside the container. So this PR is desirable even if we could have built ninja successfully.

Co-authored-by: Matti Picus <[email protected]>
@mayeut
Copy link
Contributor Author

mayeut commented Nov 24, 2024

I'm wondering what upstream change caused the sudden appearance of these failures.

The build-backend changed from scikit-build to scikit-build-core. There are no c++ modifications. I don't know yet what caused the build to fail here (The build is passing native/qemu riscv64 compilation. NumPy is using a cross-compilation setup which I've not tried to reproduce yet).

@mattip mattip merged commit 4873f93 into numpy:main Nov 24, 2024
67 of 69 checks passed
@mattip
Copy link
Member

mattip commented Nov 24, 2024

Thanks @mayeut

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Nov 24, 2024
@mayeut
Copy link
Contributor Author

mayeut commented Nov 24, 2024

Just FYI, the failure comes from the following:

  • scikit-build-core uses sysconfig.get_config_var("CC") when valid and CC not in environment variables, scikit-build wasn't
  • NumPy cross-compilation overrides the gcc executable/symlink but not the riscv64-linux-gnu-gcc one which is returned by sysconfig.get_config_var("CC"). It also removes / overrides a couple directories from container to use the host ones which most likely leaves the native/container compiler in a bad state and/or the proper dev dependencies were not there in the first place for the native compiler.

Those 2 factors explain why the compilation is now failing for ninja (CC=gcc CXX=g++ python -m pip install ninja works).

@mattip
Copy link
Member

mattip commented Nov 24, 2024

@mayeut thanks for digging into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants