Error running OpenKinect example sketch Processing 3.2.1: Java.Lang.Unsatisfied Link Error

edited September 2016 in Raspberry PI

So I installed Processing 3.2.1 on my Raspberry Pi 3 Model B and imported the OpenKinect library from the Add library. I run the example RGBDepthTest2 for both Kinectv1 and Kinectv2 (I have the 1414 Kinect) and I get the same error:

"The sketch has been automatically resized to fit the screen resolution not compatible with the current OS or is a 32 bit system
java.lang.UnsatisfiedLinkError: org.openkinect.freenect2.Device.jni()J at
processing.opengl.PSurfaceJOGLS2.run(PSurfaceJOGL.java:457) 
at java.lang.Thread.run(Thread.java.745)
Unsatisfied Link Error: org.openkinect.freenect2.Device.jniInit(0J
A library relies on native code that's not available.
Or only works properly when the sketch is run as a 64-bit application."

Answers

  • The OpenKinect library from the Library Manager is currently not compatible with the Raspberry Pi. This version should work: https://github.com/processing/processing/wiki/Supported-Platforms#library-openkinect

  • edited September 2016

    Ok I will try this and see if this is a fix. Thank you

  • I have Processing 3.0.1 and Processing 3.2.1 and I installed that library. I opened up an example from the folder that I downloaded the OpenKinect library from and I still get an error:

    Unsatisfied link error: Unable to load library 'freenect': Native library (linux-arm/libfreenect.so) not found in resource path. A library relies on native code that's not available.

  • Do you have the freenect library? Where is it?

  • it is in: /Downloads/openkinect_processing/library/v1/linux-armv6hf/libfreenect.so

  • my java.library.path = /usr/java/packages/lib/arm: /lib: /usr/lib

  • So either copy the library to a directory on the path or add the library directory to the path.

    That said, that path looks way too complicated.

  • A softlink might be better than copying.

  • The custom version linked above should really work out of the box, without the need to modify java.library.path, or creating symlinks.

  • Is this a known issue? It didn't work out of the box for me.

    Also, I tried copying libfreenect.so to /lib/ and it doesnt copy for some reason, even when I use sudo command (it performs the execution, but when I view the contents of the /lib/ the libfreenect.so is not in the directory. I haven't tried the other paths, but will soon. (I will try a soft link as well when I have a chance).

    As a side note, maybe installing libfreenect package from synaptic or aptitude should suffice? Will the driver work for the RPi or does it have to be a driver for compatible with the linux-armv6 and up architecture such as the RPi?

  • Answer ✓

    @esreyna95

    I don't have a Kinect at hand to test this currently, but I didn't ran into the same unsatisfied link error as you, so could you check if these steps work for you?

    1. Delete any already installed OpenKinect library from ~/sketchbook/library.
    2. Download this file and unzip it into ~/sketchbook/library.
    3. Place this file into /etc/udev/rules.d. (You will need to use sudo to do so - e.g. sudo mv 51-kinect.rules /etc/udev/rules.d.)
    4. Run the Kinect_v1/RGBDepthTest example that is part of the library.

    On my Pi I receive the following output:

    32 linux
    Found path: /home/pi/sketchbook/libraries/openkinect_processing/library/v1/linux-armv6hf/
    Loaded freenect from /home/pi/sketchbook/libraries/openkinect_processing/library/v1/linux-armv6hf/libfreenect.so
    No Kinect devices found.
    Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.There are no kinects, returning null 
    

    ... which is expected, as there is no Kinect connected, but you see that the library got loaded just fine.

    Hope this helps.

  • edited September 2016

    Wow this fixed the problem. I needed to delete any existing openKinect libraries and reinstall the new library into the library folder. I appreciate your constant help in this!

    Do any of the other examples work? I've tried running those as well but I just get a black screen about Xlib: extension "RANDR" missing on display ":1.0"

  • Sorry, don't have a Kinect to test.

Sign In or Register to comment.