BenV's notes

Blast! It’s Boost! (Slackware64 and Deluge / libtorrent-rasterbar)

by on Aug.29, 2010, under Software

Obviously I didn’t mention this issue enough yet since google didn’t return my blog for this issue as well as I’d like.

Today’s task with a problem: upgrading to Deluge 1.3.0-rc2 from rc1. Just for reference, I ran into this problem before. Since we’re upgrading Deluge, I’m upgrading the torrent library first. The latest version seems to be libtorrent-rasterbar version 0.15.2.
The problem:

benv@machine:~/libtorrent-rasterbar-0.15.2$ ./configure --prefix=/usr # And some more options, but nothing with boost
# Some configure junk and then:

Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
configure: error: Boost.System library not found. Try using --with-boost-system=lib

… don’t you just hate it when your computer hints you to try something trivial?
Well configure, since you know it all so well. .. WHY DON’T YOU FIGURE IT OUT YOURSELF?! It’s not as if we’re talking about dangerous operations like formatting harddrives here…..
Just make it work, that’s what it’s for!

Anyway, we try again with the configure suggestion:

benv@machine:~/libtorrent-rasterbar-0.15.2$ ./configure --prefix=/usr --with-boost-system=lib # And some more options unrelated to boost
# Some configure junk and then:

Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -llib... no
checking for exit in -lboost_system-lib... no
configure: error: Could not link against boost_system-lib !

Raah, fine, we’ll dig into the config.log again.

configure:15486: checking for exit in -lboost_system-lib
configure:15511: gcc -o conftest -lpthread -g -O2  -I/usr/include  -L/usr/lib conftest.c -lboost_system-lib    >&5
conftest.c:33: warning: conflicting types for built-in function 'exit'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld: cannot find -lboost_system-lib
collect2: ld returned 1 exit status

Note that it runs with -L/usr/lib. Since this is Slackware64 it has a /usr/lib64, but no (useful) /usr/lib.

So we try again, this time telling it where boost is supposed to be.

benv@machine:~/libtorrent-rasterbar-0.15.2$ ./configure --prefix=/usr --with-boost-system=lib --with-boost-libdir=/usr/lib64 # And some more options unrelated to boost
# Configure rubbish

Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -llib... no
checking for exit in -lboost_system-lib... no
configure: error: Could not link against boost_system-lib !

…. *RAGE*…. …. …
Finally I calm down and again check the config.log, find out that now correctly passes the libdir:

configure:15486: checking for exit in -lboost_system-lib
configure:15511: gcc -o conftest -lpthread -g -O2  -I/usr/include  -L/usr/lib64 conftest.c -lboost_system-lib    >&5
conftest.c:33: warning: conflicting types for built-in function 'exit'
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld: cannot find -lboost_system-lib
collect2: ld returned 1 exit status

Checking what boost garbage I have wasting space in my lib64 dir, I find:

benv@machine:~/libtorrent-rasterbar-0.15.2$ find /usr/lib64 -name '*boost_sys*'
/usr/lib64/libboost_system.so
/usr/lib64/libboost_system.so.1.42.0
# Note that there's tons more boost junk here, just not boost_system junk :)

Guess the lib option wasn’t as great after all. We try again:

benv@machine:~/libtorrent-rasterbar-0.15.2$ ./configure --prefix=/usr --with-boost-libdir=/usr/lib64 # No  --with-boost-system=lib anymore!
# Configure rubbish
Checking for boost libraries:
checking for boostlib >= 1.36... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread... yes

Yay, success. Hopefully next time I’ll find this post before I anger myself with Boost again.
(and obviously the blame here goes at least partially to the developer of the configure.am script)

Oh, Deluge still works like a charm btw, thumbs up.


:, , , , ,

1 Comment for this entry

Leave a Reply

You must be logged in to post a comment.

Archives

  • 2012 (12)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)