Version 1 (modified by Cas, 10 years ago) (diff)


This page is for edge cases where libtorrent is needing to be built from source. Always check the libtorrent docs for any updates to build procedures.


These are the basic steps copied from the forum

./configure --enable-python-binding
sudo checkinstall

This will install libtorrent and bindings in correct place. I have substituted make install for checkinstall because checkinstall creates a deb package that then can be used by dpkg to remove all the installed files easily.

Also if using a tarball from svn so you would need to create the configure script by runnning the autotool script:


I have not mentioned dependencies however both running and configure will warn if missing. If updating from an already included libtorrent you can get the dependencies using apt-get:

sudo apt-get build-dep libtorrent-rasterbar


The versions of OpenSSL, Boost & libtorrent are outdated but should be no issue using latest releases

  1. Install the following:
  1. Download lastest boost and libtorrent 0.15.10 tarball and extract to C:\ drive.
  1. Build boost by opening command prompt and execute the following commands:
    Building Boost takes a while and can take several gigabytes of space Close the prompt when done.
  1. Edit the file 'C:\boost_1_49_0\tools\build\v2\user-config.jam' to force msvc version:
using msvc : 9.0 ;
  1. Open Visual Studio command prompt
    1. Setup the environmental variables
      set INCLUDE=C:\OpenSSL-Win32\include;%INCLUDE%
      set LIB=C:\OpenSSL-Win32\lib;%LIB%
      set BOOST_ROOT=C:\boost_1_49_0
      set PATH=%BOOST_ROOT%;%PATH%
    2. Navigate to libtorrent python bindings folder
      cd C:\libtorrent-rasterbar-0.15.10\bindings\python
    3. Build libtorrent with python bindings:
      C:\python27\python.exe  build

If there is no (i.e. downloaded from repository) on Windows you can simple use instead.

You can create on Ubuntu: (although makes no difference to the windows section of the script)

sudo apt-get install libtool libboost1.46-all-dev
./configure  --enable-python-binding

Non-python build instructions for reference: Leechcraft and QBittorrent

Debugging libtorrent on Windows



Install only debug tools

Build libtorrent with debug enabled (edit release to debug)


In windbg C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe:

File|Open Executable and tick Debug child processes

Hit F5 or Go a few times to get the program running

The following command after a crash:

!analyze -v -f

Symbols will be in: C:\libtorrent-rasterbar-0.16.6\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi