BenV's notes

Boost, qBitTorrent and lib64

by on Sep.05, 2009, under Morons, Software

After toying around a bit on the news sites I decided it would be interesting to see if qBitTorrent would run on slackware 64.
So we go to the download site, copy the url, and see if Slackbuild likes it. Slackbuild leeches, untars, gives the configure options (which are a bit buggy, I know, will be fixed next release), runs configure. Configure crashes out with “blabla boost blabla”.

Oh. Boost….. that time of the month. If there’s one piece of trash I’ve run into very often on my compilation expeditions…. it’s boost. What a cancer piece of trash that is. You wouldn’t believe the amount of cursing I’ve gone through on my trails through “build from source” land because of boost. It never works, and when it does it’s limping on. They should have called it “blast” instead.
These days boost is in the official slackware repositories. You’d think that would help, since I can’t mess up the paths etc anymore. (compiling boost is another disaster btw, don’t go there unless you like torture). But noo, as usual the programs that use boost (“because we can’t code ™”, or at least, that’s what I think) are so good at coding stuff themselves that they fail the autoconf for it as well. Prutsers. Well, to be honest, if they can’t code it themselves it’s probably smart to use a library that handles it for them….. but boost? :/

Anyway, back to qBitTorrent. Actually, it’s libtorrent-rasterbar that’s failing. Attempt 1, configure with only a prefix and no other options:

benv@janeman:~/tmp$ # ./configure --prefix=/usr
[ *blabla* ]
checking whether the Boost::System library is available... yes
configure: error: unable to find Boost.System library, currently this is required.

WHat?! Do you ahve Boost::System? Yes. I mean no!
… seriously, who comes up with this shit….
So we dig into config.log and find:

configure:21533: checking whether the Boost::System library is available
configure:21567: g++ -c -g -O2 -I/usr/include conftest.cpp >&5
configure:21574: $? = 0
configure:21597: result: yes
configure:21865: error: unable to find Boost.System library, currently this is required.

Or in other words: nothing we didn’t already know. FUCK.
Time for a trace.

benv@janeman:~/tmp$ bash -x ./configure --prefix=/usr --with-ssl --with-boost-system=boost_system 2>&1 | less
[ shift-g, wait, search for Boost::System ]
++ echo -L/usr/lib
++ sed -e 's/[^\/]*//'
+ BOOSTLIBDIR=/usr/lib
+ LDFLAGS_SAVE=' -L/usr/lib'
+ test x = x
++ ls '/usr/lib/libboost_system*.so*' '/usr/lib/libboost_system*.a*'
++ sed 's,.*/,,'
++ sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'
+ test x '!=' xyes
++ ls '/usr/lib/boost_system*.dll*' '/usr/lib/boost_system*.a*'
++ sed 's,.*/,,'
++ sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'
+ test x = xno
+ test -z ''
+ printf '%s\n' 'configure:21865: error: unable to find Boost.System library, currently this is required.'
+ printf '%s\n' 'configure: error: unable to find Boost.System library, currently this is required.'
configure: error: unable to find Boost.System library, currently this is required.

…. /usr/lib? Says who? Not me, that’s for sure. idiots.
In fact, I’m quite sure that it’s in /usr/lib64.

benv@janeman:~/tmp$ ls -la /usr/lib64/libboost_filesyste*
-rwxr-xr-x 1 root root 83368 2009-08-25 04:31 /usr/lib64/*
-rwxr-xr-x 1 root root 83336 2009-08-25 04:31 /usr/lib64/*

Jup, as expected. Boost is kanker. Since boost doesn’t have the usual pkgconfig issues, we can only conclude that the reason is that either this was written by a moron, or that
boost supplies invalid tests for finding itself through the autoconf system. I suspect the latter, but that’s just me 😉

In this case the solution is simple, since the configure script has an override option. Wonder why… maybe they ran into boost idiocies before? 😉
The solution:

benv@janeman:~/tmp$ ./configure --prefix=/usr --with-boost-libdir=/usr/lib64

This runs through configure, it finds the boost garbage and runs through. And guess what? It even compiles! 🙂

The gist of this rant: autoconf is pretty useless if you make assumptions that autoconf is supposed to detect. If you write software, don’t assume this stuff, try to detect it.
Also: when it fails, give me an error message that is useful, not some generic error code. “Library not found” vs “library not found because doesn’t exist in /usr/lib”.

About qbittorrent: it’s a cute little torrent client for linux. Especially if you like faily lightweight stuff that does has a gui. The thing I like about those lightweight clients: they’re fast.
This one even has an RSS reader these days…. cute.
Here’s a screenie:

qbittorrent v1.5.0

qbittorrent v1.5.0

So qBittorrent: keep up the good work, and get rid of boost 😉

:, , , ,

2 Comments for this entry

Leave a Reply

You must be logged in to post a comment.


  • 2018 (1)
  • 2016 (1)
  • 2015 (7)
  • 2014 (4)
  • 2013 (11)
  • 2012 (27)
  • 2011 (26)
  • 2010 (25)
  • 2009 (68)