-
Notifications
You must be signed in to change notification settings - Fork 1.1k
FreeBSD doesn't have libresolv like Linux. Fixing the code #1344
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
Conversation
|
Does this mean you will never be able to compile the feature OpenZWave library ? |
|
All of this is handled by libc on Freebsd. |
|
Sorry about close/reopen... :D |
|
The developpement branch of OZW works as well too on my platform (just tested). |
|
someone added this patch recently... maybe it was not compiling under ubuntu.... have to check |
|
Without this PR, we cannot compile Domoticz on FreeBSD :/ But all check show we can compile on Linux flavor and Darwin, so I think it is ok. Is there any possibility to add a FreeBSD check somewhere? |
|
Question: If not that I think that means new OpenZwave development no longer supports FreeBSD unless they fix it. We can put in a request at OpenZWave after all is clarified. Note: In my case, on Ubuntu, I could build the OpenZWave static lib ok. I also could compile the latest Domoticz error free. When Domotizc was linked I got the linker errors because of the missing -lresolv switch. After adding the switch it was linking ok and testing proved open-zwave was working fine. |
|
By the way, it looks like the pull request does work around the problem, doesn't it ? I am saying it because my recent experience tells me getting changes into OpenZWave is a slow process. So a workaround seems to be the better option to me. (correct me if I am wrong) |
|
FYI: This is the linker error I got on Ubuntu when linking Domoticz: /git/open-zwave-read-only/libopenzwave.a(DNSImpl.o): undefined reference to symbol 'ns_initparse@@GLIBC_2.9' |
|
@hvbommel the error you have on Ubuntu, is with my patch or usualy ? |
|
it failed without any patch related to this problem. It was fixed after the little -lresolv change in CMakeLists.txt and it will also work with your update, need to test that |
|
I checked my CMakelists.txt end see that the "IF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ... " is already in. So is there still a problem ? Ie why is this PR still open is my question ? |
|
My reply is clearly yes : If you look a CMakeLists.txt on line 602: You clearly assume that target_link_libraries(domoticz ${OpenZWave} -lresolv) handle libresolv and then after on line 610 you check for FreeBSD. So this PR fixes FreeBSD support since it doesn't need SysV libresolv. Thanks |
|
I put your change proposals into my CMakeLists.txt on Ubuntu and did a build. It works fine. So I think it is the way to go. |
|
@hvbommel Thanks :) |
|
Thanks all for testing ! |
On FreeBSD there is no libresolv. So move the -lresolv only when Linux (or for some OS that needs it).