-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
compile error with boost 1.66 #2034
Comments
Don't think it's a Domoticz issue but rather a outdated repo issue. I have it working with the current repo working on my RPi3 with Raspbian Jessie. |
It's with the 3.8153 release. Reverting boost to 1.65 makes the problem go away. Tried a couple of things to get it to build but did not succeed yet. |
Had no problem with 1.65 then installed 1.66 and got this error.
|
Stretch is giving me a big headache as besides compiling some other issues non Domoticz and Domoticz stuff giving me a hard time. |
Not a bad idea to go back to Jessie. |
The update to boost 1.66 also caused issues on the Arch Linux package: Here is a quick and dirty fix for compilation, but some domoticz code itself may also need minor refactoring to make it clean. diff --git a/webserver/proxyclient.cpp b/webserver/proxyclient.cpp
index 6bd6b8771..646cfdeee 100644
--- a/webserver/proxyclient.cpp
+++ b/webserver/proxyclient.cpp
@@ -770,8 +770,8 @@ namespace http {
void CProxyManager::StartThread()
{
try {
- //boost::asio::ssl::context ctx(io_service, boost::asio::ssl::context::tlsv12_client);
- boost::asio::ssl::context ctx(io_service, boost::asio::ssl::context::sslv23);
+ //boost::asio::ssl::context ctx(boost::asio::ssl::context::tlsv12_client);
+ boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
ctx.set_verify_mode(boost::asio::ssl::verify_none);
proxyclient.reset(new CProxyClient(io_service, ctx, m_pWebEm));
diff --git a/webserver/server.cpp b/webserver/server.cpp
index fe001e811..c0eec2166 100644
--- a/webserver/server.cpp
+++ b/webserver/server.cpp
@@ -152,7 +152,7 @@ void server::handle_accept(const boost::system::error_code& e) {
ssl_server::ssl_server(const ssl_server_settings & ssl_settings, request_handler & user_request_handler) :
server_base(ssl_settings, user_request_handler),
settings_(ssl_settings),
- context_(io_service_, ssl_settings.get_ssl_method())
+ context_(ssl_settings.get_ssl_method())
{
#ifdef DEBUG_WWW
_log.Log(LOG_STATUS, "[web:%s] create ssl_server using ssl_server_settings : %s", ssl_settings.listening_port.c_str(), ssl_settings.to_string().c_str());
@@ -165,7 +165,7 @@ ssl_server::ssl_server(const ssl_server_settings & ssl_settings, request_handler
ssl_server::ssl_server(const server_settings & settings, request_handler & user_request_handler) :
server_base(settings, user_request_handler),
settings_(dynamic_cast<ssl_server_settings const &>(settings)),
- context_(io_service_, dynamic_cast<ssl_server_settings const &>(settings).get_ssl_method()) {
+ context_(dynamic_cast<ssl_server_settings const &>(settings).get_ssl_method()) {
#ifdef DEBUG_WWW
_log.Log(LOG_STATUS, "[web:%s] create ssl_server using server_settings : %s", settings.listening_port.c_str(), settings.to_string().c_str());
#endif |
The patch above is needed to update the boost API. However, even with the patch applied, domoticz will not compile with g++5; it compiles fine with g++6. Apparently, the boost header file
|
Patch fetch from one of the answer of domoticz/domoticz#2034 (issue still opened, no official PR sent upstream) Boost asio changed its API: - http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/net_ts.html Fixes: - http://autobuild.buildroot.net/results/5f02c8fc84889748f283ee1cb76248bb0880215a Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fix domoticz build with boost 1.66 and g++5 Patch fetch from one of the answer of domoticz/domoticz#2034: workaround suggested to the boost developers Fixes: - http://autobuild.buildroot.net/results/dec57c19e9aa2e367e23de2232c1d22a2f226a32 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This is a domoticz issue, because it's using a deprecated constructor that was removed in Boost 1.66.0. |
best to follow our wiki and this mentions 1.65 yes ... or just use the binary solution so you don't have to install boost |
There is conflicting information, it also mentions to use the latest version of boost, which is now 1.66. But I guess rolling distros will just have to fix it downstream until upstream is compatible with >= 1.66. |
"Just use the binary solution" isn't an option for distros that ship binaries that they build themselves. I'm trying to upgrade Fedora to use a new Boost, and this means domocitz needs to be patched locally in Fedora, and every other distro that packages it. Obviously it would be better to fix it upstream. |
I think the Domoticz binaries should run under Fedora. |
Fedora does not distribute upstream binaries, it rebuilds everything from source. Most distros work that way.
Great, thanks! |
Domoticz does not compile against boost 1.66:
The text was updated successfully, but these errors were encountered: