4 Commits
Author SHA1 Message Date
e3150f2c68 GH-51487: [CI] Fix Emscripten wheel load failure by disabling llvm-strip on install (#51488)
### Rationale for this change
Fix #51487 - starting with LLVM 23 the required dylink.0 is not kept during CMake install strip. (see https://github.com/llvm/llvm-project/commit/52eb82e4f942db5e639c018c7757a1cca670333f)

### What changes are included in this PR?
Disable wheel install stripping with `SKBUILD_INSTALL_STRIP=false`
(applying alternative workaround llvm-strip --keep-section=dylink.0 would require more code changes)

### Are these changes tested?
Verified by CI.

### Are there any user-facing changes?
No.

### Was AI used for this PR?
Just gpt-6-sol during initial analysis
**PR code and description written by:**
- [x] Human
- [ ] AI

**Reviewed before submission by:**
- [x] Human
- [ ] AI
- [ ] Not reviewed
* GitHub Issue: #51487

Lead-authored-by: tadeja <tadeja@users.noreply.github.com>
Co-authored-by: Tadeja Kadunc <tadeja.kadunc@gmail.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
2026-09-30 11:55:14 +02:00
tadeja d6d8f0329b GH-50774: [CI][Python] Match Protobuf symbol visibility in bundled Substrait and ORC (#50792)
### Rationale for this change
Fix #50774. After #50650, the Pyodide build failed while loading PyArrow with `  ImportError: dynamic module does not define module export function (PyInit_lib)`.
The ImportError is misleading because the `PyInit_lib` is present. The actual failure is an earlier abort during static initialization of `libarrow_python.so`, in Protobuf descriptor registration.

#50650 changed the order of libraries merged into `libarrow_bundled_dependencies.a`. The archive contains duplicate weak Protobuf/Abseil symbols emitted by the Protobuf runtime and generated code in Substrait and in ORC. These symbols had inconsistent visibility:
a) Protobuf was compiled with *hidden* visibility,
b) Substrait and ORC generated Protobuf code used default visibility,
so the order change caused `wasm-ld` to select symbols with different visibility.
 (e.g. `google::protobuf::internal::ZeroFieldsBase::Clear()` changed from hidden in Protobuf's `empty.pb.cc.o` to default visible in Substrait's `algebra.pb.cc.o`)

The failure showed up in Emscripten, no failures on other platforms, but matching visibility globally is desirable to prevent any unintended exports and symbol interposition.

### What changes are included in this PR?
Compile bundled Substrait and ORC with the same hidden visibility for symbols as Protobuf so not depending on archive order.
Also add debug for Emscripten CI builds `--profiling-funcs`.

### Are these changes tested?
Yes, `test-conda-python-emscripten` passes
(Local repro, debug and fix verification with `ARCH=amd64 archery docker run conda-python-emscripten`, for symbols `llvm-nm` and `wasm-ld`)

### Are there any user-facing changes?
No.
* GitHub Issue: #50774

Authored-by: Tadeja Kadunc <tadeja.kadunc@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2026-08-06 10:15:05 +09:00
Hiroyuki Sato 8ef974c3a1 GH-47289: [CI][Dev] Fix shellcheck errors in the ci/scripts/python_build_emscripten.sh (#47290)
### Rationale for this change

* SC1090: Can't follow non-constant source. Use a directive to specify location
* SC2086: Double quote to prevent globbing and word splitting

```
In ci/scripts/python_build_emscripten.sh line 26:
source ~/emsdk/emsdk_env.sh
       ^------------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ci/scripts/python_build_emscripten.sh line 31:
rm -rf ${python_build_dir}
       ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
rm -rf "${python_build_dir}"

In ci/scripts/python_build_emscripten.sh line 32:
cp -aL ${source_dir} ${python_build_dir}
       ^-----------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                     ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
cp -aL "${source_dir}" "${python_build_dir}"

In ci/scripts/python_build_emscripten.sh line 38:
pushd ${python_build_dir}
      ^-----------------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
pushd "${python_build_dir}"

For more information:
  https://www.shellcheck.net/wiki/SC1090 -- ShellCheck can't follow non-const...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
```  

### What changes are included in this PR?

* SC1090: disable source file check.
* SC2086: Quote variables.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #47289

Authored-by: Hiroyuki Sato <hiroysato@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2025-08-11 05:54:57 +09:00
2de8008748 GH-41910: [Python] Add support for Pyodide (#37822)
pyarrow knows about ARROW_ENABLE_THREADING and doesn't use threads if they are not enabled in libarrow.

Split from #37696 

* GitHub Issue: #41910

Lead-authored-by: Joe Marshall <joe.marshall@nottingham.ac.uk>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
2024-07-06 06:17:25 +09:00