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.




:, , , , ,

6 Comments for this entry

  • BenV

    And once again, I angered myself. Why don’t I listen to myself? :-p
    Rasterbar libtorrent 0.15.4 still needs the boost libdir option.

  • thrawn

    I just wanted to say thank you for this! Without your documentation, I guess it would’ve taken me another hour or so to get to the bottom of this. Actually building on CentOS 6.5 x86_64 here…

    Now it’s compiling and if the Makefile isn’t fucked up or anything I hope it can work and let me link qBittorrent against it! (Praying right now)

    • thrawn

      Aaand it worked!

      Thanks again! 🙂

    • thrawn

      Oh, actually, I found something weird on another CentOS 6.5 x86_64 box. Here, the C++ compiler would die on the Boost detection because of the flag “-ftemplate-depth=120” being passed to it (my gcc-c++/cc1plus compiler said it didn’t know the option). I removed that from configure and now it seems to work.

      Only difference: Yesterday I was building libtorrent-rasterbar-0.15.7 and today it’s 0.16.15. Just wanted to let you know.

  • BenV

    Good to hear my notes helped you thrawn 🙂

  • matrix69

    thank you very much 🙂 it helps me alot. I really prefer to learn thing and solve the problems on my own. it was a very usefull post 🙂

Leave a Reply

You must be logged in to post a comment.