Closed Olivier6767 closed 5 years ago
Could you make sure there is no newer commit ? I recently added a check for the resolv library On what system are you building ?
Could you try adding -lresolv at line 741 of CMakeList.txt
After a git pull, remove the CMakeFile/Cache folder/file
I'm building on Ubuntu 18.04. I just made a new Git Pull. I've a lto of files / folders in CMKaeFiles, which one do I need to remove ? In the meantime, I tried Make Clean / Make It is compiling now...
Remove the folder CMakeFiles and the file CMakeCache.txt then issue
cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt -DUSE_OPENSSL_STATIC="NO"
then make
I'm also on Ubuntu and got same issue. Worked by adding -lresolv as you said.
Edit: Ran : cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt -DUSE_OPENSSL_STATIC="NO"
But did not delete old files first. Did not work.
@norrland1 , if you do a 'git pull' it should already be added in the CMake file
Can't see it on line 741 but on line 691. Reset and building again.
$ git pull Already up to date.
IF-statement around line 741:
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(domoticz ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
target_link_libraries(domoticz ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES} ${EXECINFO_LIBRARIES})
else()
target_link_libraries(domoticz -lrt ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES} ${EXECINFO_LIBRARIES})
ENDIF()
@norrland1 , yes thats ok... closing issue
At least.. i hope it's solved..
Maybe it is a combination of both... final build running here
Did a complete reset so build is taking some time, at 84% now....
I think we only have to add it ~line 741 after -lrt ... building again...
Ok, I did git pull, removed CMakeFiles folder and CMakeCache.txt file, issued cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt -DUSE_OPENSSL_STATIC="NO" then make
I'm still having the error:
[100%] Linking CXX executable domoticz /usr/bin/ld: /home/Services/domotique/open-zwave-read-only/libopenzwave.a(DNSImpl.o): undefined reference to symbol 'ns_initparse@@GLIBC_2.9' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libresolv.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/domoticz.dir/build.make:3635: recipe for target 'domoticz' failed make[2]: *** [domoticz] Error 1 CMakeFiles/Makefile2:77: recipe for target 'CMakeFiles/domoticz.dir/all' failed make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
Yes, got same issue now.
Few minutes...
It does the trick, works fine if I add it to line 742.
target_link_libraries(domoticz -lresolv -lrt ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${LUA_LIBRARIES} ${MQTT_LIBRARIES} ${SQLite_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES} ${EXECINFO_LIBRARIES})
Yep it's building... but does it work for OpenBSD/Darwin ? Time will tell... If you do a 'git pull' it should work correctly now...
Yes got it, looks good now, at least from my end ;)
Yes I confirm, git pull, then make. All good. Thanks!
but does it work for OpenBSD/Darwin ? Time will tell...
Darwin did not build, because of dependency on libresolv, but this PR fixes that: https://github.com/domoticz/domoticz/pull/3526
Thanks all for the help ! I think it will have to be added for OpenBSD as well ;)
Seems that I'm having the same on Fedora29
@pipiche38 , could you explain a bit more... in the latest CMakeList.txt we added the resolv library Is it working now or does it now work ?
Sorry for the confusion. I switch to an existing system, and no issue at link time. So problem on my end.
Hope all works find... closing issue
I just updated open-zwave and Domoticz to the latest release. When linking Domoticz I now get the following error: