Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved symbol: ts_set_allocator (macOS) #80

Open
mikepigott opened this issue Feb 16, 2025 · 9 comments
Open

Unresolved symbol: ts_set_allocator (macOS) #80

mikepigott opened this issue Feb 16, 2025 · 9 comments
Labels
help wanted Extra attention is needed

Comments

@mikepigott
Copy link

Hi, I'm trying to install this on my Mac. I have jextract installed:

% jextract --version
jextract 22
JDK version 22+35-2369
LibClang version clang version 13.0.0

However, when I run the rest of the README instructions, I get an java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator error, among others. I tried installing tree-sitter separately, though both cargo install --locked tree-sitter-cli and brew install tree-sitter, but I'm still getting this error. What am I doing wrong?

% git clone https://github.com/tree-sitter/java-tree-sitter
Cloning into 'java-tree-sitter'...
remote: Enumerating objects: 765, done.
remote: Counting objects: 100% (244/244), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 765 (delta 132), reused 163 (delta 83), pack-reused 521 (from 2)
Receiving objects: 100% (765/765), 166.83 KiB | 3.15 MiB/s, done.
Resolving deltas: 100% (280/280), done.
% cd java-tree-sitter 
% git submodule update --init
Submodule 'tree-sitter' (https://github.com/tree-sitter/tree-sitter) registered for path 'core'
Cloning into '/Users/mpigott/java-tree-sitter/core'...
Submodule path 'core': checked out 'f5afe475deb7c0bae6407fb776c76824f717bb61'
% mvn test
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/sonatype/central/central-publishing-maven-plugin/0.5.0/central-publishing-maven-plugin-0.5.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonatype/central/central-publishing-maven-plugin/0.5.0/central-publishing-maven-plugin-0.5.0.pom (16 kB at 28 kB/s)
...
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/core5/httpcore5-h2/5.2.4/httpcore5-h2-5.2.4.jar (237 kB at 476 kB/s)
[INFO] Inspecting build with total of 1 modules
[INFO] Not installing Central Publishing features. Preexisting publish related goal bindings found in 1 modules.
[INFO] 
[INFO] -----------------< io.github.tree-sitter:jtreesitter >------------------
[INFO] Building JTreeSitter 0.24.1
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom (9.1 kB at 233 kB/s)
...
Downloading from central: https://repo.maven.apache.org/maven2/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/jspecify/jspecify/1.0.0/jspecify-1.0.0.jar (3.8 kB at 89 kB/s)
[INFO] 
[INFO] --- maven-antrun-plugin:3.1.0:run (jextract) @ jtreesitter ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.10.12/ant-1.10.12.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.10.12/ant-1.10.12.pom (17 kB at 413 kB/s)
...
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.10.12/ant-1.10.12.jar (2.3 MB at 9.8 MB/s)
[INFO] Executing tasks
[INFO]      [echo] Generating sources using jextract
[INFO]      [exec] _malloc_type.h:51:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:51:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:52:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:52:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:53:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:53:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:54:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:54:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:55:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:55:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:56:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:56:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:58:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:58:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:65:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:65:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:66:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:66:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:67:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:67:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:68:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:68:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:69:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:69:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _malloc_type.h:70:1: warning: unknown platform 'visionos' in availability macro
[INFO]      [exec] _malloc_type.h:70:1: warning: unknown platform 'driverkit' in availability macro
[INFO]      [exec] _stdlib.h:128:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:130:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:131:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:132:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:135:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:137:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:137:45: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:138:59: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:138:73: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:137:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:143:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:143:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:152:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:153:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:153:52: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:154:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:154:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:156:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:157:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:157:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:165:27: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:165:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:165:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:166:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:166:34: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:166:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:167:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:167:38: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:167:39: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:169:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:169:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:169:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:172:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:172:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:172:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:175:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:175:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:175:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:178:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:178:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:178:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:184:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:187:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:187:51: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:188:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:192:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:194:29: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:194:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:194:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:195:31: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:196:29: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:196:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:196:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:197:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:197:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:38: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:198:47: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:201:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:201:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:205:29: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:206:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:207:29: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:212:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:212:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:213:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:215:29: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:217:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:220:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:223:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:225:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:227:27: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:227:46: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:227:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:232:24: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:232:2: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:233:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:233:45: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:235:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:239:27: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:239:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:248:26: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:263:42: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:268:27: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:282:28: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:282:47: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:283:59: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:283:73: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:282:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:288:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:288:34: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:288:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:290:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:290:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:290:28: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:290:29: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:290:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:291:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:291:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:291:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:291:31: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:292:27: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:292:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:293:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:293:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:293:29: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:293:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:294:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:294:33: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:294:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:295:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:296:19: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:296:33: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:296:41: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:296:42: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:297:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:297:34: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:297:42: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:297:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:300:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:301:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:301:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:302:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:302:28: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:302:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:303:24: warning: array parameter is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:305:2: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:306:30: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:316:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:317:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:317:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:319:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:320:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:320:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:323:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:324:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:324:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:326:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:327:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:327:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:330:18: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:331:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:331:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:334:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:335:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:335:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:338:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:338:64: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:339:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:339:51: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:339:65: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:342:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:343:43: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:343:57: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:346:20: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:346:64: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:347:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:347:51: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:347:65: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:348:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:348:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:348:77: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:350:24: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:352:37: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:352:38: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:352:78: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:358:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:358:84: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:358:85: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:362:21: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:362:34: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:362:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:364:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:364:35: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:364:36: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO]      [exec] _stdlib.h:366:13: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)
[INFO] Executed tasks
[INFO] 
[INFO] --- build-helper-maven-plugin:3.6.0:add-source (default) @ jtreesitter ---
[INFO] Source directory: /Users/mpigott/java-tree-sitter/target/generated-sources/jextract added.
[INFO] 
[INFO] --- spotless-maven-plugin:2.43.0:apply (format-sources) @ jtreesitter ---
Downloading from central: https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib/2.45.0/spotless-lib-2.45.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/com/diffplug/spotless/spotless-lib/2.45.0/spotless-lib-2.45.0.pom (1.5 kB at 29 kB/s)
...
Downloaded from central: https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.2/jackson-databind-2.17.2.jar (1.6 MB at 5.1 MB/s)
[INFO] Index file does not exist. Fallback to an empty index
[INFO] Spotless.Java is keeping 30 files clean - 0 were changed to be clean, 30 were already clean, 0 were skipped because caching determined they were already clean
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jtreesitter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/mpigott/java-tree-sitter/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jtreesitter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 37 source files to /Users/mpigott/java-tree-sitter/target/classes
[INFO] 
[INFO] >>> spotbugs-maven-plugin:4.8.6.6:check (default) > :spotbugs @ jtreesitter >>>
[INFO] 
[INFO] --- spotbugs-maven-plugin:4.8.6.6:spotbugs (spotbugs) @ jtreesitter ---
Downloading from central: https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.8.6/spotbugs-4.8.6.pom
Downloaded from central: https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.8.6/spotbugs-4.8.6.pom (6.7 kB at 47 kB/s)
...
Downloaded from central: https://repo.maven.apache.org/maven2/com/github/javaparser/javaparser-core/3.26.2/javaparser-core-3.26.2.jar (1.4 MB at 822 kB/s)
[INFO] Fork Value is true
[INFO] Done SpotBugs Analysis....
[INFO] 
[INFO] <<< spotbugs-maven-plugin:4.8.6.6:check (default) < :spotbugs @ jtreesitter <<<
[INFO] 
[INFO] 
[INFO] --- spotbugs-maven-plugin:4.8.6.6:check (default) @ jtreesitter ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO] 
[INFO] --- spotless-maven-plugin:2.43.0:apply (format-test-sources) @ jtreesitter ---
[INFO] Spotless.Java is keeping 30 files clean - 0 were changed to be clean, 0 were already clean, 30 were skipped because caching determined they were already clean
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ jtreesitter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/mpigott/java-tree-sitter/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ jtreesitter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 8 source files to /Users/mpigott/java-tree-sitter/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:3.5.2:test (default-test) @ jtreesitter ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/3.5.2/surefire-api-3.5.2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/3.5.2/surefire-api-3.5.2.pom (3.5 kB at 25 kB/s)
...
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-java5/3.5.2/common-java5-3.5.2.jar (18 kB at 418 kB/s)
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.github.treesitter.jtreesitter.TreeCursorTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.372 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.TreeCursorTest
[ERROR] io.github.treesitter.jtreesitter.TreeCursorTest -- Time elapsed: 0.372 s <<< ERROR!
java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Tree.close()" because "io.github.treesitter.jtreesitter.TreeCursorTest.tree" is null
		at io.github.treesitter.jtreesitter.TreeCursorTest.afterAll(TreeCursorTest.java:28)
		at java.base/java.lang.reflect.Method.invoke(Method.java:580)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
		... 1 more

[INFO] Running io.github.treesitter.jtreesitter.LookaheadIteratorTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.LookaheadIteratorTest
[ERROR] io.github.treesitter.jtreesitter.LookaheadIteratorTest -- Time elapsed: 0.007 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.LookaheadIteratorTest.beforeAll(LookaheadIteratorTest.java:16)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] Running io.github.treesitter.jtreesitter.QueryTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.QueryTest
[ERROR] io.github.treesitter.jtreesitter.QueryTest -- Time elapsed: 0.007 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.QueryTest.beforeAll(QueryTest.java:27)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Parser.close()" because "io.github.treesitter.jtreesitter.QueryTest.parser" is null
		at io.github.treesitter.jtreesitter.QueryTest.afterAll(QueryTest.java:33)
		at java.base/java.lang.reflect.Method.invoke(Method.java:580)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
		... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] Running io.github.treesitter.jtreesitter.TreeTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.005 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.TreeTest
[ERROR] io.github.treesitter.jtreesitter.TreeTest -- Time elapsed: 0.005 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.TreeTest.beforeAll(TreeTest.java:19)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Parser.close()" because "io.github.treesitter.jtreesitter.TreeTest.parser" is null
		at io.github.treesitter.jtreesitter.TreeTest.afterAll(TreeTest.java:25)
		at java.base/java.lang.reflect.Method.invoke(Method.java:580)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
		... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] Running io.github.treesitter.jtreesitter.ParserTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.ParserTest
[ERROR] io.github.treesitter.jtreesitter.ParserTest -- Time elapsed: 0.001 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.ParserTest.beforeAll(ParserTest.java:17)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] Running io.github.treesitter.jtreesitter.NodeTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.NodeTest
[ERROR] io.github.treesitter.jtreesitter.NodeTest -- Time elapsed: 0.003 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.NodeTest.beforeAll(NodeTest.java:14)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Tree.close()" because "io.github.treesitter.jtreesitter.NodeTest.tree" is null
		at io.github.treesitter.jtreesitter.NodeTest.afterAll(NodeTest.java:23)
		at java.base/java.lang.reflect.Method.invoke(Method.java:580)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
		at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
		... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] Running io.github.treesitter.jtreesitter.LanguageTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.LanguageTest
[ERROR] io.github.treesitter.jtreesitter.LanguageTest -- Time elapsed: 0.003 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
	at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
	at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
	at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8483)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8524)
	at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8536)
	at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
	at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
	... 2 more

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   LanguageTest.beforeAll:14 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   LookaheadIteratorTest.beforeAll:16 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   NodeTest.beforeAll:14 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   ParserTest.beforeAll:17 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   QueryTest.beforeAll:27 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   TreeCursorTest.beforeAll:20 » UnsatisfiedLink unresolved symbol: ts_set_allocator
[ERROR]   TreeTest.beforeAll:19 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[INFO] 
[ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  43.502 s
[INFO] Finished at: 2025-02-16T10:49:46-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test (default-test) on project jtreesitter: 
[ERROR] 
[ERROR] See /Users/mpigott/java-tree-sitter/target/reports/surefire for the individual test results.
[ERROR] See dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@ObserverOfTime
Copy link
Member

You're installing the tree-sitter CLI instead of the library.

make -C core
sudo make -C core install
export DYLD_LIBRARY_PATH=/usr/local/lib

@mikepigott
Copy link
Author

mikepigott commented Feb 17, 2025

I'm sorry; that didn't help.

I confirmed the library is there:

% ls $DYLD_LIBRARY_PATH/libtree-sitter.0.dylib
/usr/local/lib/libtree-sitter.0.dylib

But I'm still getting

java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator

Your README.md instructions say to

Install the tree-sitter & tree-sitter-java libraries

I assume the above command installs the tree-sitter library; what do I need to do for the tree-sitter-java library?

Also, could you add all of this to your README?

@ObserverOfTime
Copy link
Member

what do I need to do for the tree-sitter-java library?

git clone https://github.com/tree-sitter/tree-sitter-java
cd tree-sitter-java && make && sudo make install

Unfortunately I don't have a macOS machine to figure out what's wrong.

@ObserverOfTime ObserverOfTime changed the title java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator Unresolved symbol: ts_set_allocator (macOS) Feb 18, 2025
@ObserverOfTime ObserverOfTime added the help wanted Extra attention is needed label Feb 18, 2025
@maloewe-ona
Copy link

@mikepigott, are you able to build previous versions of java-tree-sitter which do not use ts_set_allocator, such as tag v0.24.1?

If that also fails to find (different) symbols, then maybe it is somehow loading a really old tree-sitter library version?
Or maybe it is failing to load the tree-sitter library for you at all? Due to f1f42c1 if loading the library from the OS-specific path with OS-specific name fails it falls back to SymbolLookup.loaderLookup() (which does not provide the library by default for the test runs either).
In that case you could also try v0.24.0 which does not include that commit, and should fail fast if loading the library fails.

@Jannyboy11
Copy link

Jannyboy11 commented Feb 23, 2025

I am experiencing the same issue on Windows:

Tree-sitter (installed via Chocolatey):

C:\Users\jan\hobby\java-tree-sitter>tree-sitter --version
tree-sitter 0.25.2 (6e0618704ad758ba2ea5822faa80bcd36fbeba3d)

Jextract:

C:\Users\jan\hobby\java-tree-sitter>jextract --version
jextract 22
JDK version 22+35-2369
LibClang version clang version 13.0.0

Compiled tree-sitter-java from source:

C:\Users\jan\hobby\tree-sitter-java>mkdir build
C:\Users\jan\hobby\tree-sitter-java>cd build
C:\Users\jan\hobby\tree-sitter-java\build>cmake ..
C:\Users\jan\hobby\tree-sitter-java\build>cmake --build . --config Release
MSBuild version 17.13.9+e0f243f1e for .NET Framework

  1>Checking Build System
  Generating parser.c
  Building Custom Rule C:/Users/jan/hobby/tree-sitter-java/CMakeLists.txt
  parser.c
     Creating library C:/Users/jan/hobby/tree-sitter-java/build/Release/tree-sitter-java.lib and object C:/User
  s/jan/hobby/tree-sitter-java/build/Release/tree-sitter-java.exp
  tree-sitter-java.vcxproj -> C:\Users\jan\hobby\tree-sitter-java\build\Release\tree-sitter-java.dll
  Building Custom Rule C:/Users/jan/hobby/tree-sitter-java/CMakeLists.txt

Added C:\Users\jan\hobby\tree-sitter-java\build\Release to my PATH environment variable.

Compiled this project using Maven:

build output
C:\Users\jan\hobby\java-tree-sitter>mvn verify
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules
[INFO] Not installing Central Publishing features. Preexisting publish related goal bindings found in 1 modules.
[INFO]
[INFO] -----------------< io.github.tree-sitter:jtreesitter >------------------
[INFO] Building JTreeSitter 0.24.1
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- antrun:3.1.0:run (jextract) @ jtreesitter ---
[INFO] Executing tasks
[INFO]      [echo] Generating sources using jextract
[INFO] Executed tasks
[INFO]
[INFO] --- build-helper:3.6.0:add-source (default) @ jtreesitter ---
[INFO] Source directory: C:\Users\jan\hobby\java-tree-sitter\target\generated-sources\jextract added.
[INFO]
[INFO] --- spotless:2.43.0:apply (format-sources) @ jtreesitter ---
[INFO] Spotless.Java is keeping 30 files clean - 0 were changed to be clean, 0 were already clean, 30 were skipped because caching determined they were already clean
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ jtreesitter ---
[INFO] skip non existing resourceDirectory C:\Users\jan\hobby\java-tree-sitter\src\main\resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ jtreesitter ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 37 source files with javac [debug target 22] to target\classes
[WARNING] location of system modules is not set in conjunction with -source 22
  not setting the location of system modules may lead to class files that cannot run on JDK 22
    --release 22 is recommended instead of -source 22 -target 22 because it sets the location of system modules automatically
[INFO]
[INFO] >>> spotbugs:4.8.6.6:check (default) > :spotbugs @ jtreesitter >>>
[INFO]
[INFO] --- spotbugs:4.8.6.6:spotbugs (spotbugs) @ jtreesitter ---
[INFO] Fork Value is true
[INFO] Done SpotBugs Analysis....
[INFO]
[INFO] <<< spotbugs:4.8.6.6:check (default) < :spotbugs @ jtreesitter <<<
[INFO]
[INFO]
[INFO] --- spotbugs:4.8.6.6:check (default) @ jtreesitter ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO]
[INFO] --- spotless:2.43.0:apply (format-test-sources) @ jtreesitter ---
[INFO] Spotless.Java is keeping 30 files clean - 0 were changed to be clean, 0 were already clean, 30 were skipped because caching determined they were already clean
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ jtreesitter ---
[INFO] skip non existing resourceDirectory C:\Users\jan\hobby\java-tree-sitter\src\test\resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ jtreesitter ---
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 8 source files with javac [debug target 22] to target\test-classes
[WARNING] location of system modules is not set in conjunction with -source 22
  not setting the location of system modules may lead to class files that cannot run on JDK 22
    --release 22 is recommended instead of -source 22 -target 22 because it sets the location of system modules automatically
[INFO]
[INFO] --- surefire:3.5.2:test (default-test) @ jtreesitter ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.github.treesitter.jtreesitter.LanguageTest
WARNING: A restricted method in java.lang.foreign.SymbolLookup has been called
WARNING: java.lang.foreign.SymbolLookup::libraryLookup has been called by io.github.treesitter.jtreesitter.internal.ChainedLibraryLookup in an unnamed module
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.157 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.LanguageTest
[ERROR] io.github.treesitter.jtreesitter.LanguageTest -- Time elapsed: 0.157 s <<< ERROR!
java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)

[INFO] Running io.github.treesitter.jtreesitter.LookaheadIteratorTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.003 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.LookaheadIteratorTest
[ERROR] io.github.treesitter.jtreesitter.LookaheadIteratorTest -- Time elapsed: 0.003 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.LookaheadIteratorTest.beforeAll(LookaheadIteratorTest.java:16)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO] Running io.github.treesitter.jtreesitter.NodeTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.NodeTest
[ERROR] io.github.treesitter.jtreesitter.NodeTest -- Time elapsed: 0.004 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.NodeTest.beforeAll(NodeTest.java:14)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
        Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Tree.close()" because "io.github.treesitter.jtreesitter.NodeTest.tree" is null
                at io.github.treesitter.jtreesitter.NodeTest.afterAll(NodeTest.java:23)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
                at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
                ... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO] Running io.github.treesitter.jtreesitter.ParserTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.002 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.ParserTest
[ERROR] io.github.treesitter.jtreesitter.ParserTest -- Time elapsed: 0.002 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.ParserTest.beforeAll(ParserTest.java:17)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO] Running io.github.treesitter.jtreesitter.QueryTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.QueryTest
[ERROR] io.github.treesitter.jtreesitter.QueryTest -- Time elapsed: 0.006 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.QueryTest.beforeAll(QueryTest.java:27)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
        Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Parser.close()" because "io.github.treesitter.jtreesitter.QueryTest.parser" is null
                at io.github.treesitter.jtreesitter.QueryTest.afterAll(QueryTest.java:33)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
                at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
                ... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO] Running io.github.treesitter.jtreesitter.TreeCursorTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.002 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.TreeCursorTest
[ERROR] io.github.treesitter.jtreesitter.TreeCursorTest -- Time elapsed: 0.002 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.TreeCursorTest.beforeAll(TreeCursorTest.java:20)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
        Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Tree.close()" because "io.github.treesitter.jtreesitter.TreeCursorTest.tree" is null
                at io.github.treesitter.jtreesitter.TreeCursorTest.afterAll(TreeCursorTest.java:28)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
                at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
                ... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO] Running io.github.treesitter.jtreesitter.TreeTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 s <<< FAILURE! -- in io.github.treesitter.jtreesitter.TreeTest
[ERROR] io.github.treesitter.jtreesitter.TreeTest -- Time elapsed: 0.004 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class io.github.treesitter.jtreesitter.Language
        at io.github.treesitter.jtreesitter.TreeTest.beforeAll(TreeTest.java:19)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
        Suppressed: java.lang.NullPointerException: Cannot invoke "io.github.treesitter.jtreesitter.Parser.close()" because "io.github.treesitter.jtreesitter.TreeTest.parser" is null
                at io.github.treesitter.jtreesitter.TreeTest.afterAll(TreeTest.java:25)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
                at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1117)
                ... 1 more
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: unresolved symbol: ts_set_allocator [in thread "main"]
        at io.github.treesitter.jtreesitter.internal.TreeSitter.lambda$findOrThrow$0(TreeSitter.java:33)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.findOrThrow(TreeSitter.java:33)
        at io.github.treesitter.jtreesitter.internal.TreeSitter$ts_set_allocator.<clinit>(TreeSitter.java:8484)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.ts_set_allocator(TreeSitter.java:8525)
        at io.github.treesitter.jtreesitter.internal.TreeSitter.<clinit>(TreeSitter.java:8537)
        at io.github.treesitter.jtreesitter.Language.<clinit>(Language.java:18)
        at io.github.treesitter.jtreesitter.LanguageTest.beforeAll(LanguageTest.java:14)
        ... 2 more

[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   LanguageTest.beforeAll:14 » UnsatisfiedLink unresolved symbol: ts_set_allocator
[ERROR]   LookaheadIteratorTest.beforeAll:16 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   NodeTest.beforeAll:14 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   ParserTest.beforeAll:17 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   QueryTest.beforeAll:27 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   TreeCursorTest.beforeAll:20 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[ERROR]   TreeTest.beforeAll:19 NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.Language
[INFO]
[ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  18.591 s
[INFO] Finished at: 2025-02-23T15:48:49+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.5.2:test (default-test) on project jtreesitter:
[ERROR]
[ERROR] See C:\Users\jan\hobby\java-tree-sitter\target\reports\surefire for the individual test results.
[ERROR] See dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

@Jannyboy11
Copy link

When I check out v0.24.1:

[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   LanguageTest.beforeAll:14 » UnsatisfiedLink unresolved symbol: ts_language_version
[ERROR]   LookaheadIteratorTest.beforeAll:16 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   NodeTest.beforeAll:14 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   ParserTest.beforeAll:17 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   QueryTest.beforeAll:27 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   TreeCursorTest.beforeAll:14 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   TreeTest.beforeAll:19 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[INFO]
[ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0

When I check out v0.24.0:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (jextract) on project jtreesitter: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "C:\Users\jan\hobby\java-tree-sitter\scripts\jextract.ps1" (in directory "C:\Users\jan\hobby\java-tree-sitter"): CreateProcess error=193, %1 is geen geldige Win32-toepassing
[ERROR] around Ant part ...<exec failonerror="true" executable="C:\Users\jan\hobby\java-tree-sitter/scripts/jextract.ps1" osfamily="windows">... @ 5:127 in C:\Users\jan\hobby\java-tree-sitter\target\antrun\build-jextract.xml
[ERROR] -> [Help 1]

@Yunlongs
Copy link

When I check out v0.24.1:

[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   LanguageTest.beforeAll:14 » UnsatisfiedLink unresolved symbol: ts_language_version
[ERROR]   LookaheadIteratorTest.beforeAll:16 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   NodeTest.beforeAll:14 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   ParserTest.beforeAll:17 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   QueryTest.beforeAll:27 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   TreeCursorTest.beforeAll:14 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[ERROR]   TreeTest.beforeAll:19 » NoClassDefFound Could not initialize class io.github.treesitter.jtreesitter.internal.TreeSitter$ts_language_version
[INFO]
[ERROR] Tests run: 7, Failures: 0, Errors: 7, Skipped: 0

When I check out v0.24.0:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (jextract) on project jtreesitter: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "C:\Users\jan\hobby\java-tree-sitter\scripts\jextract.ps1" (in directory "C:\Users\jan\hobby\java-tree-sitter"): CreateProcess error=193, %1 is geen geldige Win32-toepassing
[ERROR] around Ant part ...<exec failonerror="true" executable="C:\Users\jan\hobby\java-tree-sitter/scripts/jextract.ps1" osfamily="windows">... @ 5:127 in C:\Users\jan\hobby\java-tree-sitter\target\antrun\build-jextract.xml
[ERROR] -> [Help 1]

I encountered the same problem.

@ObserverOfTime
Copy link
Member

Tree-sitter (installed via Chocolatey):

Again, that's not the library.

@Jannyboy11
Copy link

Jannyboy11 commented Feb 24, 2025

I suppose what you are referring to is what the documentation calls libtree-sitter then.

Edit: after I compiled libtree-sitter from source (https://github.com/tree-sitter/tree-sitter/tree/master/lib) and put tree-sitter.dll on my %PATH%, the unresolved symbol error still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants