Skip to content
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

Twister does not build with boost-1.66 #417

Open
thierry-FreeBSD opened this issue Dec 9, 2017 · 6 comments
Open

Twister does not build with boost-1.66 #417

thierry-FreeBSD opened this issue Dec 9, 2017 · 6 comments

Comments

@thierry-FreeBSD
Copy link
Contributor

Trying to compile twister against boost-1.66 fails:

In file included from web_connection_base.cpp:40:
In file included from ../include/libtorrent/web_connection_base.hpp:60:
../include/libtorrent/peer_connection.hpp:803:3: error: incomplete type 'boost::asio::io_service' named in nested name specifier
                io_service::work m_work;
                ^~~~~~~~~~~~
../include/libtorrent/io_service_fwd.hpp:59:7: note: forward declaration of 'boost::asio::io_service'
class io_service;
      ^
In file included from web_connection_base.cpp:40:
In file included from ../include/libtorrent/web_connection_base.hpp:67:
In file included from ../include/libtorrent/torrent.hpp:63:
In file included from ../include/libtorrent/tracker_manager.hpp:62:
In file included from ../include/libtorrent/connection_queue.hpp:40:
In file included from ../include/libtorrent/io_service.hpp:54:
/usr/local/include/boost/asio/io_service.hpp:27:20: error: typedef redefinition with different types ('boost::asio::io_context' vs 'boost::asio::io_service')
typedef io_context io_service;
                   ^
../include/libtorrent/io_service_fwd.hpp:59:7: note: previous definition is here
class io_service;
      ^

Full log is available at http://package22.nyi.freebsd.org/data/111amd64-default-PR223922/2017-12-03_09h31m05s/logs/errors/twister-core-0.9.34_9,1.log
The same failure has been reported in libtorrent, and a fix has been proposed:
arvidn/libtorrent@f42b63c7ea82
Would you accept such a fix?

@miguelfreitas
Copy link
Owner

Sure! May you please send a Pull Request?

@thierry-FreeBSD
Copy link
Contributor Author

Actually, this patch only fixes the previous error, but now it fails with this one:

In file included from web_connection_base.cpp:40:
In file included from ../include/libtorrent/web_connection_base.hpp:67:
In file included from ../include/libtorrent/torrent.hpp:75:
In file included from ../include/libtorrent/aux_/session_impl.hpp:76:
In file included from ../include/libtorrent/socket_type.hpp:47:
In file included from ../include/libtorrent/ssl_stream.hpp:41:
In file included from /usr/local/include/boost/asio/ssl.hpp:22:
/usr/local/include/boost/asio/ssl/stream.hpp:85:39: error: no type named 'executor_type' in 'libtorrent::utp_stream'
  typedef typename lowest_layer_type::executor_type executor_type;
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
../include/libtorrent/ssl_stream.hpp:60:19: note: in instantiation of template class 'boost::asio::ssl::stream<libtorrent::utp_stream>' requested here
        typedef typename sock_type::next_layer_type next_layer_type;
                         ^
../include/libtorrent/socket_type.hpp:296:6: note: in instantiation of template class 'libtorrent::ssl_stream<libtorrent::utp_stream>' requested here
                        , sizeof(ssl_stream<utp_stream>)
                          ^
1 warning and 1 error generated.

The same error has already been reported at
arvidn/libtorrent#2585

Still looking for a complete solution.

@arvidn
Copy link

arvidn commented Dec 14, 2017

This may be relevant here too: boostorg/asio#74

@thierry-FreeBSD
Copy link
Contributor Author

Thanks @arvidn !
Unfortunately the version of libtorrent included in twister is different, and I don't know libtorrent enough to blindly adapt you patches...
@miguelfreitas : any chance to update the embedded libtorrent? Or yet better to depend on libtorrent as an external library?

@dryabov
Copy link
Contributor

dryabov commented Dec 14, 2017

@thierry-FreeBSD libtorrent in twister is modified too much (infinite files, etc.), and so there is no easy way to "depend on libtorrent as an external library".

@jbeich
Copy link

jbeich commented Jan 6, 2018

Have you tried backporting arvidn/libtorrent@d1a63cd781e7 as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants