| 1 | [[libtorrentMirror]] |
| 2 | |
| 3 | = Compilation Help = |
| 4 | |
| 5 | This page describes some common (non-obvious) problems compiling libTorrent/rTorrent and how to fix them. It does not have general instructions for compiling, see the [wiki:Install] page for that. |
| 6 | |
| 7 | In general, for problems during ./configure time check the lines of config.log before the "Cache variables" section, it should have a more detailed error message to help you diagnose the problem. |
| 8 | |
| 9 | [[PageOutline(2,,inline)]] |
| 10 | |
| 11 | == No symbol information in backtraces == |
| 12 | |
| 13 | When rtorrent crashes, it automatically generates a backtrace (on systems which support this). For these to be useful in fixing the problem, the linker must put symbol information in the executable files (and not just in the debug information section). |
| 14 | |
| 15 | This can be accomplished by putting "-rdynamic" in LDFLAGS and recompiling. For example, as an argument to the configure script: |
| 16 | {{{ |
| 17 | ./configure LDFLAGS=-rdynamic |
| 18 | }}} |
| 19 | Add any other options you need, of course. Use "make clean" to force a recompilation if necessary. |
| 20 | |
| 21 | == Error checking signedness of mincore parameter == |
| 22 | |
| 23 | {{{ |
| 24 | checking signedness of mincore parameter... configure: error: failed, do *not* attempt fix this with --disable-mincore unless you are running Win32. |
| 25 | }}} |
| 26 | |
| 27 | '''Problem:''' Most likely, no C++ compiler is installed. |
| 28 | |
| 29 | '''Solution:''' Install g++ or any other competent C++ compiler. |
| 30 | |
| 31 | In most cases this error message is very misleading and indicates a general inability to compile C++ code rather than a specific problem with the signedness of the mincore parameter. |
| 32 | |
| 33 | == Syntax error when running ./configure == |
| 34 | |
| 35 | {{{ |
| 36 | ./configure: syntax error near unexpected token `OPENSSL,' |
| 37 | ./configure: ` PKG_CHECK_MODULES(OPENSSL, openssl,' |
| 38 | }}} |
| 39 | |
| 40 | '''Problem:''' autoconf cannot find the pkg-config macros in pkg.m4 |
| 41 | |
| 42 | '''Solution:''':: |
| 43 | * Make sure pkg-config is installed, and pkg.m4 is present |
| 44 | * Make sure autoconf can find pkg.m4 |
| 45 | |
| 46 | If it cannot find it even with pkg-config installed, move pkg.m4 to where aclocal expects it, which is most likely /usr/share/aclocal. If you're using !MacPorts, you may be running the legacy autoconf instead of the one from !MacPorts, in that case ensure that /opt/local/bin comes before /usr/bin in your PATH environment variable to run the !MacPorts autoconf. |
| 47 | * Run autogen.sh again |
| 48 | * Run configure again |
| 49 | |
| 50 | == !LibTorrent not found by ./configure == |
| 51 | |
| 52 | {{{ |
| 53 | checking for STUFF... configure: error: Package requirements (sigc++-2.0 libcurl >= 7.12.0 libtorrent >= 0.11.8) were not met: |
| 54 | No package 'libtorrent' found |
| 55 | }}} |
| 56 | |
| 57 | '''Problem:''' libtorrent.pc not installed in a place where pkg-config looks for it |
| 58 | |
| 59 | '''Solution:''' |
| 60 | |
| 61 | If you have not already compiled and installed libtorrent, do this first. |
| 62 | |
| 63 | If this message persists even with libtorrent installed, pkg-config cannot find the libtorrent.pc file. Most likely, you've installed libtorrent in /usr/local (or a non-standard location) and pkg-config is not configured to look there. Set the PKG_CONFIG_PATH environment variable to where libtorrent.pc may be found, e.g. using bash: |
| 64 | {{{ |
| 65 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig |
| 66 | }}} |
| 67 | Then run configure again. |
| 68 | |
| 69 | == !LibTorrent version not detected by ./configure == |
| 70 | |
| 71 | {{{ |
| 72 | checking for STUFF... configure: error: Package requirements (sigc++-2.0 libcurl >= 7.12.0 libtorrent >= 0.12.0) were not met: |
| 73 | Requested 'libtorrent >= 0.12.0' but version of libtorrent is |
| 74 | }}} |
| 75 | |
| 76 | '''Problem:''' automake is too old |
| 77 | |
| 78 | '''Solution:''' Upgrade automake to version 1.5 or higher, then run libtorrent's autogen.sh and configure again, and make install. |
| 79 | |
| 80 | Alternatively, manually edit libtorrent.pc to show the correct version. |
| 81 | |
| 82 | == Compilation on Centos == |
| 83 | |
| 84 | [http://markus.revti.com/2009/11/installing-libtorrent-and-rtorrent-on-linux-centos/ Howto for installing on Centos] |