-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsatisfiedLinkError : cannot open shared object file #313
Comments
Hi there, I'm having the same issue and also don't know how to get rid of it... uname -a OS: Raspbian GNU/Linux 10 (buster) aarch64 |
Please test using this version of the library and let me know if you are still seeing the same problem: https://drive.google.com/file/d/1QzWPJg5MU_2YrnsB1MsOWeTbjYD84D2h/view?usp=sharing |
Thanks for your reply. I will give it a try as soon as I got time for that, the next days! I was able to get rid of that problem passing |
Btw, I see the original problem here. Your RPi is running an aarch64 OS (which is the 64-bit state of an armv8 processor); however, your Java binary is an aarch32 binary (which is the 32-bit state of an armv8 processor). This is an odd situation where your application architecture does not match your OS architecture, but it works because armv8 supports both the aarch32 and the aarch64 architectures. At startup, jSerialComm is detecting your OS as a 64-bit OS and trying to load the appropriate library, but its running within your 32-bit Java process, and therefore failing. Your solution of manually specifying |
@hedgecrw sorry in advance writing in a closed PR. I somehow missed the notification on this... I wasn't somehow able to get a JDK for aarch64 running. I'm using the LibericaJDK from Bellsoft. Anyhow, thanks for the good work! 😉 keep it up 🚀 |
@s-frei, that's actually a fantastic idea. I will update the next release to output the architecture of the native library trying to be loaded if it fails. Thanks for the suggestion! |
@hedgecrw one of the users of SolarThing came across this issue on their RPi4 (wildmountainfarms/solarthing#122). The Why isn't this something that is detected by jSerialComm? Shouldn't jSerialComm be able to know the java process is 32 bit? Maybe Figured I'd revive this issue since it's exactly what's happening, but let me know and I'll open a new issue if that is preferred to reviving this. |
Hi,
I did not find any answer for this problem on this forum.
I got this error :
The processor is armv7l.
I've tried :
1/ to put the .so file in /usr/lib and do "ldd" command
2/ to change rights on /tmp
3/ to specify a different tmp directory with -Djava.io.tmpdir
4/ to use a less recent library version
5/ to use "loadLibrary" and "load" in Java
Nothing works :(
Thanks in advance for your precious answer.
The text was updated successfully, but these errors were encountered: