Skip to content

A fast, helpful, and open-source document parser

fix: add libc++abi and libunwind-dev to make stuff work(?)

Clelia (Astra) Bertelli5016374b1a5b
diff --git a/scripts/build-musl-node.sh b/scripts/build-musl-node.sh
index 2e43ebd..ba83c13 100644
--- a/scripts/build-musl-node.sh
+++ b/scripts/build-musl-node.sh
@@ -1,9 +1,14 @@
#!/bin/sh
set -eux
+# tesseract-rs's build.rs hard-codes -DCMAKE_CXX_COMPILER=clang++ and -stdlib=libc++,
+# so we need real clang + libc++ in the image (gcc/g++ from build-base is not enough).
+# Alpine's libc++ links against libc++abi and libunwind, hence those *-dev packages.
+# Static libs (openssl-libs-static, zlib-static) are required because musl rust defaults
+# to crt-static for build scripts.
apk add --no-cache \
build-base cmake git curl pkgconf perl \
- clang libc++-dev \
+ clang libc++-dev libc++abi libunwind-dev \
tesseract-ocr-dev leptonica-dev \
openssl-dev openssl-libs-static zlib-static