I just compiled and installed boost from source using
$pwd
/Downloads/boost_1_58_0
./b2 threading=multi link=static runtime-link=static cxxflags="-stdlib=libstdc++" linkflags="-stdlib=libstdc++"
and got message after build completed,
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/Downloads/boost_1_58_0
The following directory should be added to linker library paths:
/Downloads/boost_1_58_0/stage/lib
now that I was trying to install lib torrent's python pending using sudo pip install .
I got error message b2: command not found
since I knew where the b2 command was in my location from where I build boost, i updated setup.py to the specific path,
but still when I try to sudo pip install .
python binding of lib torrent I get below message.
Complete output from command python setup.py egg_info:
Unable to load Boost.Build: could not find "boost-build.jam"
---------------------------------------------------------------
BOOST_ROOT must be set, either in the environment, or
on the command-line with -sBOOST_ROOT=..., to the root
of the boost installation.
Attempted search from /private/tmp/pip-OWjwyj-build up to the root
at /Downloads/share/boost-build
and in these directories from BOOST_BUILD_PATH and BOOST_ROOT: /usr/share/boost-build.
Please consult the documentation at 'http://www.boost.org'.
/Downloads/boost_1_58_0/b2 boost=source link=static geoip=static boost-link=static release optimization=space stage_module --abbreviate-paths -j4
build failed
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-OWjwyj-build
after following the steps mentioned in first answer I tried to run make
but it gave following error:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:346:3: error: no template named 'scoped_ptr'
in namespace 'boost'; did you mean 'boost::asio::detail::scoped_ptr'?
boost::scoped_ptr<storage_interface> m_storage;
^~~~~~~~~~~~~~~~~
boost::asio::detail::scoped_ptr
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:27:7: note:
'boost::asio::detail::scoped_ptr' declared here
class scoped_ptr
^
In file included from piece_picker.cpp:41:
In file included from ../include/libtorrent/aux_/session_impl.hpp:66:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:279:53: error: no viable overloaded
'operator->'
error_code const& error() const { return m_storage->error(); }
~~~~~~~~~^
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:49:6: note: candidate
function not viable: 'this' argument has type 'const
boost::scoped_ptr<storage_interface>', but method is not marked const
T* operator->()
^
In file included from piece_picker.cpp:41:
In file included from ../include/libtorrent/aux_/session_impl.hpp:66:
In file included from ../include/libtorrent/torrent_handle.hpp:55:
../include/libtorrent/storage.hpp:280:59: error: no viable overloaded
'operator->'
...std::string const& error_file() const { return m_storage->error_file(); }
~~~~~~~~~^
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:49:6: note: candidate
function not viable: 'this' argument has type 'const
boost::scoped_ptr<storage_interface>', but method is not marked const
T* operator->()
^
In file included from piece_picker.cpp:41:
../include/libtorrent/aux_/session_impl.hpp:624:4: error: no template named
'scoped_ptr' in namespace 'boost'; did you mean
'boost::asio::detail::scoped_ptr'?
boost::scoped_ptr<boost::thread> m_thread;
^~~~~~~~~~~~~~~~~
boost::asio::detail::scoped_ptr
/opt/local/include/boost/asio/detail/scoped_ptr.hpp:27:7: note:
'boost::asio::detail::scoped_ptr' declared here
class scoped_ptr
^
Since you don't seem to mind using boost-build to build, the simplest way to do it is to:
The first 4 lines is basically installing boost-build (
b2
). It's assuming the output directory when you built b2 was bin.macosxx86_64.That will build the libtorrent python module, it won't install it though.