I am writing a bluecove script for my raspberry pi 3B+. I have compiled the bluecove library and the GPL myself on the pi, from the following git repo using ant all for both jars.
https://github.com/hcarver/bluecove/tree/master
Everything is compiled in java 8, since javah doesnt work anymore and is necessary for compiling.
In compiling bluecove-gpl, a file called libbluecove_aarch64.so is created, and i think is meant to be placed in /tmp/bluecove_bluez_0/. However the folder is never created.
the error occurs as soon as this line runs:
localDevice = LocalDevice.getLocalDevice();
here is the entire error i get from my program, its just a simple bluetooth scanning script, it works perfectly on windows so im sure that my code isnt the problem.
java.lang.UnsatisfiedLinkError: /tmp/bluecove_bluez_0/libbluecove_aarch64.so: /tmp/bluecove_bluez_0/libbluecove_aarch64.so: undefined symbol: sdp_extract_pdu
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)
at java.lang.Runtime.load0(Runtime.java:782)
at java.lang.System.load(System.java:1098)
at com.intel.bluetooth.NativeLibLoader.loadAsSystemResource(NativeLibLoader.java:400)
at com.intel.bluetooth.NativeLibLoader.isAvailable(NativeLibLoader.java:252)
at com.intel.bluetooth.BlueCoveImpl.loadNativeLibraries(BlueCoveImpl.java:401)
at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:457)
at com.intel.bluetooth.BlueCoveImpl.access$500(BlueCoveImpl.java:70)
at com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:1085)
at java.security.AccessController.doPrivileged(Native Method)
at com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:1083)
at com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:1076)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:75)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:95)
at Main.main(Main.java:20)
Native Library bluecove_aarch64 not available
Exception in thread "main" javax.bluetooth.BluetoothStateException: BlueCove library bluecove not available;
load resource [/tmp/bluecove_bluez_0/libbluecove_aarch64.so] /tmp/bluecove_bluez_0/libbluecove_aarch64.so: /tmp/bluecove_bluez_0/libbluecove_aarch64.so: undefined symbol: sdp_extract_pdu
load [bluecove_aarch64] no bluecove_aarch64 in java.library.path
at com.intel.bluetooth.BlueCoveImpl.loadNativeLibraries(BlueCoveImpl.java:404)
at com.intel.bluetooth.BlueCoveImpl.detectStack(BlueCoveImpl.java:457)
at com.intel.bluetooth.BlueCoveImpl.access$500(BlueCoveImpl.java:70)
at com.intel.bluetooth.BlueCoveImpl$1.run(BlueCoveImpl.java:1085)
at java.security.AccessController.doPrivileged(Native Method)
at com.intel.bluetooth.BlueCoveImpl.detectStackPrivileged(BlueCoveImpl.java:1083)
at com.intel.bluetooth.BlueCoveImpl.getBluetoothStack(BlueCoveImpl.java:1076)
at javax.bluetooth.LocalDevice.getLocalDeviceInstance(LocalDevice.java:75)
at javax.bluetooth.LocalDevice.getLocalDevice(LocalDevice.java:95)
at Main.main(Main.java:20)
I tried creating the folder myself and placing the .so file, but it just gets deleted.
I tried placing the .so file in the classpath, thinking maybe it would be found but it doesnt do anything.