Version: latest from git
Platform: Raspberry Pi 3 b+, running NOOBS and with updated firmware.
I get errors when building latest version from git (git pull) when I have telldus installed.
[ 39%] Building CXX object CMakeFiles/domoticz.dir/hardware/Thermosmart.cpp.o
In file included from /root/dev-domoticz/hardware/Tellstick.cpp:3:0:
/root/dev-domoticz/hardware/Tellstick.h:20:33: error: expected ‘)’ before ‘genSwitch’
Command(_tGeneralSwitch genSwitch)
^
I have searched the forums (and with google) to see if any others have had this problem but not found anything.
root@mypi:~/dev-domoticz# cmake -DCMAKE_BUILD_TYPE=Release CMakeLists.txt
-- ###########################
-- Compiling Revision #9921
-- ###########################
-- Using builtin Mosquitto library
-- Python3 includes found at: /usr/include/python3.4m
-- Building with I2C support
-- Building with SPI support
-- OPENSSL_LIBRARIES: /usr/lib/arm-linux-gnueabihf/libssl.a;/usr/lib/arm-linux-gnueabihf/libcrypto.a
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106800
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:573 (find_package)
CMake Warning at /usr/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106800
Call Stack (most recent call first):
/usr/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/share/cmake-3.6/Modules/FindBoost.cmake:1411 (_Boost_MISSING_DEPENDENCIES)
CMakeLists.txt:573 (find_package)
-- Boost version: 1.68.0
-- Found the following Boost libraries:
-- thread
-- system
-- Linking against boost static libraries
-- ZLIB libraries found at: /usr/lib/arm-linux-gnueabihf/libz.so
-- ZLIB includes found at: /usr/include
-- Curl libraries found at: /usr/lib/arm-linux-gnueabihf/libcurl.so
-- Curl includes found at: /usr/include
-- LIBUSB found at: /usr/lib/arm-linux-gnueabihf/libusb.so
-- /root/open-zwave-read-only/libopenzwave.a
-- /usr/lib/arm-linux-gnueabihf/libudev.so
-- GPIO is available
-- Found telldus-core (telldus-core.h) at : /usr/include
-- Found libtelldus-core at : /usr/lib/libtelldus-core.so, adding telldus support
/usr/bin/c++ ;;-std=c++11;-O3;-DNDEBUG;-I/usr/include/python3.4m;-I/root/dev-domoticz/main;-I/root/dev-domoticz/tinyxpath;-I/usr/include;-I/usr/local/include;-I/usr/include;-I/root/dev-domoticz/zip;-I/usr/include;-I/root/dev-domoticz/hardware/openzwave;-DBUILTIN_MQTT;-DENABLE_PYTHON;-DHAVE_EXECINFO_H;-DHAVE_LINUX_I2C;-DHAVE_LINUX_SPI;-DWWW_ENABLE_SSL;-DWITH_LIBUSB;-DWITH_OPENZWAVE;-DWITH_GPIO;-DWITH_TELLDUSCORE -x c++-header -o /root/dev-domoticz/stdafx.h.gch/.c++ /root/dev-domoticz/main/stdafx.h
-- Using static libgcc/libstdc++
-- Configuring done
-- Generating done
-- Build files have been written to: /root/dev-domoticz
I have now fixed the boost library warnings from cmake. Had to upgrade cmake to latest version because there is a version dependency between boost version and cmake version. But that did not help with the error I get when compiling domoticz with telldus support.
[ 20%] Building CXX object CMakeFiles/domoticz.dir/hardware/XiaomiGateway.cpp.o
In file included from /root/dev-domoticz/hardware/Tellstick.cpp:3:0:
/root/dev-domoticz/hardware/Tellstick.h:20:33: error: expected ‘)’ before ‘genSwitch’
Command(_tGeneralSwitch genSwitch)
^
/root/dev-domoticz/hardware/Tellstick.h:25:9: error: ‘_tGeneralSwitch’ does not name a type
_tGeneralSwitch genSwitch;
^
/root/dev-domoticz/hardware/Tellstick.h:27:16: error: ‘system_time’ in namespace ‘boost’ does not name a type
boost::system_time repeatTimePoint;
^
/root/dev-domoticz/hardware/Tellstick.h:43:39: error: ‘_tGeneralSwitch’ does not name a type
void SendCommand(int devID, const _tGeneralSwitch &cmd);
^
/root/dev-domoticz/hardware/Tellstick.h:56:12: error: ‘posix_time’ in namespace ‘boost’ does not name a type
boost::posix_time::milliseconds m_repeatInterval;
^
/root/dev-domoticz/hardware/Tellstick.h: In constructor ‘CTellstick::Command::Command()’:
/root/dev-domoticz/hardware/Tellstick.h:19:15: error: class ‘CTellstick::Command’ does not have any field named ‘repeatTimePoint’
repeatTimePoint(boost::get_system_time()) {}
^
/root/dev-domoticz/hardware/Tellstick.h:19:31: error: ‘get_system_time’ is not a member of ‘boost’
repeatTimePoint(boost::get_system_time()) {}
^
/root/dev-domoticz/hardware/Tellstick.cpp: In constructor ‘CTellstick::CTellstick(int, int, int)’:
/root/dev-domoticz/hardware/Tellstick.cpp:19:7: error: class ‘CTellstick’ does not have any field named ‘m_repeatInterval’
m_repeatInterval(repeatInterval)
^
/root/dev-domoticz/hardware/Tellstick.cpp: In member function ‘void CTellstick::SetSettings(int, int)’:
/root/dev-domoticz/hardware/Tellstick.cpp:29:5: error: ‘m_repeatInterval’ was not declared in this scope
m_repeatInterval = boost::posix_time::milliseconds(repeatInterval);
^
/root/dev-domoticz/hardware/Tellstick.cpp: In member function ‘virtual bool CTellstick::WriteToHardware(const char*, unsigned char)’:
/root/dev-domoticz/hardware/Tellstick.cpp:41:47: error: no matching function for call to ‘CTellstick::Command::Command(const _tGeneralSwitch&)’
m_commands[pSwitch->id] = Command(*pSwitch);
^
/root/dev-domoticz/hardware/Tellstick.cpp:41:47: note: candidates are:
In file included from /root/dev-domoticz/hardware/Tellstick.cpp:3:0:
/root/dev-domoticz/hardware/Tellstick.h:17:9: note: CTellstick::Command::Command()
Command()
^
/root/dev-domoticz/hardware/Tellstick.h:17:9: note: candidate expects 0 arguments, 1 provided
/root/dev-domoticz/hardware/Tellstick.h:15:12: note: constexpr CTellstick::Command::Command(const CTellstick::Command&)
struct Command
^
/root/dev-domoticz/hardware/Tellstick.h:15:12: note: no known conversion for argument 1 from ‘const _tGeneralSwitch’ to ‘const CTellstick::Command&’
/root/dev-domoticz/hardware/Tellstick.h:15:12: note: constexpr CTellstick::Command::Command(CTellstick::Command&&)
/root/dev-domoticz/hardware/Tellstick.h:15:12: note: no known conversion for argument 1 from ‘const _tGeneralSwitch’ to ‘CTellstick::Command&&’
/root/dev-domoticz/hardware/Tellstick.cpp: In member function ‘virtual bool CTellstick::StopHardware()’:
/root/dev-domoticz/hardware/Tellstick.cpp:241:18: error: ‘class std::shared_ptr<std::thread>’ has no member named ‘joinable’
if (m_thread.joinable())
^
/root/dev-domoticz/hardware/Tellstick.cpp:242:18: error: ‘class std::shared_ptr<std::thread>’ has no member named ‘join’
m_thread.join();
^
/root/dev-domoticz/hardware/Tellstick.cpp: At global scope:
/root/dev-domoticz/hardware/Tellstick.cpp:246:6: error: prototype for ‘void CTellstick::SendCommand(int, const _tGeneralSwitch&)’ does not match any in class ‘CTellstick’
void CTellstick::SendCommand(int devID, const _tGeneralSwitch &genSwitch)
^
In file included from /root/dev-domoticz/hardware/Tellstick.cpp:3:0:
/root/dev-domoticz/hardware/Tellstick.h:43:10: error: candidate is: void CTellstick::SendCommand(int, const int&)
void SendCommand(int devID, const _tGeneralSwitch &cmd);
^
/root/dev-domoticz/hardware/Tellstick.cpp: In member function ‘void CTellstick::ThreadSendCommands()’:
/root/dev-domoticz/hardware/Tellstick.cpp:274:45: error: ‘m_repeatInterval’ was not declared in this scope
boost::system_time nextTime = now + m_repeatInterval;
^
/root/dev-domoticz/hardware/Tellstick.cpp:275:14: error: ‘map’ was not declared in this scope
for (map<int, Command>::iterator it = m_commands.begin();
^
/root/dev-domoticz/hardware/Tellstick.cpp:275:14: note: suggested alternative:
In file included from /usr/include/c++/4.9/map:61:0,
from /root/dev-domoticz/main/stdafx.h:46:
/usr/include/c++/4.9/bits/stl_map.h:96:11: note: ‘std::map’
class map
^
/root/dev-domoticz/hardware/Tellstick.cpp:275:18: error: expected primary-expression before ‘int’
for (map<int, Command>::iterator it = m_commands.begin();
^
/root/dev-domoticz/hardware/Tellstick.cpp:276:14: error: ‘it’ was not declared in this scope
it != m_commands.end();
^
/root/dev-domoticz/hardware/Tellstick.cpp:301:20: error: ‘class std::condition_variable’ has no member named ‘timed_wait’
m_cond.timed_wait(lock, nextTime);
^
/root/dev-domoticz/hardware/Tellstick.cpp: In member function ‘void http::server::CWebServer::Cmd_TellstickApplySettings(http::server::WebEmSession&, const http::server::request&, Json::Value&)’:
/root/dev-domoticz/hardware/Tellstick.cpp:316:13: error: ‘string’ was not declared in this scope
string hwIdStr = request::findValue(&req, "idx");
^
/root/dev-domoticz/hardware/Tellstick.cpp:316:13: note: suggested alternative:
In file included from /usr/include/c++/4.9/string:39:0,
from /root/dev-domoticz/main/stdafx.h:17:
/usr/include/c++/4.9/bits/stringfwd.h:62:33: note: ‘std::string’
typedef basic_string<char> string;
^
/root/dev-domoticz/hardware/Tellstick.cpp:317:20: error: expected ‘;’ before ‘repeatsStr’
string repeatsStr = request::findValue(&req, "repeats");
^
/root/dev-domoticz/hardware/Tellstick.cpp:318:20: error: expected ‘;’ before ‘repeatIntervalStr’
string repeatIntervalStr = request::findValue(&req, "repeatInterval");
^
/root/dev-domoticz/hardware/Tellstick.cpp:320:17: error: ‘hwIdStr’ was not declared in this scope
if (hwIdStr.empty() || repeatsStr.empty() || repeatIntervalStr.empty())
^
/root/dev-domoticz/hardware/Tellstick.cpp:320:36: error: ‘repeatsStr’ was not declared in this scope
if (hwIdStr.empty() || repeatsStr.empty() || repeatIntervalStr.empty())
^
/root/dev-domoticz/hardware/Tellstick.cpp:320:58: error: ‘repeatIntervalStr’ was not declared in this scope
if (hwIdStr.empty() || repeatsStr.empty() || repeatIntervalStr.empty())
^
/root/dev-domoticz/hardware/Tellstick.cpp:323:29: error: ‘hwIdStr’ was not declared in this scope
int hwID = atoi(hwIdStr.c_str());
^
/root/dev-domoticz/hardware/Tellstick.cpp:324:32: error: ‘repeatsStr’ was not declared in this scope
int repeats = atoi(repeatsStr.c_str());
^
/root/dev-domoticz/hardware/Tellstick.cpp:325:39: error: ‘repeatIntervalStr’ was not declared in this scope
int repeatInterval = atoi(repeatIntervalStr.c_str());
^
CMakeFiles/domoticz.dir/build.make:2116: recipe for target 'CMakeFiles/domoticz.dir/hardware/Tellstick.cpp.o' failed
make[2]: *** [CMakeFiles/domoticz.dir/hardware/Tellstick.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 21%] Building CXX object CMakeFiles/domoticz.dir/hardware/Yeelight.cpp.o
CMakeFiles/Makefile2:114: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
I am not a developer so I hope someone with that skill can help. Any takers?
I have now tried to install on a second RPi 3 B+, this time with clean installation of respbian and following the guides in wiki, but still gets the same error when trying to build with telldus support. Building without telldus works just fine. Which makes me wonder: Have anyone ever succeeded building with telldus support with the current version? If so, which boost library version was used?
[ 67%] Building CXX object CMakeFiles/domoticz.dir/hardware/Tellstick.cpp.o
In file included from /home/pi/dev-domoticz/hardware/Tellstick.cpp:3:0:
/home/pi/dev-domoticz/hardware/Tellstick.h:20:33: error: expected ‘)’ before ‘genSwitch’
Command(_tGeneralSwitch genSwitch)
^
/home/pi/dev-domoticz/hardware/Tellstick.h:25:9: error: ‘_tGeneralSwitch’ does not name a type
_tGeneralSwitch genSwitch;
^
/home/pi/dev-domoticz/hardware/Tellstick.h:27:16: error: ‘system_time’ in namespace ‘boost’ does not name a type
boost::system_time repeatTimePoint;
^
I have boost version 1.64 installed on my system. Can a developer have a look at this? Tellstick is a must for my system.
The instructions in http://www.domoticz.com/wiki/Raspberry_ ... rom_source is not complete. It gives instructions on how to build boost libraries, but fails to mention that you need to build latest version of cmake to be able to actually use the boost version you build.
However, it's not enough to do this to fix the issue with building telldus support... I think there is missing some include/refrences to either the date_time or chrono boost library to get telldus support to work. Any developers out there that can look into this please?