wiki:archive/libtorrent.rakshasa.no/CompilationHelp

This is a mirror for the old http://libtorrent.rakshasa.no/ site based on the archives from the wayback machine.

If you find any broken links please let me know via mail.

Compilation Help

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 Install page for that.

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.

  1. No symbol information in backtraces
  2. Error checking signedness of mincore parameter
  3. Syntax error when running ./configure
  4. LibTorrent not found by ./configure
  5. LibTorrent version not detected by ./configure
  6. Compilation on Centos

No symbol information in backtraces

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).

This can be accomplished by putting "-rdynamic" in LDFLAGS and recompiling. For example, as an argument to the configure script:

./configure LDFLAGS=-rdynamic

Add any other options you need, of course. Use "make clean" to force a recompilation if necessary.

Error checking signedness of mincore parameter

checking signedness of mincore parameter... configure: error: failed, do *not* attempt fix this with --disable-mincore unless you are running Win32.

Problem: Most likely, no C++ compiler is installed.

Solution: Install g++ or any other competent C++ compiler.

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.

Syntax error when running ./configure

./configure: syntax error near unexpected token `OPENSSL,'
./configure: `      PKG_CHECK_MODULES(OPENSSL, openssl,'

Problem: autoconf cannot find the pkg-config macros in pkg.m4

Solution:::

  • Make sure pkg-config is installed, and pkg.m4 is present
  • Make sure autoconf can find pkg.m4

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.

  • Run autogen.sh again
  • Run configure again

LibTorrent not found by ./configure

checking for STUFF... configure: error: Package requirements (sigc++-2.0 libcurl >= 7.12.0 libtorrent >= 0.11.8) were not met: 
No package 'libtorrent' found

Problem: libtorrent.pc not installed in a place where pkg-config looks for it

Solution:

If you have not already compiled and installed libtorrent, do this first.

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:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Then run configure again.

LibTorrent version not detected by ./configure

checking for STUFF... configure: error: Package requirements (sigc++-2.0 libcurl >= 7.12.0 libtorrent >= 0.12.0) were not met:
Requested 'libtorrent >= 0.12.0' but version of libtorrent is

Problem: automake is too old

Solution: Upgrade automake to version 1.5 or higher, then run libtorrent's autogen.sh and configure again, and make install.

Alternatively, manually edit libtorrent.pc to show the correct version.

Compilation on Centos

Howto for installing on Centos

Last modified 9 years ago Last modified on 08/08/15 16:23:38
Note: See TracWiki for help on using the wiki.