Support OpenHarmony (openharmony-arm64) prebuilt
Problem
npm install tree-sitter-bash fails on OpenHarmony because node-gyp-build cannot find an openharmony-arm64 prebuilt, falling back to source compilation. Source compilation fails due to a V8 TLS compatibility issue on OpenHarmony (Node.js v24 __errno_location() crash).
Root Cause
The existing linux-arm64 prebuilt is compiled with the glibc/GNU toolchain, while OpenHarmony uses the clang/LLVM toolchain with its own libc. These ABIs are incompatible:
|
linux-arm64 prebuilt |
OpenHarmony required |
| C++ stdlib |
libstdc++.so.6 (GNU) |
libc++_shared.so (LLVM) |
| C runtime |
libc.so.6 (glibc) |
libc.so (OpenHarmony libc) |
| Dynamic linker |
ld-linux-aarch64.so.1 |
— (embedded) |
Fix
Add prebuilds/openharmony-arm64/tree-sitter-bash.node, compiled with the OpenHarmony clang toolchain.
A pre-compiled binary is attached as tree-sitter-bash-openharmony-arm64.node.zip (1.4MB unzipped). It was compiled with:
CC=clang CXX=clang++ npx node-gyp rebuild
on OpenHarmony using the official DevBox clang (v15.0.4).
Verification
- ✅
node-gyp-build correctly finds the openharmony-arm64 prebuilt
- ✅ Binary loads and runs successfully on OpenHarmony
- ✅ Correct runtime dependencies:
libc++_shared.so + libc.so
- ✅ OpenClaw (the AI agent framework that depends on tree-sitter-bash) works normally
Context
This issue was discovered while investigating why npm install -g openclaw@latest fails on OpenHarmony.
Detailed analysis (5-layer blocking chain, ABI comparison, and full verification log) is attached as README.md.
Adding this single prebuilt would enable tree-sitter-bash to work out-of-the-box on OpenHarmony, without requiring users to install additional toolchains or manually compile native modules.
README.md
tree-sitter-bash-openharmony-arm64.node.zip
Support OpenHarmony (openharmony-arm64) prebuilt
Problem
npm install tree-sitter-bashfails on OpenHarmony becausenode-gyp-buildcannot find anopenharmony-arm64prebuilt, falling back to source compilation. Source compilation fails due to a V8 TLS compatibility issue on OpenHarmony (Node.js v24__errno_location()crash).Root Cause
The existing
linux-arm64prebuilt is compiled with the glibc/GNU toolchain, while OpenHarmony uses the clang/LLVM toolchain with its own libc. These ABIs are incompatible:libstdc++.so.6(GNU)libc++_shared.so(LLVM)libc.so.6(glibc)libc.so(OpenHarmony libc)ld-linux-aarch64.so.1Fix
Add
prebuilds/openharmony-arm64/tree-sitter-bash.node, compiled with the OpenHarmony clang toolchain.A pre-compiled binary is attached as
tree-sitter-bash-openharmony-arm64.node.zip(1.4MB unzipped). It was compiled with:on OpenHarmony using the official DevBox clang (v15.0.4).
Verification
node-gyp-buildcorrectly finds theopenharmony-arm64prebuiltlibc++_shared.so+libc.soContext
This issue was discovered while investigating why
npm install -g openclaw@latestfails on OpenHarmony.Detailed analysis (5-layer blocking chain, ABI comparison, and full verification log) is attached as README.md.
Adding this single prebuilt would enable tree-sitter-bash to work out-of-the-box on OpenHarmony, without requiring users to install additional toolchains or manually compile native modules.
README.md
tree-sitter-bash-openharmony-arm64.node.zip