Skip to content

Fail to load library on aarch64 macs #117

@valepakh

Description

@valepakh

Describe the bug
When running the library inside a musl-based container (e.g. Alpine base image) on an arm-based Mac, the library fails to load with the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /.../.tree-sitter/lib/aarch64-linux-gnu-tree-sitter.so: Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /.../.tree-sitter/lib/aarch64-linux-gnu-tree-sitter.so)
  at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
...
  at java.base/java.lang.System.load(Unknown Source)
  at org.treesitter.utils.NativeUtils.loadLib(NativeUtils.java:150)

Expected behavior
The library should be able to load on the musl-based systems.

OS and Java version

  • OS: Mac OS
  • Java version: 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions