Skip to content

v1.0.12 - Fix Sharp Dynamic Linker RPATH

Choose a tag to compare

@kryptobaseddev kryptobaseddev released this 10 Oct 06:35
· 1 commit to main since this release

馃敡 Bug Fixes

Sharp Module - Dynamic Linker Fix

  • Created RPATH-compatible symlink inside sharp-linux-arm64 package
  • The .node binary's RPATH now correctly finds libvips-cpp.so.8.17.2
  • Fixed: libvips-cpp.so.8.17.2 => not found error

Root Cause (v1.0.11 Issue)

The sharp-linux-arm64.node binary has embedded RPATH:

$ORIGIN/../../sharp-libvips-linux-arm64/lib

This expects a symlink at:

node_modules/.pnpm/@img+sharp-linux-arm64@0.34.4/node_modules/@img/sharp-libvips-linux-arm64

v1.0.11 created top-level symlinks (node_modules/@img/sharp-libvips-linux-arm64) but not the package-internal symlink that RPATH needs.

The Fix (v1.0.12)

Created symlink inside sharp-linux-arm64's own node_modules directory:

node_modules/.pnpm/@img+sharp-linux-arm64@0.34.4/node_modules/@img/sharp-libvips-linux-arm64
  -> ../../../@img+sharp-libvips-linux-arm64@1.2.3/node_modules/@img/sharp-libvips-linux-arm64

This matches pnpm's standard dependency linking structure.

Verification

After installing v1.0.12 on Raspberry Pi:

cd /opt/escapeplan/api
node -e "console.log(require('sharp'))"
# Expected: [Function (anonymous)] { ... }

ldd node_modules/.pnpm/@img+sharp-linux-arm64@0.34.4/.../sharp-linux-arm64.node | grep libvips
# Expected: libvips-cpp.so.8.17.2 => /opt/escapeplan/api/node_modules/...

Full debugging: SESSION_2025-10-09_SHARP_MODULE_DEBUGGING.md