GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330
GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330agriyakhetarpal wants to merge 20 commits into
2026_0 ABI)#47330Conversation
|
|
|
@github-actions crossbow submit test-conda-python-emscripten |
|
|
Hello, could the maintainers with the necessary permissions please trigger an Emscripten build on this PR? Thank you! I thought I could do this, as I previously submitted a PR that was accepted and merged: #45072, so I'm not sure if I understand the bot's message above. Is it that the word "contributors" here actually means those with a commit bit? 🤔 |
|
It looks like the actual error is something else, though, which gets masked by the error message: https://github.com/apache/arrow/actions/runs/16950058312/job/48040535515?pr=47330#step:5:16 |
|
@github-actions crossbow submit test-conda-python-emscripten |
|
Revision: 9d4bf5a Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3
|
|
Thanks. We'll need a |
|
Could you please submit another build? Thanks! |
|
@github-actions crossbow submit test-conda-python-emscripten |
|
Revision: 16f90d9 Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff
|
|
I am trying to find out the correct place to install |
pyodide_2025_0 ABIpyodide_2025_0 ABI
I added this in af2e18d, but I'm not sure if this is the right approach. Could you please verify this commit, and also submit another build? Thanks! |
|
@github-actions crossbow submit test-conda-python-emscripten |
|
FYI: You can use See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery. |
|
Revision: af2e18d Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a
|
|
Revision: eae25be Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce
|
|
@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task? |
|
Having been pinged by the bot on the corresponding issue I opened (#47329) (and having lost the ping on this PR in my notifications), yes, I'm looking at this now. I'm trying to update to our 2026_0 ABI, which arrived this year, instead of the 2025_0 ABI. This ABI corresponds to our Pyodide 314.0 release. I haven't been hit by the A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via |
pyodide_2025_0 ABI2026_0 ABI)
| # Explicitly set the C++ standard for the host build. Without this, | ||
| # Abseil may be compiled with the host compiler's default standard, | ||
| # which can be older than C++17. | ||
| "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" |
There was a problem hiding this comment.
I hope this change is fine to keep here; this happened to me because I am using AppleClang 21 on my macOS machine to cross-compile for Emscripten.
The reason is that in the host protoc build, where CMAKE_CXX_FLAGS is blanked and no standard is set, absl compiles as C++14 and uses absl::string_view. That results in an ABI mismatch because Protobuf's targets reference the std::string_view signatures (since Protobuf compiles to C++17 or newer).
(I guess no one has hit this before, since the CI job exercises going from Linux to Emscripten, where gcc defaults to C++17)
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
|
Could the maintainers with the necessary permissions please submit a |
There was a problem hiding this comment.
Pull request overview
Updates Arrow’s Pyodide/Emscripten build + test tooling to target the Pyodide 314 (2026_0) ABI, aligning CI images, build flags, and runtime package setup needed to build/test PyArrow as a Pyodide WASM wheel.
Changes:
- Bump Pyodide/Emscripten-related versions in CI/container tooling (Pyodide 314.0.4, Python 3.14, Node 24).
- Adjust Emscripten compile/link flags for the Pyodide 2026_0 ABI (wasm exceptions, longjmp support, $ORIGIN/rpath handling for side modules).
- Update Emscripten test runner behavior (macOS
scriptinvocation differences; ensurepackagingis available in the Pyodide runner).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| python/scripts/run_emscripten_tests.py | Updates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime. |
| python/CMakeLists.txt | Avoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags. |
| docs/source/developers/cpp/emscripten.rst | Updates the documented EMSDK version/link reference for Pyodide 314.x. |
| dev/tasks/tasks.yml | Moves the emscripten CI task to Python 3.14. |
| cpp/cmake_modules/ThirdpartyToolchain.cmake | Forces host protobuf build to use the configured C++ standard during cross-compiles. |
| cpp/cmake_modules/SetupCxxFlags.cmake | Updates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags. |
| compose.yaml | Updates conda-python-emscripten service args (Pyodide version + minimum Python). |
| ci/docker/conda-python-emscripten.dockerfile | Updates the emscripten CI image defaults (Python/Pyodide/Node) and dependencies required for Pyodide 314.x builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
Suppressed comments (1)
cpp/cmake_modules/SetupCxxFlags.cmake:750
ARROW_EMSCRIPTEN_DYLIB_CREATE_FLAGSembeds'-Wl,-rpath,$ORIGIN'in single quotes. CMake does not perform shell-style quote parsing, so the quotes are likely passed through as literal characters in the linker argument, which can break linking or produce an incorrect rpath. Use the raw-Wl,-rpath,$ORIGINargument (no surrounding quotes).
"-sWASM_BIGINT=1 -fwasm-exceptions -sSUPPORT_LONGJMP=wasm -Wno-error=linkflags")
set(ARROW_EMSCRIPTEN_DYLIB_CREATE_FLAGS
"-sSIDE_MODULE=1 ${ARROW_EMSCRIPTEN_LINKER_FLAGS} '-Wl,-rpath,$ORIGIN'")
set(CMAKE_SHARED_LINKER_FLAGS "${ARROW_EMSCRIPTEN_DYLIB_CREATE_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${ARROW_EMSCRIPTEN_DYLIB_CREATE_FLAGS}")
Rationale for this change
This PR allows PyArrow to be built and tested against the new Pyodide
2026_0ABI introduced with the Pyodide 314.0.0 release.Closes #47329
What changes are included in this PR?
This PR updates the Pyodide version in the build scripts to 314.0.0 and the Emscripten version to 5.0.3, along with associated build-time changes to fix compilation issues.
Are these changes tested?
Are there any user-facing changes?
Yes, downstream packagers trying to build a WASM wheel for Pyodide are now required to use newer Pyodide and Emscripten versions, and the latest stable version of pyodide-build.
2026_0ABI) #47329cc: @hoodmane @ryanking13