Just got my Pine 64 running and getting this error from the system info binding.
(HANDLER_INITIALIZING_ERROR): Unable to load library 'udev': Native library (linux-arm/libudev.so) not found in resource path (/opt/openhab/runtime/karaf/lib/boot/org.apache.karaf.diagnostic.boot-4.0.4.jar:/opt/openhab/runtime/karaf/lib/boot/org.apache.karaf.jaas.boot-4.0.4.jar:/opt/openhab/runtime/karaf/lib/boot/org.apache.karaf.main-4.0.4.jar:/opt/openhab/runtime/karaf/lib/boot/org.osgi.core-6.0.0.jar)
2016-06-19 18:03:40.756 [hingStatusInfoChangedEvent] - âsysteminfo:computer:openhabâ changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Could not initialize class oshi.jna.platform.linux.Udev
2016-06-19 18:03:40.744 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing âsysteminfo:computer:openhabâ: java.lang.NoClassDefFoundError: Could not initialize class oshi.jna.platform.linux.Udev
at org.openhab.binding.systeminfo.model.OshiSysteminfo.(OshiSysteminfo.java:66)
at org.openhab.binding.systeminfo.handler.SysteminfoHandler.initialize(SysteminfoHandler.java:96)
I did an apt-get install lib-udev, and it installed /lib/aarch64-linux-gnu/libudev.so.1.6.4
Did I miss something, or is this related to the 64-bit chip being used?
Yes, this is likely due to 64 bit Linux. Are you using the official openHAB Pine64 image? This starts Java as 32bit and thus should not show this problem.
The other option is to use the systeminfo 2.0 binding, which does not require any native libs.
Err, you are right. From the discussion around it, I assumed that it does not need any native libs, but the oshi java lib seems to require some native calls after allâŚ
So the outstanding question is whether either or both bindings work on PINE64 when run under 32-bit Java, which I think you have previously reported is preferable to 64-bit Java for openHAB.
No, 32-bit is clearly preferable for all ARM SBCs, see here.
And with this, I would assume that the systeminfo binding should work all fine, just as the RXTX does.
Solved it by installing the 32-bit version of the library, and creating the correct links. Likely need to get the OSHI team to change how they look for the library.
Install the 32-bit library
apt-get install udev:armhf
Create link for the 32-bit folder. Files are installed in /lib/arm-linux-gnueabihf, but OSHI is looking in /lib/linux-arm
ls -s /lib/arm-linux-gnueabihf/ /lib/linux-arm
Create the .so link. (install created the .so.1 file)
@svilenvul any chance you can send me the jar file? I donât have a development environment setup, and am having issues getting eclipse to load the openhab workspace.
Is there any chance that the 1.x Systeminfo legacy binding could be used instead? There are native libraries as well, but if you have a SIGAR native library that works on PINE64, you can use it with the binding.
I got the systeminfo binding working by adding the path to libudev â/lib/arm-linux-gnueabihf/â to the start options in
"/etc/default/openhab2" after installing using recipe above.