Skip to content

Conversation

andyfaff
Copy link
Member

No description provided.

@andyfaff
Copy link
Member Author

andyfaff commented Aug 14, 2025

I seem to be able to start the wheel build, but the build fails with:

../meson.build:1:0: ERROR: Emscripten compiler can only be used for cross compilation.

The build is done with the following command:

python -m cibuildwheel numpy-src --config-file cibuildwheel.toml --output-dir ./dist

Are there extra options I need to add?
The build works with the cibuildwheel action in the main repo.

@rgommers

EDIT: extra stuff is required from pyproject.toml

@andyfaff
Copy link
Member Author

No idea why it works on numpy/numpy with cp313, but not here. cp312 works ok.

@andyfaff
Copy link
Member Author

@rgommers ping

@andyfaff
Copy link
Member Author

@rgommers, I now know what the issue is with building the pyodide wheels, see the cibuildwheel issue I submitted. We can get around the issue temporarily by using the pypa/cibuildwheel action, but that would require whitelisting it. I'm trying to address numpy/numpy#29462 (comment) with this PR.

@agriyakhetarpal
Copy link

Hi! Thank you for filing the upstream issue in cibuildwheel – I will investigate it soon. In the meantime, I'd say it would be a good idea to allowlist the pypa/cibuildwheel action from a security perspective: all dependencies that affect the build process are pinned using constraints, and it is well-supported and maintained. Additionally, the cibuildwheel test suite runs its action with the CIBW_PLATFORM set to pyodide, so it is thoroughly tested as well. While I believe that using actions/setup-python and python -m cibuildwheel is a less popular approach for users, it is possible that there might be subtle bugs to be uncovered, and that we could do something to avert them.

cc: @hoodmane @ryanking13 for awareness

@ryanking13
Copy link

Thanks for the ping. I think the cross file should be passed to meson to make it aware that it is cross compilation, but looking at the build log it doesn't seems to be passed for some reason.

@andyfaff
Copy link
Member Author

I think it is being passed, otherwise the tests would fail.

@ryanking13
Copy link

Oh, yes, I think it is passed now. I was looking at the original error message about the cross compilation, and thought that it was not resolved yet.

../meson.build:1:0: ERROR: Emscripten compiler can only be used for cross compilation.

@andyfaff andyfaff merged commit 14dfbf2 into numpy:main Aug 26, 2025
157 of 158 checks passed
@andyfaff andyfaff deleted the wasm branch August 26, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants