Changes between Version 30 and Version 31 of Building/libtorrent
- Timestamp:
- 10/19/2016 10:21:48 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Building/libtorrent
v30 v31 23 23 cd libtorrent-rasterbar 24 24 }}} 25 2. Configure:25 3. Configure: 26 26 {{{ 27 27 ./configure --enable-python-binding --with-libgeoip --with-libiconv … … 30 30 - ''Logging:'' Add `--enable-logging=default` to get logs in the current working directory. `verbose` and `error` can also be used. 31 31 - ''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. 32 33 33 3. Build:34 4. Build: 34 35 {{{ 35 36 make -j$(nproc) 36 37 }}} 37 38 - ''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]] 38 40 39 4. Install library and python bindings:41 5. Install library and python bindings: 40 42 {{{ 41 43 sudo checkinstall … … 45 47 ''Running `ldconfig` avoids an `ImportError` for `libtorrent-rasterbar.so`, a result of Python being unable to find the main library.'' 46 48 47 5. Verify libtorrent and the python bindings are installed correctly:49 6. Verify libtorrent and the python bindings are installed correctly: 48 50 {{{ 49 51 python -c "import libtorrent; print libtorrent.version" 50 52 >> 1.0.6.0 51 53 }}} 54 55 56 === Add a temporary swap file === 57 58 Compiling 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` 62 1GB 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: 68 Check 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 52 75 53 76