arvidn / libtorrent

an efficient feature complete C++ bittorrent implementation
http://libtorrent.org
Other
5.22k stars 993 forks source link

configure: error: Could not find a version of the library! #7365

Open abhishek-das-gupta opened 1 year ago

abhishek-das-gupta commented 1 year ago

I currently building libtorrent on RH9 which comes with python 3.9

The libtorrent I'm building is : 1.2.0 (which requires boost >= 1.58 to build ) [refer]

the boost version I'm using is: 1.67.0

During the run of the command:

cd /grid/0/jenkins/cmf/build/redhat9/libtorrent/build; ./configure --prefix=/some-prefix \
    --enable-python-binding \
    --enable-static=no \
    --with-boost=/grid/0/jenkins/cmf/build/redhat9/boost/ \
    --with-boost-system --with-boost-python=boost_python3 \
    LIBS=-L/grid/0/jenkins/cmf/build/redhat9/boost//lib PYTHON_VERSION=

I'm getting the following error:

Checking for boost libraries:
checking for boostlib >= 1.54... yes
checking whether g++ supports C++11 features by default... yes
checking whether the Boost::System library is available... yes
configure: error: Could not find a version of the library!

I looked at configure script. I guess ax_lib var is unset.

            if test "x$ax_lib" = "x"; then
                as_fn_error $? "Could not find a version of the library!" "$LINENO" 5
            fi

I've already looked at a previous issue which is similar to mine but there the solution was incompatibility b/w libtorrent and boost.

but here the versions of both of them are compatiblie as per the release notes

I'm running out of ideas on how to fix this error. Please provide pointers of what solutions I could try or pointers on how to debug.

arvidn commented 1 year ago

do you have boost system installed on your system? I believe it's common for package managers to separate out certain libraries from the main boost package. boost system is one of them

abhishek-das-gupta commented 1 year ago

Thanks @arvidn! I was able to solve this error from the pointer that you provided. I instead used boost 1.75 since it is what is used in RH9 by default.

but now I am getting the following errors:

Making install in src
make[3]: Entering directory '/grid/0/jenkins/cmf/build/redhat9/libtorrent/build/src'
  CXX      libtorrent_rasterbar_la-web_connection_base.lo
In file included from ../include/libtorrent/socks5_stream.hpp:38,
                 from ../include/libtorrent/aux_/socket_type.hpp:39,
                 from ../include/libtorrent/utp_socket_manager.hpp:39,
                 from ../include/libtorrent/aux_/session_udp_sockets.hpp:36,
                 from ../include/libtorrent/aux_/session_interface.hpp:46,
                 from ../include/libtorrent/ip_voter.hpp:40,
                 from ../include/libtorrent/peer_list.hpp:47,
                 from ../include/libtorrent/torrent.hpp:51,
                 from ../include/libtorrent/web_connection_base.hpp:43,
                 from web_connection_base.cpp:38:
../include/libtorrent/proxy_base.hpp: In member function 'libtorrent::io_service& libtorrent::proxy_base::get_io_service()':
../include/libtorrent/proxy_base.hpp:249:53: error: invalid initialization of reference of type 'libtorrent::io_service&' {aka 'boost::asio::io_context&'} from expression of type 'boost::asio::execution_context'
  249 |                 return m_sock.get_executor().context();
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from ../include/libtorrent/utp_stream.hpp:37,
                 from ../include/libtorrent/aux_/socket_type.hpp:42,
                 from ../include/libtorrent/utp_socket_manager.hpp:39,
                 from ../include/libtorrent/aux_/session_udp_sockets.hpp:36,
                 from ../include/libtorrent/aux_/session_interface.hpp:46,
                 from ../include/libtorrent/ip_voter.hpp:40,
                 from ../include/libtorrent/peer_list.hpp:47,
                 from ../include/libtorrent/torrent.hpp:51,
                 from ../include/libtorrent/web_connection_base.hpp:43,
                 from web_connection_base.cpp:38:
../include/libtorrent/udp_socket.hpp: In member function 'libtorrent::io_service& libtorrent::udp_socket::get_io_service()':
../include/libtorrent/udp_socket.hpp:64:64: error: 'boost::asio::ip::udp::socket' {aka 'class boost::asio::basic_datagram_socket<boost::asio::ip::udp>'} has no member named 'get_io_service'
   64 |                 io_service& get_io_service() { return m_socket.get_io_service(); }
      |                                                                ^~~~~~~~~~~~~~
In file included from ../include/libtorrent/torrent.hpp:52,
                 from ../include/libtorrent/web_connection_base.hpp:43,
                 from web_connection_base.cpp:38:
../include/libtorrent/tracker_manager.hpp: In member function 'libtorrent::io_service& libtorrent::timeout_handler::get_io_service()':
../include/libtorrent/tracker_manager.hpp:262:65: error: 'using deadline_timer = boost::asio::high_resolution_timer' {aka 'class boost::asio::basic_waitable_timer<std::chrono::_V2::system_clock>'} has no member named 'get_io_service'
  262 |                 io_service& get_io_service() { return m_timeout.get_io_service(); }

As you can see I also tried to use the solution which is provided here but seems like it is not working. Any further pointers?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.