B4J Question sqlite/java stopped working on raspberry pi: 'No native library found for os.name=Linux, os.arch=aarch64'

BillHart

New Member
Trying to run sqlite on raspberry pi I now get java exception 'No native library found for os.name=Linux, os.arch=aarch64' . I'm using sqlite release 3.44.1.0 (xerial download) on OpenJDK 11 java on raspberry pi. It was working swell for months until 5 days ago (Nov 25 '23), then without any change on my part this error started appearing. This occurs:
at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:283)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:67)

I checked, the jar file contains file org/sqlite/native/Linux/aarch64/libsqlitejdbc.so.

A similar problem was reported on this forum in October 2021. The answer then was to upgrade to the latest release, which on xerial is 3.44.1.0, but I tried that and many prior releases--all still fail.

The secondary java exception resulting from the first exception above is:
"OpenJDK Server VM warning: You have loaded library /tmp/sqlite-3.44.1.0-169a0270-6b5b-4f3d-8994-41cc47c85b72-libsqlitejdbc.so which might have disabled stack guard. "
 

BillHart

New Member
Thanks for your rapid response.
But this:
java -Djava.io.tmpdir=./tmp/ -jar worktracks-0.0.1.jar

...still results in this:
OpenJDK Server VM warning: You have loaded library /home/bill/tmp/sqlite-3.44.1.0-fa80a592-8af9-4946-9ef4-34e4fdea2b5f-libsqlitejdbc.so which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

It appears to have been compiled without enabling the required stack guard functions of the compiler. OS is raspian/debian linux.
 
Upvote 0

kristos44

New Member
Changing tmpdir didn't work for me. What worked was copying libsqlitejdbc.so file from jar sqlite-jdbc-3.46.1.3.jar under path org/sqlite/native/Linux/x86_64 to my test/resources dir and added this -> export LD_LIBRARY_PATH="$(pwd)/test/resources/org/sqlite/native/Linux/x86_64":$LD_LIBRARY_PATH to build.sh file to point where native libs can be found.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…