Thank you!!!! This perfectly fixed my issue.
Hi everyone
I installed boost (prefixed at /data/xma/local/boost/), bowtie, samtools, all without problem, but am facing tophat problem:
checking whether Boost::Thread needs Boost::System library... configure: error: Cannot use Boost::Thread
My command is
./configure \
--prefix=/data/xma/local/tophat/ \
--with-boost=/data/xma/local/boost/ \
--with-bam=/data/xma/tools/samtools-0.1.19
I tried adding the option --with-boost-libdir=/data/xma/local/boost/lib, unfortunately it does not work. Could anyone kindly offers me solutions? I have been in trouble for hours. Thanks a lot!
2 answers
Ran in to exactly the same error, but neither of the above were the issue for me. Perhaps unique to the fact that I have boost installed through macports, my system only has libboost_system-mt in the lib directory and was not being recognized. Adding a soft link for libboost_system in the same directory was all I needed. Was smooth sailing from there on out.
Hello,
I just ran into the same issue with tophat, but the above solution didn't work for me.
./configure --prefix=path/to/install --with-boost=boost/base/dir/
(boost/base/dir needs to include two directories - include and lib)
For me, tophat's small example script at configure's line 5558 to test for Boost:Thread didn't work properly (in the step "checking whether Boost::Thread needs Boost::System library..."), here's the error message from the logs (you can get the logs in "config.log" with ./configure --enable-debug)
thread.cpp:(.text+0xdb): undefined reference to `clock_gettime'
In the configure script, I had to change this line
CXXFLAGS="-pthread $CXXFLAGS"
to
CXXFLAGS="-pthread -lrt $CXXFLAGS"
Using the -lrt flag adds the "Real Time" library to compilation, which adds that missing method.
I also had to add -lrt to src/Makefile in CXXFLAGS
Then, running make produced the correct binaries. It seems to differ between systems. I'd recommend to always use the pre-compiled binaries.
Log in to answer this question.
I finally resolved the problem. The
--with-boostoption is wrong, should be--with-boost=/data/xma/local/boost/include/boost/. Hope this post helps in case anyone else meet the same problem.