-
Notifications
You must be signed in to change notification settings - Fork 7
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
UnsatisfiedLinkError: Error looking up function 'strlen' #21
Comments
I am puzzled by this. The example URL code works fine from Java host. But trying to load a local wasm module it seems like it isn't even getting to my module.. e.g. the extism.sdk.Plugin.init call is looking for that strlen func for some reason? Which is odd that it would be since there is a length function in Java anyway. I feel like this is one of those "oh.. it's this other thing unrelated that is somehow causing this issue to rear up". |
Just another thought on this.. it seems like the strlen() call is because the p is null (prior to it in the Plugin.java call). So my assumption is p being null means it did not find/load my plugin.. The code:
I assume above that Pointer P using LibExtism.INSTNACE.extism_plugin_new() is trying to load/create the plugin, but that it returns null and this the if (p == null) bit runs, which is where this strlen function not found is happening. I'd be interested if whoever owns/knows the code might explain the issue with INSTANCE.strlen(). |
I think perhaps @thomasdarimont or @Zwiterrion may have written that piece. I believe it's a mistake, maybe the testing plugin had that export but it's not part of Extism so it's not gonna be present normally. I think we should remove it and instead use
Also perhaps @zshipko has an idea of the correct behavior here. |
I'd be happy to fix it but I can't reproduce the problem yet. |
@bhelx I'll take a look now. |
I checked on arm64, and i got the @apisorbust can you give us your os ? You may be on windows and we tested on Mac and Linux |
Ohhh I see. Yeah, we can't assume that is there. We should be able to not rely on it. Idk what OS he was on, he didn't say, but his paths suggested windows |
Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
Sorry.. didn't see this update thread. Yah.. windows 64.. but ya'll figured it out already. Just waiting on maven push for my app to pull down the fix and get cracking. Thank you again for jumping in on this and fixing it. |
A report from a user. They got this error when trying to load a plugin but it failed:
Looks to me like this code is not correct:
java-sdk/src/main/java/org/extism/sdk/Plugin.java
Line 49 in 91c1949
we don't expose have a
strlen
function in libextism.The text was updated successfully, but these errors were encountered: