miguelfreitas/twister-core

mac OS Compiling error on 10.15 (Catalina)

centaur1 opened this issue · 5 comments

mac OS Compiling error on 10.15 (Catalina). Has anyone been able to successfully compile it on 10.15.x?

CXX libtorrent/src/web_connection_base.o
In file included from libtorrent/src/web_connection_base.cpp:37:
/usr/local/include/boost/bind.hpp:36:1: warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. [-W#pragma-messages]
BOOST_PRAGMA_MESSAGE(
^
/usr/local/include/boost/config/pragma_message.hpp:24:34: note: expanded from macro 'BOOST_PRAGMA_MESSAGE'

define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))

                             ^

:15:2: note: expanded from here
message("The practice of declaring the Bind placeholders (1, 2, ...) " "in the global namespace is deprecated. Please use " "<boost/bind/bind.hpp> + using namesp...
^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:60:
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66:
./libtorrent/include/libtorrent/alert.hpp:170:58: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid'
[-Wpotentially-evaluated-expression]
detail::handle_alert_dispatch(alert
, handler, typeid(*alert
)
^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:63:
In file included from ./libtorrent/include/libtorrent/tracker_manager.hpp:66:
./libtorrent/include/libtorrent/udp_socket.hpp:83:53: error: no member named 'get_io_service' in 'boost::asio::basic_datagram_socket<boost::asio::ip::udp,
boost::asio::executor>'
io_service& get_io_service() { return m_ipv4_sock.get_io_service(); }
~~~~~~~~~~~ ^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:75:
In file included from ./libtorrent/include/libtorrent/aux_/session_impl.hpp:76:
In file included from ./libtorrent/include/libtorrent/socket_type.hpp:38:
In file included from ./libtorrent/include/libtorrent/socks5_stream.hpp:39:
./libtorrent/include/libtorrent/proxy_base.hpp:230:17: error: no member named 'get_io_service' in 'boost::asio::basic_stream_socket<boost::asio::ip::tcp,
boost::asio::executor>'
return m_sock.get_io_service();
~~~~~~ ^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:75:
In file included from ./libtorrent/include/libtorrent/aux_/session_impl.hpp:76:
In file included from ./libtorrent/include/libtorrent/socket_type.hpp:41:
./libtorrent/include/libtorrent/utp_stream.hpp:343:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto i = buffer_sequence_begin(buffers)
^
3 warnings and 2 errors generated.
make: *** [libtorrent/src/web_connection_base.o] Error 1

I've submitted PR #438, could you please give it a try?

Hi,
I tried two different things, I am probably missing something easy. I will give Ubuntu 20 a try as long as I am looking at this today. Thanks

If I do a git clone https://github.com/Chocobo1/twister-core
./autotool.sh
./configure --enable-logging --with-openssl=/usr/local/opt/openssl --with-libdb=/usr/local/opt/berkeley-db4
make, I am still getting this:
CXX libtorrent/src/web_connection_base.o
In file included from libtorrent/src/web_connection_base.cpp:37:
/usr/local/include/boost/bind.hpp:36:1: warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is
deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to
retain the current behavior. [-W#pragma-messages]
BOOST_PRAGMA_MESSAGE(
^
/usr/local/include/boost/config/pragma_message.hpp:24:34: note: expanded from macro 'BOOST_PRAGMA_MESSAGE'

define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))

                             ^

:15:2: note: expanded from here
message("The practice of declaring the Bind placeholders (1, 2, ...) " "in the global namespace is deprecated. Please use " "<b...
^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:60:
In file included from ./libtorrent/include/libtorrent/peer_connection.hpp:66:
./libtorrent/include/libtorrent/alert.hpp:170:58: warning: expression with side effects will be evaluated despite being used as an operand
to 'typeid' [-Wpotentially-evaluated-expression]
detail::handle_alert_dispatch(alert
, handler, typeid(*alert
)
^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:63:
In file included from ./libtorrent/include/libtorrent/tracker_manager.hpp:66:
./libtorrent/include/libtorrent/udp_socket.hpp:83:53: error: no member named 'get_io_service' in
'boost::asio::basic_datagram_socket<boost::asio::ip::udp, boost::asio::executor>'
io_service& get_io_service() { return m_ipv4_sock.get_io_service(); }
~~~~~~~~~~~ ^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:75:
In file included from ./libtorrent/include/libtorrent/aux_/session_impl.hpp:76:
In file included from ./libtorrent/include/libtorrent/socket_type.hpp:38:
In file included from ./libtorrent/include/libtorrent/socks5_stream.hpp:39:
./libtorrent/include/libtorrent/proxy_base.hpp:232:17: error: no member named 'get_io_service' in
'boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>'
return m_sock.get_io_service();
~~~~~~ ^
In file included from libtorrent/src/web_connection_base.cpp:40:
In file included from ./libtorrent/include/libtorrent/web_connection_base.hpp:67:
In file included from ./libtorrent/include/libtorrent/torrent.hpp:75:
In file included from ./libtorrent/include/libtorrent/aux_/session_impl.hpp:76:
In file included from ./libtorrent/include/libtorrent/socket_type.hpp:41:
./libtorrent/include/libtorrent/utp_stream.hpp:343:8: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for (auto i = buffer_sequence_begin(buffers)
^
3 warnings and 2 errors generated.
make: *** [libtorrent/src/web_connection_base.o] Error 1

=======================

If I replace it with the libtorrent from here:
https://github.com/Chocobo1/twister-core/archive/libtorrent.zip
./autotool.sh
./configure --enable-logging --with-openssl=/usr/local/opt/openssl --with-libdb=/usr/local/opt/berkeley-db4
make
I get:

make: *** No rule to make target libtorrent/src/web_connection_base.cpp', needed by libtorrent/src/web_connection_base.o'. Stop.

I have Boost 1.73.0 and am upgrading to 1.74.0 to see if that changes things
edit: that didn't help. I am going to keep looking at it.

If I do a git clone https://github.com/Chocobo1/twister-core

You were doing it wrong. After a git clone, you should do git checkout libtorrent to switch to the correct branch.

If I replace it with the libtorrent from here:
https://github.com/Chocobo1/twister-core/archive/libtorrent.zip

Not sure if you noticed, that link is not just libtorrent library, it contains the whole twister-core project code base. So you shouldn't be replacing anything other than the whole project, you can just compile it.

I think that was almost right - it is just finished compiling now. Silly thing. :-) I had to do:
git checkout libtorrent --

  • vs -

git checkout libtorrent
which gave:
fatal: 'libtorrent' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate

So I think that did it! I am sure there will be a fair number of people who will be able to build it now.