Skip to content

UnsatisfiedLinkError: Error looking up function 'strlen' #21

@bhelx

Description

@bhelx

A report from a user. They got this error when trying to load a plugin but it failed:

at com.sun.jna.Function.<init> (Function.java:252)
    at com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:604)
    at com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:580)
    at com.sun.jna.NativeLibrary.getFunction (NativeLibrary.java:566)
    at com.sun.jna.Library$Handler.invoke (Library.java:243)
    at jdk.proxy3.$Proxy28.strlen (Unknown Source)
    at org.extism.sdk.Plugin.<init> (Plugin.java:49)
    at org.extism.sdk.Plugin.<init> (Plugin.java:61)
    at org.spirefy.engine.PluginEngine.load (PluginEngine.java:28)
    at org.spirefy.example.Example.main (Example.java:12)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:1570)
java.lang.UnsatisfiedLinkError: Error looking up function 'strlen': The specified procedure could not be found.

Looks to me like this code is not correct:

int errlen = LibExtism.INSTANCE.strlen(errormsg[0]);

we don't expose have a strlen function in libextism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions