-
Notifications
You must be signed in to change notification settings - Fork 54
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
Differentiate between ARM hardware floating point and software #35
Comments
Other libraries use |
Could this be the cause for the attached error |
No, because your JVM uses hard-float (which most non-legacy arm devices will). Your issue may be related to this stack trace:
If that's the case, it's hard to know for sure, but may be a simple as a bug specific to that exact JVM build. If you extract another JVM and test it, does the issue go away? This could mean a variety of things, but at a glance, the JNI function call doesn't match. This could mean that you need to recompile your Java project with 2.9.2 on the classpath or could be something we missed in our native Line 33 in e02fb9c
|
I compiled the master branch on my Pi Zero and now I don't get the error anymore (did not change JVM)
The generated jar file does work (I renamed the jar file from jssc-2.9.3-SNAPSHOT.jar to jssc-2.9.2.jar)
Is something wrong with the provided libjssc.so in 2.9.2 maybe? |
No idea. It was cross-compiled using this: Line 46 in b09439e
... perhaps there's some flags we're missing? Certain CPU features might cause this, and if that case, we'd want to disable them. Any insight is welcome, we'll add it to the toolchain. |
I'm afraid I was unable to find out. I tried cross compiling on my machine, but that didn't work out (could not find compiler arm-linux-gnueabihf-g++-5, maybe to do with me not installing the correct package (I'm on Fedora)). I gathered the CMake output files, in case it's of any use. Thanks for your help! |
The There is simply too many OS and hardware combinations for one person to maintain, it requires testing and collaboration from others. Originally when this project was formed there were three volunteers and now it's just one. In regards to the compiler, it's probably a few letters off on Fedora, we'd happily accept a PR which uses the correct cross-compiler. Also if the wiki needs improvement to clarify anything, we're welcome to feedback. |
"hf" and "sf" are suffix abbreviations that represent CPU capabilities on ARM devices.
JSSC 2.8.0 had this distinction and supported loading the right one. It uses some tricks for this, including the
readelf
binary, which isn't necessarily available on all platforms by default. Here's the code:https://github.com/java-native/jssc/blob/v2.8.0/src/java/jssc/SerialNativeInterface.java#L118-L135
This functionality was removed with the
master
branch due tonative-lib-loader
library not having the same distinction capabilities.We are investigating two options:
native-lib-loader
to fix this. (see @bmhm's upstream PR: Add directory layout according to os-maven-plugin and osdetector-gradle-plugin scijava/native-lib-loader#32)Related #26
The text was updated successfully, but these errors were encountered: