Changes between Version 16 and Version 17 of Building/libtorrent


Ignore:
Timestamp:
09/05/2015 01:27:56 PM (9 years ago)
Author:
Cas
Comment:

minor fixes and updates to layout

Legend:

Unmodified
Added
Removed
Modified
  • Building/libtorrent

    v16 v17  
    33[[PageOutline(2-4,,inline, unnumbered)]] 
    44 
    5 Check the libtorrent [http://www.libtorrent.org/building.html documentation] for any updates to build procedures. 
     5Check libtorrent [http://www.libtorrent.org/building.html documentation] for any updates to build procedures. 
    66 
    77== Ubuntu / Debian == 
    88 
    9  1. Download libtorrent source tarball and extract it: 
     9 1. Install dependencies for libtorrent build automatically using `build-dep`: 
     10 {{{ 
     11sudo apt-get build-dep libtorrent-rasterbar 
     12sudo apt-get install checkinstall 
     13}}} 
    1014 
    11   * [https://github.com/arvidn/libtorrent/releases libtorrent-rasterbar] 
     15 '''OR''' if that fails manually install them: 
     16 {{{ 
     17sudo apt-get install build-essential checkinstall libboost-system-dev libboost-python-dev libssl-dev libgeoip-dev 
     18 }}} 
     19 
     20 2. Download [https://github.com/arvidn/libtorrent/releases libtorrent] and extract: 
    1221{{{ 
    1322tar xf libtorrent-rasterbar.tar.gz 
     
    1524}}} 
    1625 
    17  2. Get the dependencies automatically for libtorrent build: 
    18 {{{ 
    19 sudo apt-get build-dep libtorrent-rasterbar 
    20 sudo apt-get install checkinstall 
    21 }}} 
    22  
    23  Or manually install libtorrent dependencies: 
    24  {{{ 
    25  sudo apt-get build-essential checkinstall libboost-system-dev libboost-python-dev libssl-dev libgeoip-dev 
    26  }}} 
    27  
    28  3.  Build (in the extracted tarball directory): 
     26 3.  Build: 
    2927{{{ 
    3028./configure --enable-python-binding 
    31 make 
     29make -j$(nproc) 
    3230}}} 
    33  
    34  ''Note:'' For source code from repository, create the `configure` script by runnning: `./autotool.sh` 
     31 ''The `make` option `-j$(nproc)` will utilize all available cpu cores.[[br]] 
     32 ''For source code from directly from git, the `configure` script will need creating by runnning: `./autotool.sh`'' 
    3533 
    3634 4. Install library and python bindings: 
    3735{{{ 
    3836sudo checkinstall 
    39 }}}  
    40 {{{ 
    4137sudo ldconfig 
    4238}}} 
    43  ''Substituted `make install` for `checkinstall` as it creates a deb package for easier removal/re-install by `dpkg`.'' 
    44  
    45  ''Running ldconfig avoids an `ImportError` for `libtorrent-rasterbar.so`, a result of Python being unable to find the main library.'' 
     39 ''Substituted `make install` for `checkinstall` as it creates a deb package for easier removal/re-install by `dpkg`.'' [[br]] 
     40 ''Running `ldconfig` avoids an `ImportError` for `libtorrent-rasterbar.so`, a result of Python being unable to find the main library.'' 
    4641 
    4742 5. Verify libtorrent and the python bindings are installed correctly: 
    4843{{{ 
    4944python -c "import libtorrent; print libtorrent.version" 
    50 }}} 
    51 {{{ 
    52 >> 0.16.17.0 
     45>> 1.0.6.0 
    5346}}} 
    5447 
     
    5649== Windows ==  
    5750  
    58  1. Install Visual Studio or just the compiler: 
    59   * [http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express MS VC++ 2008/2010 Express][[br]] 
    60   '''OR''' 
     51 1. Download and install/extract these packages: 
    6152  * [http://www.microsoft.com/en-us/download/details.aspx?id=44266 MS VC++ Compiler for Python] 
    62  
    63  2. Download and install these packages: 
    6453  * [http://www.slproweb.com/products/Win32OpenSSL.html OpenSSL win32 (non-light)] 
    6554  * [http://www.python.org/ Python 2.7] 
    6655  * [http://www.microsoft.com/en-us/download/details.aspx?id=5582 MSVC 2008 SP1 Redist Package (x86)] 
    6756  * [https://www.microsoft.com/en-gb/download/details.aspx?id=21 .NET Framework 3.5] 
    68  3. Download source tarballs and extract to path without space e.g. C:\ drive: 
    69   * [http://www.boost.org/ boost] 
    70   * [http://www.libtorrent.org/ libtorrent-rasterbar] 
     57  * [http://sourceforge.net/projects/boost/files/boost/ Boost] 
     58  * [https://github.com/arvidn/libtorrent/releases libtorrent] 
     59 ''Note: Install/Extract to a path without spaces e.g. `C:\` drive.'' 
    7160 
    72  4. Boost Build Steps: 
    73  
    74  Open a `Visual Studio 2008 Command Prompt`[[br]] 
    75  '''OR'''[[br]] 
    76  If using `VC for Python`, open Windows Command Prompt and execute `vcvarsall.bat`, e.g.: 
     61 2. Setup the Windows Command Prompt by executing `VC for Python` `vcvarsall.bat`, e.g.: 
    7762  {{{ 
    7863"%USERPROFILE%\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\vcvarsall.bat" 
    7964  }}} 
    80  and due to a bug in boost when using `VC for Python` requires editing `project-config.jam` line to the following: 
     65 ''Note: If using Visual Studio simple open a `Visual Studio 2008 Command Prompt`.'' 
     66 
     67 3. Boost Build Steps:  
     68  
     69 Due to a [https://svn.boost.org/trac/boost/ticket/10817 boost bug] with `VC for Python`, need to edit `project-config.jam` in boost folder to the following: 
    8170 {{{ 
    8271using msvc : : : <setup>"%USERPROFILE%\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" ; 
    8372 }}} 
    84  
    85  From Command Prompt, execute the following commands: 
     73 In the boost directory run the following: 
    8674 {{{ 
    8775bootstrap.bat 
     
    9179 5. Create a Boost `user-config.jam` file in the toplevel folder (e.g. `C:\boost`) with the following to force `msvc` version: 
    9280 {{{ 
    93 using msvc : 9.0 ; 
    94 }}} 
    95  
    96  Again if using `VC for Python` the boost bug requires modifing the above line to this: 
    97  {{{ 
    9881using msvc : 9.0 : : <setup>"%USERPROFILE%\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\vcvarsall.bat" ; 
    9982}}} 
     83 ''Note: For Visual Studio, simply `using msvc : 9.0 ;` is required. 
    10084 
    10185 6. libtorrent Build Steps: 
     
    135119 Upon a successful build the resulting library file is named `libtorrent.pyd` and is located under this directory: `libtorrent-rasterbar\bindings\python\bin\msvc-9.0\release\boost-source\geoip-static\link-static\optimization-space` 
    136120}}} 
    137 Upon a successful build the library file named `libtorrent.pyd` is created in the current bindings directory. 
     121Upon a successful build the library file named `libtorrent.pyd` is created in the current `bindings/python` directory. 
    138122 
    139123 
     
    142126=== Debugging libtorrent on Windows ===  
    143127 
    144  * Download: 
     128 * Download and install just the `debug tools`: 
    145129  * [http://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx Standalone Debugging Tools for Windows (WinDbg)] 
    146  
    147  ''Note: Only need to install debug tools.'' 
    148  
    149  * Build libtorrent with debug enabled by changing `release` to `debug` in `setup.py` or `b2` line in steps above. 
    150  
    151  * In windbg `C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe`: 
    152   * `File|Open Executable` and tick Debug child processes 
    153  
    154   * Hit F5 or Go a few times to get the program running 
    155  
    156   * Execute the following command after a crash: 
    157     {{{ 
    158 !analyze -v -f 
    159 }}} 
    160          
    161          
    162  * Symbols for libtorrent will be in the following path:  
     130 * Build libtorrent with debug enabled by changing `release` to `debug` in the `b2` build line. 
     131 * Open `windbg` ''(C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe)'': 
     132  * `File|Open Executable` and tick `Debug child processes` 
     133  * Hit `F5` or `Go` a few times to get the program running 
     134  * After the crash execute: `!analyze -v -f`. 
     135 * Symbols for libtorrent will be in the build output path:  
    163136  {{{ 
    164137C:\libtorrent-rasterbar\bindings\python\bin\msvc-9.0\debug\boost-source\geoip-static\link-static\optimization-space\threading-multi