NeuronRobotics / nrjavaserial

A Java Serial Port system. This is a fork of the RXTX project that uses in jar loading of the native code.
Other
344 stars 143 forks source link

FreeBSD Binaries out of date #164

Closed madhephaestus closed 4 years ago

madhephaestus commented 4 years ago

Someone needs to compile the 5.1.0 sources for FreeBSD

RafalLukawiecki commented 4 years ago

FreeBSD here. How can I help get them recompiled?

wborn commented 4 years ago

See building native code in the README. You can find the FreeBSD targets in the Makefile. Make sure to run it on the master branch so the libraries contain all the latest changes. Then create a PR that updates the recompiled native library/libraries in native/freebsd.

RafalLukawiecki commented 4 years ago

Thanks for the explanation @wborn, you made it clear how to share the binaries back with you. The only thing I am unsure about is how compiling the master branch will yield the 3.20.0 version. From what I can see, and having tried building the jar using gradle, it yielded version 5.0.0. I have not tried compiling the native code yet, so perhaps this is a moot point and 3.20 will just pop out somehow.

wborn commented 4 years ago

When @madhephaestus created this issue 3.20.0 was the latest version. The 4.x versions were compiled with Java 11 and thus required Java 11+. The 5.x versions are compiled with Java 8 and work with Java 8-11+

We'll also switch to version 5.x before openHAB 3 is released.

RafalLukawiecki commented 4 years ago

Between I and another OH user who might get there before me we will get you FreeBSD binaries of 5.0.0. I will separately report the issue with lockfiles in openhab-core, and I cross my fingers and hope that I can somehow recompile the lot to solve the problem I have in 2.5.4. I will link to this when the issue is ready.

madhephaestus commented 4 years ago

the native sources shouldn't have changes since 3.20.0, but compile against 5.0.0 is also good.

More importantly, i would like to get build instructions for ubuntu 18.04+ to cross compile these binaries. We are trying to set up CI to build all the platforms of native binaries, so the cross-compile on Linux is a goal.

wborn commented 4 years ago

Maybe @marcvk can also help with this? The current FreeBSD libraries were added in https://github.com/NeuronRobotics/nrjavaserial/pull/62.

RafalLukawiecki commented 4 years ago

I have just recompiled master against the two FreeBSD targets (32 and 64 bit), see the pull request #170. Let me know if you need any other artefacts made on FreeBSD. I hope this somehow helps in the quest to solve some of the OH 2.5 nrjavaserial issues, like non-working RFC2217 ports (https://github.com/openhab/openhab-core/issues/1462) and breaking Java runtime due to lockfiles (https://github.com/openhab/openhab-core/issues/1461).

RafalLukawiecki commented 4 years ago

May I ask a beginner's question, please? If I wanted to test if the newer version/binaries of nrjavaserial make any difference to the two issues that I am trying to solve, can I just swap out some files from within the OpenHAB runtime, or do I need to recompile the whole lot?

madhephaestus commented 4 years ago

@RafalLukawiecki thank you, ill push out an update soon!

As for testing in OpenHAB, i think that question is more for them.

madhephaestus commented 4 years ago

this should be resolved as of 5.0.2 in Maven

RafalLukawiecki commented 4 years ago

@wborn, now that 5.0.2 with the new native code is on Maven, when will it make to https://openhab.jfrog.io/openhab/libs-release/com/neuronrobotics/nrjavaserial/ —is that transfer automatic? Thanks for guiding me on this.

madhephaestus commented 4 years ago

It is synced to Maven Central and is availible now.

RafalLukawiecki commented 4 years ago

Thank you, @madhephaestus! Much appreciated. On another note, I (and to some extent @wborn) are wondering if the issues I am seeing under FreeBSD might be related to the way nrjavaserial deals with locking. I have done some preliminary testing using yesterday evening build which I have described here and here. Perhaps I should report them as issues against this repo?

madhephaestus commented 4 years ago

I am reopening this because i added a C level feature that should be added to FreeBSD as well. THe feature is explained here: https://github.com/NeuronRobotics/nrjavaserial/releases/tag/5.1.0

RafalLukawiecki commented 4 years ago

Would you like me to recompile now?

madhephaestus commented 4 years ago

Yes please :)

madhephaestus commented 4 years ago

Thanks!

RafalLukawiecki commented 4 years ago

Pleasure! I'd like to ask for a spot of help in debugging nrjavaserial under FreeBSD in a few moments, if you don't mind... I can create an issue for that.

madhephaestus commented 4 years ago

FreeBSD binaries up to date as of 5.1.1