Boost detection fails on Linux

Issue #13 resolved
Former user created an issue

Boost libraries are not detected even when specifying --boost-libs explicitly. Boost includes are detected so the build continues but fails when trying to link the unit tests.

waf configure output attached.

Comments (14)

  1. Gavin Band repo owner

    I think this can be fixed by building boost with the command

    ./b2 --layout=versioned

    e.g. on my system the libraries are named including the compiler, e.g.

    etc. This has something to do with how waf's boost tool operates, in the version I've been using, it might be that moving to a later version of waf would help here.


  2. Gavin Band repo owner

    Ok - well if you want help with this, drop me an email, you're one of the first people to try to build qctool (other than me).

  3. cscluster

    Dear Gavin,

    I'm building qctool for our cluster as the current kernel does not support the binaries that are available. I found this issue to resolve the failure to detect the boost libraries that I was finding. Having rebuilt boost with the --layout=versioned flag as you suggested, this issue was fixed. However, now fails with "Waf: Leaving directory `/share/apps/qctool/build' Build failed: -> task failed (err #1): {task: cxx wildcard.cpp -> wildcard_1.o}" The file wildcard.cpp doesn't appear to exist (using a mercurial clone of the qctool v1.4 source code under Linux (RHEL 5-based Linux, GCC 4.1.2-54). Any suggestions would be much appreciated.

    Many thanks,

    David Gregory

  4. Gavin Band repo owner

    Hi David, That's a bit odd. I've just hg cloned and built qctool-1.4 on a linux machine and not run into any issues. (I found I needed to add --static to the configure command line, but that's a separate issue that causes difficulties with linking.) What does hg status say? Also, try running waf with ./waf-1.5.18 -v -j 1 to see what commands waf is actually trying. If you still have issues, send me an email via the mailing list. Best, G.

  5. cscluster

    Dear Gavin,

    Apologies, but I'm now at bit of a loss to know what to do trying to build qctool, since the last time I tried to build it. I am building it, because we are in the process of upgrading our cluster. So far I have tried to build it using the latest version of boost (v1.57 - built using --layout=versioned). The waf configure scripts successfully finds these boost libraries and headers. I have then tried to compile it using gcc versions 4.4, 4.7 and 4.9. All fail at the linker stage (at tasks 463, 468 and 475 respectively). These are all errors of type "unknown reference to symbol" when linking to the boost libraries, but I can get no consistency with these errors (at least when attempting to re-create them). The closest I came was at task 475 (out of 493 tasks to completion) which seemed to complain that it couldn't find the boost_system library (which was there ). This suggested it was not included in the linker command, but I'm not convinced this is the cause as the other errors are similar. I am attempting to build this on a CentOS 6.5 system (kernel revision 2.6). As a test, I also attempted to build it on an Ubuntu 14.04 system (kernel revision 3.13), but that fails at Build failed: -> task failed (err #1): {task: cxx BGenFileSNPDataSource.cpp -> BGenFileSNPDataSource_1.o} which makes no sense as this is the latest hg clone as I used for the previous builds.

    Any insights would be much appreciated.

    Many thanks,

    David Gregory

  6. Gavin Band repo owner

    David, the latest commit (7a7230eee3fb) may fix this (it makes qctool compilable against boost 1.57 on my system). Can you try this? If this doesn't work please create a new issue with your specific problem and attach the output of running ./waf-1.5.18 -j 1. Thanks, Gavin.

  7. Gavin Band repo owner

    I am closing this issue, which is effectively solved in one of two ways:

    1. By running the boost build tool as ./b2 install --layout=versioned when building boost, library are named in a way that lets the waf build scripts find them.

    2. Jon Diprose kindly contributed the attached patch (qctool-1.5-000-waf-boost.patch). Note that this has to be applied to the waf libraries that are unpacked when you first build qctool, so it's nontrivial to apply this in the repo and I haven't done so.

  8. cscluster

    Hi Gavin,

    Just to let you know the latest commit (7a7230eee3fb) compiled successfully on our new cluster (CentOS 6.5, Kernel 2.6) with Boost version 1.57. It was not (or did not seem) necessary to apply the qctool-1.5-000-waf-boost.patch; the compilation worked successfully without it in this case.

    Many thanks for all your help.



  9. Ana Marija Sokovic

    Hi Gavin,

    I am trying to install this on Cray XE6 machine via: /lustre/beagle2/ams/qctool>export LD_LIBRARY_PATH=/soft/CANDLE/lib/bazel_dept/glibc-2.14/lib/$LD_LIBRARY_PATH /lustre/beagle2/ams/qctool>CXX=CC CC=cc ./waf-1.5.18 -v -j 1 configure --static

    configure completes but in build phase I got this error: ../genfile/src/OneFilePerChromosomeSNPDataSink.cpp:10:46: fatal error: boost/ptr_container/ptr_vector.hpp: No such file or directory #include <boost/ptr_container/ptr_vector.hpp> ^ compilation terminated.

    How would I apply the above mentioned patch? I tried doing: ams@login1:/lustre/beagle2/ams/qctool> patch -p1 < qctool-1.5-000-waf-boost.patc -bash: qctool-1.5-000-waf-boost.patc: No such file or directory ams@login1:/lustre/beagle2/ams/qctool> patch -p1 < qctool-1.5-000-waf-boost.patch can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was:

    --- qctool-orig/.waf-1.5.18-402a8e0721eb718ff717906f130db0f4/wafadmin/3rdparty/ 2010-07-06 18:50:51.000000000 +0100
    File to patch: waf-1.5.18
    patching file waf-1.5.18
    Hunk #1 FAILED at 38.
    1 out of 1 hunk FAILED -- saving rejects to file waf-1.5.18.rej

    How I am suppose to do this?

    Thanks Ana

  10. Log in to comment