domoticz / domoticz

Open source Home Automation System
http://www.domoticz.com
GNU General Public License v3.0
3.49k stars 1.13k forks source link

Building CXX object CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/ozwcp.cpp.o failed #2101

Closed chatainsim closed 6 years ago

chatainsim commented 6 years ago

Hello,

I'm triyng to compil Domoticz but it failed.

Building CXX object CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/ozwcp.cpp.o
In file included from /usr/local/include/boost/asio/impl/write.hpp:25:0,
                 from /usr/local/include/boost/asio/write.hpp:927,
                 from /usr/local/include/boost/asio/buffered_write_stream.hpp:29,
                 from /usr/local/include/boost/asio/buffered_stream.hpp:22,
                 from /usr/local/include/boost/asio.hpp:41,
                 from /home/simon/SRC/domoticz/hardware/../main/../webserver/cWebem.h:4,
                 from /home/simon/SRC/domoticz/hardware/../main/WebServer.h:5,
                 from /home/simon/SRC/domoticz/hardware/OpenZWave.cpp:18:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp: In member function ‘boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepared_buffers_type boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepare(std::size_t)’:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:65: error: ‘.’ cannot appear in a constant-expression
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                                 ^
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:50: error: parse error in template argument list
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                  ^

I've updated open-zwave with git pull && make but it doesn't fixe this issue. I'm on Ubuntu 14.04.5 LTS but the issue is the same on Debian 8. I've also installed boost 1.66.0.

sweetpants commented 6 years ago

I am on Ubuntu 16.04.3 and do not see these errors

chatainsim commented 6 years ago

Hello, I've git pulled Domoticz sources and now the error is:

[ 56%] Building CXX object CMakeFiles/domoticz.dir/hardware/NestOAuthAPI.cpp.o
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp: In member function ‘bool CNestOAuthAPI::Login()’:
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp:177:110: warning: format not a string literal and no format arguments [-Wformat-security]
     _log.Log(LOG_NORM, ("NestOAuthAPI: Received an API key to use for future requests: " + sTmpToken).c_str());
                                                                                                              ^
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp: In member function ‘void CNestOAuthAPI::GetMeterDetails()’:
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp:519:118: warning: format not a string literal and no format arguments [-Wformat-security]
     _log.Log(LOG_ERROR, ("NestOAuthAPI: Structure referenced thermostat " + devID + " but it was not found.").c_str());
                                                                                                                      ^
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp: In member function ‘std::string CNestOAuthAPI::FetchNestApiAccessToken(const string&, const string&, const string&)’:
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp:716:92: warning: format not a string literal and no format arguments [-Wformat-security]
  _log.Log(LOG_NORM, ("NestOAuthAPI: Fetched access token: " + sReceivedAccessToken).c_str());
                                                                                            ^
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp: In member function ‘bool CNestOAuthAPI::SetOAuthAccessToken(unsigned int, std::string&)’:
/home/simon/SRC/domoticz/hardware/NestOAuthAPI.cpp:722:133: warning: format not a string literal and no format arguments [-Wformat-security]
  _log.Log(LOG_NORM, ("NestOAuthAPI: Storing received access token " + newToken + " and clearing token request information.").c_str());
sweetpants commented 6 years ago

Those are warnings, no errors and already reported

chatainsim commented 6 years ago

Last update:

[ 41%] Building CXX object CMakeFiles/domoticz.dir/hardware/EcoDevices.cpp.o
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp: In member function ‘void CEcoCompteur::GetScript()’:
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp:139:72: error: ‘stod’ was not declared in this scope
   SendKwhMeter(m_HwdID, 1, 255, root["data1"].asFloat(), stod(fields[7]), "Conso 1");
                                                                        ^
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp:144:72: error: ‘stod’ was not declared in this scope
   SendKwhMeter(m_HwdID, 2, 255, root["data2"].asFloat(), stod(fields[9]), "Conso 2");
                                                                        ^
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp:149:73: error: ‘stod’ was not declared in this scope
   SendKwhMeter(m_HwdID, 3, 255, root["data3"].asFloat(), stod(fields[11]), "Conso 3");
                                                                         ^
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp:154:73: error: ‘stod’ was not declared in this scope
   SendKwhMeter(m_HwdID, 4, 255, root["data4"].asFloat(), stod(fields[13]), "Conso 4");
                                                                         ^
/home/simon/SRC/domoticz/hardware/EcoCompteur.cpp:159:73: error: ‘stod’ was not declared in this scope
   SendKwhMeter(m_HwdID, 5, 255, root["data5"].asFloat(), stod(fields[15]), "Conso 5");
                                                                         ^
make[2]: *** [CMakeFiles/domoticz.dir/hardware/EcoCompteur.cpp.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [CMakeFiles/domoticz.dir/all] Erreur 2
make: *** [all] Erreur 2
sweetpants commented 6 years ago

Those are errors from latest commit and also already reported https://github.com/domoticz/domoticz/pull/2107

chatainsim commented 6 years ago

Ok, I'll wait until bug other bugs are resolved then build again. But what about my first errors on open-zwave ?

sweetpants commented 6 years ago

I don't have them and compile with OpenZwave, but I build using boost 1.58 instead of 1.66

chatainsim commented 6 years ago

I still have the same issue:

[ 59%] Building CXX object CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/ozwcp.cpp.o
In file included from /usr/local/include/boost/asio/impl/write.hpp:25:0,
                 from /usr/local/include/boost/asio/write.hpp:927,
                 from /usr/local/include/boost/asio/buffered_write_stream.hpp:29,
                 from /usr/local/include/boost/asio/buffered_stream.hpp:22,
                 from /usr/local/include/boost/asio.hpp:41,
                 from /home/simon/SRC/domoticz/hardware/../main/../webserver/cWebem.h:4,
                 from /home/simon/SRC/domoticz/hardware/../main/WebServer.h:5,
                 from /home/simon/SRC/domoticz/hardware/OpenZWave.cpp:18:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp: In member function ‘boost::asio::detail::consuming_buffers<Buffer, Buffers, Buffer_Iterator>::prepared_buffers_type boost::asio::detail::consuming_buffers<Buffer, Buffers, Bu
ffer_Iterator>::prepare(std::size_t)’:
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:65: error: ‘.’ cannot appear in a constant-expression
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                                 ^
/usr/local/include/boost/asio/detail/consuming_buffers.hpp:105:50: error: parse error in template argument list
     while (next != end && max_size > 0 && result.count < result.max_buffers)
                                                  ^
[ 60%] Building CXX object CMakeFiles/domoticz.dir/hardware/openzwave/control_panel/zwavelib.cpp.o
make[2]: *** [CMakeFiles/domoticz.dir/hardware/OpenZWave.cpp.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
make[1]: *** [CMakeFiles/domoticz.dir/all] Erreur 2
make: *** [all] Erreur 2
gizmocuz commented 6 years ago

I have those as well on ubuntu (running under windows 10). Seems the compiler version (gcc) is 5, and it's solved when using gcc 6

chatainsim commented 6 years ago

gcc on my server is 4.8.4:

gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4

I'll try to update.

chatainsim commented 6 years ago

But compilation was working fine until the 30th of january. Strange.

gizmocuz commented 6 years ago

yes, sometimes we are forced to update

chatainsim commented 6 years ago

I confirm, updating gcc to v6 work for me. For Ubuntu LTS: https://gist.github.com/application2000/73fd6f4bf1be6600a2cf9f56315a2d91

Thanks @gizmocuz