-
Notifications
You must be signed in to change notification settings - Fork 649
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
Build error - develop branch / Windows 10 / VS 2019 / Boost 1.70 #1735
Comments
Can't build with boost-1.70 on linux either. Building with Apparently boost-1.70 installs its own cmake files now, which prevent building a static library (like fc) that links to shared boost libraries. Linking fails due to |
Part of my problems might originate from our rather old included |
Is this related? steemit/steem#160 (comment) |
I don't think so, except perhaps in the general sense that old boost versions sometimes have problems with newer compilers and vice versa. |
I have verified that Boost 1.70 also causes problems with BitShares Core and Visual Studio 2017. Boost 1.69 cannot be compiled with Visual Studio 2019, so I compiled it (and bitshares-core) with the error above no longer appearing. This verifies that the problem is solely due to Boost 1.70. The error seems to point to the websocketpp stuff, so I will investigate that area next. |
I use websocketpp and boost1.70 append this error |
Here is the related issue with websocketpp zaphoyd/websocketpp#794 In short, that project used a deprecated call in boost asio that was removed in Boost 1.70. The suggested fix is to replace calls to make_shared with .reset. They are trying to hang on to the ::ref stuff to maintain c++03 compatibility. More details in the link above and its related PRs. |
Efforts about boost 1.70 in Steem: |
FC has been bumped in #1789, this includes the websocketpp fix. |
Below is an error I receive when attempting to build BitShares-Core on Windows 10 using Visual Studio 2019 / Boost 1.70 / OpenSSL 1.1.1b
I am suspecting this is due to recent changes in fc, or perhaps Boost. I have not thoroughly researched. However, I do know I previously built with Visual Studio 2019 but with Boost 1.69 compiled with Visual Studio 2017.
Microsoft (R) Build Engine version 16.0.461+g6ff56ef63c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
secp256k1.vcxproj -> C:\Development\cpp\bitshares-core\libraries\fc\Release\secp256k1.lib
websocket.cpp
C:\Development\cpp\bitshares-core\libraries\fc\include\fc/variant.hpp(656): warning C4101: 'e': unreferenced local vari
able [C:\Development\cpp\bitshares-core\libraries\fc\fc.vcxproj]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/frame.hpp(831): warning C4267: '=': conve
rsion from 'size_t' to 'uint32_t', possible loss of data [C:\Development\cpp\bitshares-core\libraries\fc\fc.vcxproj]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/security/none.hpp(250): wa
rning C4996: 'boost::asio::basic_socket<Protocol,Executor>::cancel': By default, this function always fails with operat
ion_not_supported when used on Windows XP, Windows Server 2003, or earlier. Consult documentation for details. [C:\Deve
lopment\cpp\bitshares-core\libraries\fc\fc.vcxproj]
with
[
Protocol=boost::asio::ip::tcp,
Executor=boost::asio::executor
]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/basic_socket.hpp(693): note: see declaration of 'boost::asi
o::basic_socket<Protocol,Executor>::cancel'
with
[
Protocol=boost::asio::ip::tcp,
Executor=boost::asio::executor
]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/security/tls.hpp(324): war
ning C4996: 'boost::asio::basic_socket<Protocol,Executor>::cancel': By default, this function always fails with operati
on_not_supported when used on Windows XP, Windows Server 2003, or earlier. Consult documentation for details. [C:\Devel
opment\cpp\bitshares-core\libraries\fc\fc.vcxproj]
with
[
Protocol=boost::asio::ip::tcp,
Executor=boost::asio::executor
]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/basic_socket.hpp(693): note: see declaration of 'boost::asi
o::basic_socket<Protocol,Executor>::cancel'
with
[
Protocol=boost::asio::ip::tcp,
Executor=boost::asio::executor
]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/common/md5.hpp(367): warning C4267: '+=':
conversion from 'size_t' to 'websocketpp::md5::md5_word_t', possible loss of data [C:\Development\cpp\bitshares-core\l
ibraries\fc\fc.vcxproj]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/sha1/sha1.hpp(176): warning C4267: '=': c
onversion from 'size_t' to 'unsigned int', possible loss of data [C:\Development\cpp\bitshares-core\libraries\fc\fc.vcx
proj]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/impl/executor.hpp(218): error C2678: binary '==': no operator
found which takes a left-hand operand of type 'const Executor' (or there is no acceptable conversion) [C:\Development
cpp\bitshares-core\libraries\fc\fc.vcxproj]
with
[
Executor=std::reference_wrapperboost::asio::io_service
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\exception(284): note:
could be 'bool std::operator ==(const std::exception_ptr &,const std::exception_ptr &) noexcept' [found using argume
nt-dependent lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\exception(288): note:
or 'bool std::operator ==(std::nullptr_t,const std::exception_ptr &) noexcept' [found using argument-dependent
lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\exception(292): note:
or 'bool std::operator ==(const std::exception_ptr &,std::nullptr_t) noexcept' [found using argument-dependent
lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\system_error(217): no
te: or 'bool std::operator ==(const std::error_code &,const std::error_code &) noexcept' [found using argument-
dependent lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\system_error(222): no
te: or 'bool std::operator ==(const std::error_code &,const std::error_condition &) noexcept' [found using argu
ment-dependent lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\system_error(227): no
te: or 'bool std::operator ==(const std::error_condition &,const std::error_code &) noexcept' [found using argu
ment-dependent lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\system_error(232): no
te: or 'bool std::operator ==(const std::error_condition &,const std::error_condition &) noexcept' [found using
argument-dependent lookup]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\thread(198): note: or
'bool std::operator ==(std::thread::id,std::thread::id) noexcept' [found using argument-dependent lookup]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/detail/io_object_executor.hpp(137): note: or 'bool bo
ost::asio::detail::io_object_executor::operator ==(const boost::asio::detail::io_object_executor
&,const boost::asio::detail::io_object_executor &) noexcept' [found using argument-dependent lookup]
with
[
Executor=boost::asio::executor
]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/impl/executor.hpp(218): note: while trying to match the arg
ument list '(const Executor, const Executor)'
with
[
Executor=std::reference_wrapperboost::asio::io_service
]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/impl/executor.hpp(213): note: while compiling class templat
e member function 'bool boost::asio::executor::impl<Executor,std::allocator>::equals(const boost::asio::executo
r::impl_base *) noexcept const'
with
[
Executor=std::reference_wrapperboost::asio::io_service
]
C:\Development\cpp\boost170\include\boost-1_70\boost/asio/impl/executor.hpp(333): note: see reference to class templa
te instantiation 'boost::asio::executor::impl<Executor,std::allocator>' being compiled
with
[
Executor=std::reference_wrapperboost::asio::io_service
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\memory(1547): note: s
ee reference to function template instantiation 'boost::asio::executor::executor<_Ty>(Executor)' being compiled
with
[
_Ty=std::reference_wrapperboost::asio::io_service,
Executor=std::reference_wrapperboost::asio::io_service
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\memory(1602): note: s
ee reference to function template instantiation 'std::_Ref_count_obj<_Ty>::_Ref_count_obj<std::reference_wrapper>(std::reference_wrapperboost::asio::io_service &&)' being compiled
with
[
_Ty=boost::asio::ip::tcp::socket
]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include\memory(1602): note: s
ee reference to function template instantiation 'std::_Ref_count_obj<_Ty>::_Ref_count_obj<std::reference_wrapper>(std::reference_wrapperboost::asio::io_service &&)' being compiled
with
[
_Ty=boost::asio::ip::tcp::socket
]
C:\Development\cpp\bitshares-core\libraries\fc\vendor\websocketpp\websocketpp/transport/asio/security/none.hpp(172):
note: see reference to function template instantiation 'std::shared_ptr<websocketpp::transport::asio::basic_socket::c
onnection::socket_type> std::make_shared<boost::asio::ip::tcp::socket,std::reference_wrapperboost::asio::io_service
Build Environment
Steps To Reproduce
clone repository
cmake -G "Visual Studio 16 2019" -A x64 -DBOOST_ROOT=c:\Development\cpp\boost170 -DCURL_STATICLIB=ON -DCURL_LIBRARY="C:\Program Files\CURL\lib\libcurl_imp.lib" -DCURL_INCLUDE_DIR="C:\Program Files\CURL\include" -DOPENSSL_CONF_SOURCE="C:\Program Files\Common Files\SSL\openssl.cnf"
cmake --build . --target install --config Release
CORE TEAM TASK LIST
Build Error
Bug Report
The text was updated successfully, but these errors were encountered: