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

Add FreeBSD support. Tested with FreeBSD 10.2 and openHAB 1.8.0 #62

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

marcvk
Copy link

@marcvk marcvk commented Jan 11, 2016

Hi,

I patched nrjavaserial because I needed it to work with openHAB 1.8.0. It has been tested with FreeBSD 10.2 and works fine. The patches are trivial, no functional differences, just compile flags and changes to IOUtils and device names to support FreeBSD.

(based on original patches by Jan-Willem Spuij, see also
https://groups.google.com/forum/?pli=1#!topic/openhab/fLAs5NdLwpw)

@MrDOS
Copy link
Contributor

MrDOS commented Jan 11, 2016

Thank you for this! Looks good to me.

Out of curiosity, on Linux, we've had some troubles where we accidentally caused compatibility issues by compiling against newer versions of glibc than used by some distros we seek to support. Is there anything similar to watch out for on FreeBSD (i.e., should we in future seek to compile against an older release)?

Also, with a view to maybe one day completing #19, do you have any insight into how cross-compilation for FreeBSD from Linux could work? (I realize I can do my own research on this point, and I will, but I'm curious if you have any existing insight into the problem.)

@marcvk
Copy link
Author

marcvk commented Jan 11, 2016

Hi,

Great news, it’ll make supporting openHAB on FreeBSD much easier!

Regarding the libc issue, on FreeBSD there is no real separation between the kernel and distributions as in the Linux world. For FreeBSD the kernel and user land libraries and binaries come from the same source tree, so the possible number of permutations is much smaller. Of course if the binaries are old enough, it could eventually cause problems with newer FreeBSD releases. I could however also make this into a “port”. That way it will get built as part of the FreeBSD release process and everyone can chose to rebuild it himself.

Regarding the cross compilation, FreeBSD switched to clang a while ago as the system default compiler. However, gcc is still supported as a package and can be installed separately. I’ve compiled the FreeBSD binaries with clang however. It would maybe take some small tweaking to make it work, but maybe nothing more than changing ‘cc’ to ‘gcc’ in the makefiles.

Cheers,
Marc.

On 11 Jan 2016, at 15:21 , Samuel Coleman [email protected] wrote:

Thank you for this! Looks good to me.

Out of curiosity, on Linux, we've had some troubles where we accidentally caused compatibility issues by compiling against newer versions of glibc than used by some distros we seek to support. Is there anything similar to watch out for on FreeBSD (i.e., should we in future seek to compile against an older release)?

Also, with a view to maybe one day completing #19 #19, do you have any insight into how cross-compilation for FreeBSD from Linux could work? (I realize I can do my own research on this point, and I will, but I'm curious if you have any existing insight into the problem.)


Reply to this email directly or view it on GitHub #62 (comment).

@MrDOS
Copy link
Contributor

MrDOS commented Jan 11, 2016

Thanks for the insight. I'll leave this to @madhephaestus to merge once he OKs it and then it will presumably go out with the 3.12.0 release.

madhephaestus added a commit that referenced this pull request Jan 11, 2016
Add FreeBSD support. Tested with FreeBSD 10.2 and openHAB 1.8.0
@madhephaestus madhephaestus merged commit b382577 into NeuronRobotics:master Jan 11, 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

Successfully merging this pull request may close these issues.

3 participants