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
OpenBSD support for domoticz, cmake problem mostly #1231
Comments
Thanks for the reports! Could you try if the getExecutablePathName for FreeBSD is also working for OpenBSD, as they use the same sysctl function ? I think there should be no harm checking /proc, or for example /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input Can't help you with the normal openbsd nagging stuff... Again they got it wrong and is not misused ;) I can't see (clearly...) the first error in CMakeList.yxy (* fail. Bost and threads... -pthread fix) There are other users compiling this on OpenBSD as well... could it be that your using outdated versions of gcc/boost maybe ? |
The sysctl is same but the implementaton is different. On openBSD that returns the argv array and it may be different. Output of getExecutablePathName testing function:
Actually I ifdef'd out the infile.open("/proc/cpuinfo"); which would throw an exception. I was lazy and optimized out the dead code for OpenBSD. I just wanted to domoticz to compile first.
Also the tempereatures could be digged through sysctl(3) but there is no file to read them.
This comes from memory. Cmake tested for pthread and determined -pthread is right choice. I couldn't find anything similar listed in: https://cmake.org/cmake/help/git-master/module/FindBoost.html documentation. Cmake is one of those tool which I have avoided. The step which link.txt is edited is result from CMakeList.txt lines: 665 and 670-680 I believe.
Of course it is old gcc. OpenBSD lags behind in really stable versions. g++ (GCC) 4.2.1 20070719 |
Sound good... i might have created a problem upgrading MQTT, seems some users have connection issues now... strangely enough ;) |
The pull request seems reasonable. I'll have it set up in few days after rebasing to current version and figuring out of the best and proper way of doing the sensor handling. Could you have a look on the CMakeList.txt to get checks for -ptheads CXXFLAGS and -rt and --static-libstdc++ dropped when not supported? |
Is this issue still open ? |
I have had almost ready set for a while. Unfortunately life happen. And haven't had time to finish it yet. So yes I'm workkng on it. |
No worries... Just wanted to know if ended to keep this ticket open |
I had time to finish the code. However I still have the original problem of missing -pthread in everywhere where boost is used and undefined -rt in linking. Removing -rt is needed. So I'm not comfortable to push to master the changes. However code is here: https://github.com/vuokko/domoticz I have no idea how to fix that in cmake. Domoticz has quite large cmake environment. So good pointers, help, and hints are welcome. After fixing that I'll fire pull request. |
Some special handling for OpenBSD in Cmake to compile and link properly. Implements domoticz#1231
The changes in vuokko commit referenced here are part of current development branch. I guess this could be closed then. |
I think this can be closed. I'll sen more pull requests if I find more issues. |
I was able to hack and compile and at least start Domoticz on OpenBSD 6.0.
This is mainly cmake problem which isn't allowing it to compile and cmake is one of those things which I'm not familiar.
First some versions:
cmake-3.5.2
python-3.5.2
boost-1.58.0p2
git-2.9.0
The EPROTO substitute as OpenBSD doesn't have EPROTO in MQTT/config.h was selected from mosquitto-1.4.2 port patch.
I attached path and my notes to make it. I'm happy to test cmake features to enable clean compile.
domoticz_compile.txt
0001-Openbsd-compile-support-patch.txt
Edit: Added cmake logs
CMakeOutput_log.txt
CMakeError_log.txt
The text was updated successfully, but these errors were encountered: