DaehwanKimLab / tophat

Spliced read mapper for RNA-Seq
http://ccb.jhu.edu/software/tophat
Boost Software License 1.0
90 stars 46 forks source link

Compilation issues on some systems with Realtime extensions & fix #19

Closed philippbayer closed 8 years ago

philippbayer commented 8 years ago

I just tried to compile the latest version of tophat and got a minor, but annoying, error when running ./configure:

checking whether Boost::Thread needs Boost::System library... configure: error: Cannot use Boost::Thread

Digging through the configure logs reveals the actual error message:

thread.cpp:(.text+0xdb): undefined reference to `clock_gettime'

Turns out that my system doesn't automatically include the Realtime libraries into compilation, so I had to add "-lrt" to the configure script's CXXFLAGS and "-lrt" to src/Makefile's CXXFLAGS. Then it configured and compiled fine. I assume your system does somehow include rt libraries?

I'm not really a Makefile expert so there may be a more appropriate position for that flag.

gpertea commented 8 years ago

Indeed I ran into this myself on a system with an older gcc and older Boost version, though on most other systems this was not a problem.. It's a pain to get these autoconf scripts/macros right for various Boost versions and configurations.. For now I added -lrt to the ax_boost_thread.m4 script, it fixes this issue and seems to not break the build on systems that don't need it.