Skip to content
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

ARM library load order might be wrong #47

Closed
MrDOS opened this issue Nov 20, 2015 · 4 comments
Closed

ARM library load order might be wrong #47

MrDOS opened this issue Nov 20, 2015 · 4 comments

Comments

@MrDOS
Copy link
Contributor

MrDOS commented Nov 20, 2015

I interpret the way the list of ARM libraries is defined in code and how they're iterated over and loaded as preferring the ARMv5 library, then ARMv6HF, ARMv6, ARMv7HF, and finally ARMv7. And if I understand how ARM backwards compatibility works, the ARMv5 library should work fine on later architectures. So I wonder if this code isn't mostly seeing success loading the ARMv5 library and not touching anything else.

@TheNetStriker, you were building ARMv7 – did you run into any troubles with this?

@TheNetStriker
Copy link

On my device (BeagleBone) the libNRJavaSerialv5 cannot be loaded, then the libNRJavaSerialv6_HF loads and that library works. (I've got the two directories libNRJavaSerialv5_openhab_0 and libNRJavaSerialv6_HF_openhab_0 in my tmp directory)

@MrDOS
Copy link
Contributor Author

MrDOS commented Nov 20, 2015

What did you have to do to get your ARMv7 build for #36 to work? Or were you just using an x86 build on your desktop in that case?

@TheNetStriker
Copy link

I didn't get the build to work on my Ubuntu amd64 system, so I've built the library directly on the Beaglebone. But the BeagleBone only seams to be able to compile the HF builds.

@mnlipp
Copy link
Contributor

mnlipp commented Jan 18, 2016

The load order is definitely wrong. I checked it with a Raspberry Pi 1 (armv6) and 2 (armv7). As things are currently, both load libNRJavaSerialv6_HF, because due to backward compatibility this also works fine on the armv7. (libNRJavaSerialv5 doesn't load, presumably because it uses soft float.)

I think the order should be

private String[] armLibs = {"libNRJavaSerial_HF","libNRJavaSerial","libNRJavaSerialv6_HF","libNRJavaSerialv6","libNRJavaSerialv5"};

This loads libNRJavaSerialv6_HF on the Raspberry Pi (1) and libNRJavaSerialv7_HR on the Raspberry Pi 2.

mnlipp added a commit to mnlipp/nrjavaserial that referenced this issue Mar 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants