Changes between Version 30 and Version 31 of Building/libtorrent


Ignore:
Timestamp:
10/19/2016 10:21:48 AM (8 years ago)
Author:
shamael
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/libtorrent

    v30 v31  
    2323cd libtorrent-rasterbar 
    2424}}} 
    25  2. Configure: 
     25 3. Configure: 
    2626 {{{ 
    2727./configure --enable-python-binding --with-libgeoip --with-libiconv 
     
    3030   - ''Logging:'' Add `--enable-logging=default` to get logs in the current working directory. `verbose` and `error` can also be used. 
    3131   - ''Debug:'' To create a debug build add `--enable-debug=yes`. 
     32   - ARM architecture (Raspberry Pi, etc): add `--with-boost-libdir=/usr/lib/arm-linux-gnueabihf` at the end to avoid boost library error. 
    3233 
    33  3. Build: 
     34 4. Build: 
    3435{{{ 
    3536make -j$(nproc) 
    3637}}} 
    3738   - ''CPU Cores:'' The `make` option `-j$(nproc)` will utilize all available cpu cores. 
     39   - ''g++: internal compiler error: Killed (program cc1plus)'' or similar error check [[#Add a temporary swap file|Add a temporary swap file]] 
    3840 
    39  4. Install library and python bindings: 
     41 5. Install library and python bindings: 
    4042{{{ 
    4143sudo checkinstall 
     
    4547 ''Running `ldconfig` avoids an `ImportError` for `libtorrent-rasterbar.so`, a result of Python being unable to find the main library.'' 
    4648 
    47  5. Verify libtorrent and the python bindings are installed correctly: 
     49 6. Verify libtorrent and the python bindings are installed correctly: 
    4850{{{ 
    4951python -c "import libtorrent; print libtorrent.version" 
    5052>> 1.0.6.0 
    5153}}} 
     54 
     55 
     56=== Add a temporary swap file === 
     57 
     58Compiling a library needs memory/swap during the "make". If you get an internal error during this phase on a computer with low memory and/or no swap partition (check with `free -m` ) you can test below procedure. 
     59 
     60 1. Create a 1GB empty file: 
     61`dd if=/dev/zero of=/.swapfile bs=1024 count=1M` 
     621GB file creation wherever you have space, change the location following your possibilities  
     63 2. Create swap: 
     64`mkswap /.swapfile` 
     65 3. Activate swap: 
     66`swapon /.swapfile` 
     67 4. check: 
     68Check if the swap is recognized with `swapon -s` or `free -m` (swap different from 0)  
     69 5. Relaunch your compilation 
     70 6. Disable swap: 
     71`swapoff /.swapfile` 
     72 7. delete file: 
     73`rm -f /.swapfile` 
     74 
    5275 
    5376