When packaging ssf for NixOS I noticed that it only compiles successfully with boost 1.65 or below.
With 1.66 it fails like this:
[ 25%] Building CXX object src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/http_session_initializer.cpp.o
[ 26%] Building CXX object src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/negotiate_auth_strategy.cpp.o
[ 28%] Building CXX object src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/ntlm_auth_strategy.cpp.o
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/basic_auth_strategy.h:4,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/basic_auth_strategy.cpp:2:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:58:66: error: wrong number of template arguments (2, should be 1)
VirtualEmptyStreamSocket_service<VirtualEmptyStreamProtocol>> socket;
^~
In file included from include/boost/asio/basic_socket_streambuf.hpp:25:0,
from include/boost/asio/basic_socket_iostream.hpp:24,
from include/boost/asio/ip/tcp.hpp:20,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:9,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
include/boost/asio/basic_stream_socket.hpp:49:7: note: provided for 'template<class Protocol> class boost::asio::basic_stream_socket'
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:61:68: error: wrong number of template arguments (2, should be 1)
VirtualEmptyStreamAcceptor_service<VirtualEmptyStreamProtocol>> acceptor;
^~
In file included from include/boost/asio/ip/tcp.hpp:19:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:9,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
include/boost/asio/basic_socket_acceptor.hpp:73:7: note: provided for 'template<class Protocol> class boost::asio::basic_socket_acceptor'
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h: In member function 'typename boost::asio::async_result<typename std::decay<_U1>::type, void(boost::system::error_code)>::return_type ssf::layer::VirtualEmptyStreamSocket_service<Protocol>::async_
connect(ssf::layer::VirtualEmptyStreamSocket_service<Protocol>::implementation_type&, const endpoint_type&, ConnectHandler&&)':
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:236:26: error: 'async_result_init' is not a member of 'boost::asio::detail'
boost::asio::detail::async_result_init<ConnectHandler,
^~~~~~~~~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:236:26: note: suggested alternative: 'async_result_helper'
boost::asio::detail::async_result_init<ConnectHandler,
^~~~~~~~~~~~~~~~~
async_result_helper
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:236:58: error: expected primary-expression before ',' token
boost::asio::detail::async_result_init<ConnectHandler,
^
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:237:44: error: expected primary-expression before 'void'
void(boost::system::error_code)>
^~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:248:9: error: 'init' was not declared in this scope
init.handler)();
^~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:248:9: note: suggested alternative: 'int'
init.handler)();
^~~~
int
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h: At global scope:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:412:57: error: wrong number of template arguments (2, should be 1)
boost::asio::basic_socket<Protocol1, SocketService>& peer,
^
In file included from include/boost/asio/basic_socket_acceptor.hpp:20:0,
from include/boost/asio/ip/tcp.hpp:19,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:9,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
include/boost/asio/basic_socket.hpp:60:7: note: provided for 'template<class Protocol> class boost::asio::basic_socket'
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:441:70: error: wrong number of template arguments (2, should be 1)
boost::asio::basic_socket<Protocol1, SocketService>& peer,
^
In file included from include/boost/asio/basic_socket_acceptor.hpp:20:0,
from include/boost/asio/ip/tcp.hpp:19,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:9,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
include/boost/asio/basic_socket.hpp:60:7: note: provided for 'template<class Protocol> class boost::asio::basic_socket'
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h: In member function 'boost::system::error_code ssf::layer::VirtualEmptyStreamAcceptor_service<Protocol>::accept(ssf::layer::VirtualEmptyStreamAcceptor_service<Protocol>::implementation_type&, int&
, ssf::layer::VirtualEmptyStreamAcceptor_service<Protocol>::endpoint_type*, boost::system::error_code&, typename std::enable_if<std::is_convertible<Protocol, Protocol1>::value>::type*)':
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:416:28: error: request for member 'native_handle' in 'peer', which is of non-class type 'int'
auto& peer_impl = peer.native_handle();
^~~~~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:421:15: error: request for member 'native_handle' in 'peer', which is of non-class type 'int'
*peer.native_handle().p_next_layer_socket,
^~~~~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h: In member function 'typename boost::asio::async_result<typename std::decay<AcceptHandler>::type, void(boost::system::error_code)>::return_type ssf::layer::VirtualEmptyStreamAcceptor_service<Proto
col>::async_accept(ssf::layer::VirtualEmptyStreamAcceptor_service<Protocol>::implementation_type&, int&, ssf::layer::VirtualEmptyStreamAcceptor_service<Protocol>::endpoint_type*, AcceptHandler&&, typename std::enable_if<std::is_convertible<Protocol, Protocol1>::value>::type
*)':
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:445:26: error: 'async_result_init' is not a member of 'boost::asio::detail'
boost::asio::detail::async_result_init<AcceptHandler,
^~~~~~~~~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:445:26: note: suggested alternative: 'async_result_helper'
boost::asio::detail::async_result_init<AcceptHandler,
^~~~~~~~~~~~~~~~~
async_result_helper
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:445:57: error: expected primary-expression before ',' token
boost::asio::detail::async_result_init<AcceptHandler,
^
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:446:44: error: expected primary-expression before 'void'
void(boost::system::error_code)>
^~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:449:28: error: request for member 'native_handle' in 'peer', which is of non-class type 'int'
auto& peer_impl = peer.native_handle();
^~~~~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:458:37: error: wrong number of template arguments (2, should be 1)
Protocol1, SocketService>::native_handle_type>::type,
^
In file included from include/boost/asio/basic_socket_acceptor.hpp:20:0,
from include/boost/asio/ip/tcp.hpp:19,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:9,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
include/boost/asio/basic_socket.hpp:60:7: note: provided for 'template<class Protocol> class boost::asio::basic_socket'
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.h:14:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/physical/tcp.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:458:58: error: template argument 1 is invalid
Protocol1, SocketService>::native_handle_type>::type,
^
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:461:66: error: template argument 3 is invalid
AcceptHandler, void(boost::system::error_code)>::type> (
^
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:463:9: error: 'init' was not declared in this scope
init.handler)();
^~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/basic_empty_stream.h:463:9: note: suggested alternative: 'int'
init.handler)();
^~~~
int
[ 29%] Building CXX object src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/proxy_endpoint_context.cpp.o
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:180: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/basic_auth_strategy.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:115: src/network/CMakeFiles/ssf_network.dir/ssf/layer/physical/tcp.cpp.o] Error 1
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.cpp:3:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:154: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/auth_strategy.cpp.o] Error 1
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/digest_auth_strategy.h:10,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/digest_auth_strategy.cpp:13:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/negotiate_auth_strategy.h:7,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/negotiate_auth_strategy.cpp:2:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:193: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/digest_auth_strategy.cpp.o] Error 1
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/http_session_initializer.h:10,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/http_session_initializer.cpp:4:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/auth_strategy.h:8:0,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/ntlm_auth_strategy.h:4,
from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/ntlm_auth_strategy.cpp:1:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.cpp:4:0:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:20:20: error: 'boost::asio::io_service' has not been declared
boost::asio::io_service& io_service) const;
^~~~~~~~~~
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.cpp:15:32: error: prototype for 'boost::asio::ip::tcp::endpoint ssf::layer::proxy::Proxy::ToTcpEndpoint(boost::asio::io_service&) const' does not match any in class 'ssf::layer::proxy::Pro
xy'
boost::asio::ip::tcp::endpoint Proxy::ToTcpEndpoint(
^~~~~
In file included from /tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.cpp:4:0:
/tmp/nix-build-ssf-3.0.0.drv-0/ssf/src/network/ssf/layer/proxy/proxy_endpoint_context.h:19:34: error: candidate is: boost::asio::ip::tcp::endpoint ssf::layer::proxy::Proxy::ToTcpEndpoint(int&) const
boost::asio::ip::tcp::endpoint ToTcpEndpoint(
^~~~~~~~~~~~~
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:258: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/negotiate_auth_strategy.cpp.o] Error 1
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:271: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/ntlm_auth_strategy.cpp.o] Error 1
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:245: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/http_session_initializer.cpp.o] Error 1
make[2]: *** [src/network/CMakeFiles/ssf_network.dir/build.make:284: src/network/CMakeFiles/ssf_network.dir/ssf/layer/proxy/proxy_endpoint_context.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:375: src/network/CMakeFiles/ssf_network.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
When packaging ssf for NixOS I noticed that it only compiles successfully with boost 1.65 or below.
With 1.66 it fails like this: