GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI) - #47330

Open
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds
Open

GH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)#47330
agriyakhetarpal wants to merge 20 commits into
apache:mainfrom
agriyakhetarpal:feat/pyodide-0.28-builds

Conversation

@agriyakhetarpal

@agriyakhetarpalagriyakhetarpal commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR allows PyArrow to be built and tested against the new Pyodide 2026_0 ABI 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.

cc: @hoodmane@ryanking13

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #47329has been automatically assigned in GitHub to PR creator.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown
Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/16950058312

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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? 🤔

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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

fatal: not a git repository (or any of the parent directories): .git

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 9d4bf5a

Submitted crossbow builds: ursacomputing/crossbow @ actions-e6f3074ad3

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

Thanks. We'll need a docker.io/apache/arrow-dev:amd64-conda-python-3.13 image for this, as the required Python version for Pyodide 0.28 builds is 3.13.

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could you please submit another build? Thanks!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@github-actions

Copy link
Copy Markdown

Revision: 16f90d9

Submitted crossbow builds: ursacomputing/crossbow @ actions-c232acf2ff

TaskStatus
test-conda-python-emscriptenGitHub Actions

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds. In the meantime; I changed -fexceptions to -fwasm-exceptions in eebb7a8.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIAug 14, 2025
@agriyakhetarpal

agriyakhetarpal commented Aug 14, 2025

Copy link
Copy Markdown
ContributorAuthor

I am trying to find out the correct place to install libatomic1; it's required by the Brotli and Protocol Buffers Emscripten builds.

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!

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

@github-actions crossbow submit test-conda-python-emscripten

@kou

kou commented Aug 14, 2025

Copy link
Copy Markdown
Member

FYI: You can use UBUNTU=22.04 archery docker run ubuntu-cpp-emscripten on local.

See https://arrow.apache.org/docs/developers/continuous_integration/archery.html how to setup Archery.

@github-actions

Copy link
Copy Markdown

Revision: af2e18d

Submitted crossbow builds: ursacomputing/crossbow @ actions-5d3d1c591a

TaskStatus
test-conda-python-emscriptenGitHub Actions

@github-actions

Copy link
Copy Markdown

Revision: eae25be

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d30e1fce

TaskStatus
test-conda-python-emscriptenGitHub Actions

@joewalp

Copy link
Copy Markdown

@agriyakhetarpal Are you still on this PR? If not, perhaps you can propose next steps for whomever may pick up the task?

@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

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 -shared flag issue that I encountered here previously, and I've made some progress on the builds up to the wheel. There are some changes needed for the wheel repair pipeline so that libarrow_python.so has the right RPATH, which I am trying to fix.

A follow-up could be to update the testing infrastructure to use a Pyodide virtual environment via pyodide venv instead of Arrow using its current hand-rolled python/scripts/run_emscripten_tests.py script.

@agriyakhetarpalagriyakhetarpal changed the title GH-47329: [Packaging][Python][C++] Build and test PyArrow against the pyodide_2025_0 ABIGH-47329: [Packaging][Python][C++] Build and test PyArrow against Pyodide 314 (2026_0 ABI)Aug 15, 2026
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment on lines +2186 to +2189
# 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}"

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@github-actionsgithub-actionsBot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Aug 15, 2026
Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
@agriyakhetarpal

Copy link
Copy Markdown
ContributorAuthor

Could the maintainers with the necessary permissions please submit a test-conda-python-emscripten build on this PR? I was able to figure out the problem locally; I think this should be ready. Thank you!

@agriyakhetarpal
agriyakhetarpal marked this pull request as ready for review August 15, 2026 16:47
CopilotAI lite review requested due to automatic review settings August 15, 2026 16:47

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 script invocation differences; ensure packaging is 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
FileDescription
python/scripts/run_emscripten_tests.pyUpdates Node driver invocation for macOS script syntax; ensures extra Pyodide packages are loaded for test runtime.
python/CMakeLists.txtAvoids applying non-Emscripten UNIX RPATH install behavior; defers equivalent handling to Emscripten linker flags.
docs/source/developers/cpp/emscripten.rstUpdates the documented EMSDK version/link reference for Pyodide 314.x.
dev/tasks/tasks.ymlMoves the emscripten CI task to Python 3.14.
cpp/cmake_modules/ThirdpartyToolchain.cmakeForces host protobuf build to use the configured C++ standard during cross-compiles.
cpp/cmake_modules/SetupCxxFlags.cmakeUpdates Emscripten flags for the new ABI, including longjmp/exception handling and side-module linker flags.
compose.yamlUpdates conda-python-emscripten service args (Pyodide version + minimum Python).
ci/docker/conda-python-emscripten.dockerfileUpdates 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.

Comment threadci/docker/conda-python-emscripten.dockerfile Outdated
Comment threadcpp/cmake_modules/SetupCxxFlags.cmake
CopilotAI review requested due to automatic review settings August 15, 2026 17:00

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FLAGS embeds '-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,$ORIGIN argument (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}")

Sign up for freeto 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.

[Packaging][Python] Build and test against Pyodide 314.0 (2026_0 ABI)

7 participants

@agriyakhetarpal@kou@hoodmane@AlenkaF@raulcd@joewalp