Friday, November 9, 2007

Manual install of a package and 'pkg-config'

I tried to install the rtorrent package manually. So I downloaded http://libtorrent.rakshasa.no/downloads/rtorrent-0.7.9.tar.gz. Now, rtorrent depends on libsigc++, libcurl and libtorrent. The required versions of libsigc++ and libcurl were already installed on my system. I decided to manually install (just for fun) libtorrent. So I downloaded http://libtorrent.rakshasa.no/downloads/libtorrent-0.11.9.tar.gz.

Next I did the routine "untar, configure, make, make install' cycle on libtorrent (I used the configure option --prefix=$HOME). No problems. When I tried the same on rtorrent, 'configure' complained that libtorrent was not found.

Well, after some poking around, I found that 'pkg-config' that is used for finding libraries needs the path to a file named "library_name.pc" to be added to the environment variable PKG_CONFIG_PATH for it to able to find the library. In my case, libtorrent.pc was in ~/lib/pkgconfig. So, once I added to
PKG_CONFIG_PATH, rtorrent compiled and installed fine.

No comments: