Skip to content

Unsatisfied link when used in conjunction with jnr-posix #300

@Melab

Description

@Melab

I have been attempting to use jnr-posix's native function calls inside GraalVM JavaScripy, but I have gotten error message that complain about an unsatisified link.

I cloned the following repositories at their linked-to commits:

In the top-level of each repository, I ran mvn -B package --file pom.xml. This produced several JAR files, the following of which I copied to ${JNR_JARS_DIR}:

  • jffi-1.3.10-SNAPSHOT.jar.
  • jffi-1.3.10-SNAPSHOT-native.jar.
  • jnr-constants-0.10.4.jar.
  • jnr-enxio-0.32.14-SNAPSHOT.jar.
  • jnr-ffi-2.2.12-SNAPSHOT.jar.
  • jnr-posix-3.1.16-SNAPSHOT.jar.

graaljs+jnr.sh is the shell scrupt that I used to test two JavaScript files, one of which uses DefaultPOSIXHandler and one which does not. The commands were as follows

graaljs+jnr.sh "Without DefaultPOSIXHandler.js" &> "Without DefaultPOSIXHandler.log"
graaljs+jnr.sh "With DefaultPOSIXHandler.js" &> "With DefaultPOSIXHandler.log"

The script includes the previously mentioned JAR files in the classpath of the executed java command.

Both attempts to retrieve the native POSIX interface fail with java.lang.UnsatisfiedLinkError.

The relevant files:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions