-
Notifications
You must be signed in to change notification settings - Fork 588
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
armhf is not correctly detected on openjdk8, raspbian jessie #105
Comments
@vb216 What do you think we should do? |
I wondered if this might crop up, as I picked a value based on using oracle jdk, and didn't have openjdk installed to see what info it gives @blucoat - are you able to do a print of the system properties picked up by openjdk and post them over? There might be some equivalent that would be easy enough to add into the build. If not, I can install openjdk and take a look, will just take a little while. |
This is the output of System.getProperties():
I don't see anything here that indicates hard floating point, except for directory names, which seem very system-dependant. It looks like the |
Hm yes, nothing definitive, but I wonder if some logic like if the runtime name has OpenJDK in it, and maybe then if java.library.path contains arm-linux, then assume linux-armhf? It's not bullet proof, but if thats the default dir for openjdk in raspbian, it would probably cater for a high percentage of users? |
What about checking in platform-specific ways, like checking /proc/cpuinfo in Linux, and similar ways on other systems? |
I'd need to have another deeper look, I think I went for Java based approach as its easy to just see the system properties. More than that and you've got to worry about platform specific filesystem access. But, I guess from the java props you would know if its Linux, you could see if /proc/cpuinfo exists and accessible, and try and handle it. @saudet any preference? |
This thread mentions some possible ways other projects do it. Using |
I don't have any preferences with how to go about it, as long as we don't start poking in |
I read the thread blucoat pointed to, I remember actually reading it the @blucoat, I wondered about soft floating on hard float too.. but I think My gut feel, is to put in the path approach, as its quick (meaning I'd have |
* Work around `linux-armhf` not being properly detected with OpenJDK (issue #105)
Fix is included in version 1.3, enjoy! Please let me know if you still have problems with this though. Thanks for reporting! |
The
Loader
class currently tells the difference between arm and armhf using thesun.arch.abi
system property. On the latest openjdk 8 on Raspbian Jessie, this property is not set by default, which will cause libraries to fail to load.A simple workaround is to pass this variable manually at runtime with
-Dsun.arch.abi=gnueabihf
.I don't know of another way to detect the abi, but if this can't be fixed it should at least be clearly documented.
The text was updated successfully, but these errors were encountered: