kingsfordgroup / sailfish

Rapid Mapping-based Isoform Quantification from RNA-Seq Reads
http://www.cs.cmu.edu/~ckingsf/software/sailfish
GNU General Public License v3.0
124 stars 45 forks source link

Salmon 0.2.7 - Segmentation Fault #72

Closed aconz2 closed 9 years ago

aconz2 commented 9 years ago

I have just finished building Salmon 0.2.7 from source. However, any attempt to run salmon gives Segmentation fault. The stranger part is that the version of sailfish which was built alongside it runs fine. I'm using boost 1.55, gcc 4.8.3 on RHEL 5. The error I get with valgrind salmon is related to:

boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init()

(Note I don't want to post full output because it is not a personal machine)

I've looked some into this issue and it seems like it's maybe caused by libraries being compiled with different compiler versions? I used FETCH_BOOST so I know boost was compiled with gcc 4.8.3, but it does seem like our TBB was compiled with gcc 4.1

Any ideas on things to try? Thanks in advance.

rob-p commented 9 years ago

Hrmm --- this error does seem generic in the sense that a Google search seems to reveal a significant number of people experiencing segfaults (in many different pieces of software) that trace back to that init() method. It seems, from what I can tell, related to mixing libraries compiled with the c++11 flag with those that are not. I have a few thoughts on things you might try to test this hypothesis.

First, you can see what libraries it thinks it should load. Take a look at the output of ldd <path_to_salmon>. Another thing to ensure is to look over the CMake output to ensure that it's not mistakenly trying to use another version of Boost (ldd will not tell you that since the boost libraries are now statically linked into sailfish and salmon).

To test the TBB hypothesis, I would try the following. First, you could compile TBB (the build system fetches this version when it doesn't find TBB on your system) yourself (using gcc 4.8.3), using a command like the following:

make CXXFLAGS=-UDO_ITT_NOTIFY lambdas=1 compiler=gcc cfg=release tbb_build_prefix=LIBS

You can install this wherever you want. If you then clear the CMakeCache, you can try telling the build system where to look for the version of TBB you build by passing -DTBB_INSTALL_PATH=<path to your install location> to cmake. You can, of course, look over the CMake output to ensure that it's using the TBB that you provided.

Finally, you could try the pre-compiled (e.g. CentOS) binary for Salmon v0.2.7, to see if that runs properly on your system. Hopefully, one of these will clarify what's going on. However, if that's not the case, and you can tell us what happens when you try the above, I'd be happy to dig into it a bit deeper.

aconz2 commented 9 years ago

Despite my best efforts, I didn't get to the bottom of this. A colleague installed 0.2.2 no problem, but I'll likely be testing out 0.3.0 very soon. Thanks for the suggestions, closing.