czwartek, 29 marca 2012

Non standard linux compilation...

I wanted to compile rTorrent on machine I don't have root access. User compilation is always harder - you can't touch system files nor install any packages to ensure that all dependencies are met. Here are problems I ran into, and some solutions, which probably will work for other projects as well.

I have used ~/usr directory as placeholder for apps that require installation. I will refer to that directory anywhere below.

1. Problems with CppUnit:
possibly undefined macro: AM_PATH_CPPUNIT 
syntax error near unexpected token `1.9.6'
rTorrent uses autogen.sh script to generate proper configuration script. So, first thing is to compile CppUnit, be sure to remember to pass --prefix=$HOME/usr to CppUnit's configure script. make & make install as usual.
However that wont work, yet. We also have to set ACLOCAL_FLAGS variable, so let's execute:
export ACLOCAL_FLAGS="-I $HOME/usr/include -I ../cppunit-VERSION"
All right, now you're ready to go:
./autogen.sh
./configure --prefix=$HOME/usr
make


2. My second problem was sigc++...
No package 'sigc++-2.0' found
Okay, get sources, configure with prefix, make and install. Great, but rTorrent still don't recognize it. The solution is to set another variable:
export PKG_CONFIG_PATH=$HOME/usr/lib/pkgconfig
Now rTorrent should configure itself without any issues :)

And one last thing... if you have some problems during make but configure went just fine, clean your sources:
rm -f scripts/{libtool,lt*}.m4


Good luck! :)

Brak komentarzy:

Prześlij komentarz