DaehwanKimLab / tophat

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

error while building tophat #7

Closed kotoroshinoto closed 8 years ago

kotoroshinoto commented 9 years ago

http://fpaste.org/227972/32373631/

kotoroshinoto commented 9 years ago

it appears to be a problem with SeqAn, which I have not encountered before. I'm not sure what is causing it. I am using a newer gcc compiler than previously, perhaps that might be related? (old was 4.4.6, new one is 5.1.0)

gpertea commented 9 years ago

Indeed it seems that the SeqAn version included with TopHat2 is too old to compile properly with the very latest GCC compiler version out there.. I suspect you are on the very latest Ubuntu/Fedora (or Arch?) release, which would be a somewhat unusual choice for a production system. I would recommend installing and using an older gcc compiler in order to build TopHat2 at this time.

kotoroshinoto commented 9 years ago

i'm on a cluster where I must build everything from source because I am not a sudoer. I pulled the latest version of gcc mainly because it was the logical thing to do without being told another version to pull, and the version available in centos is a bit outdated.

kotoroshinoto commented 9 years ago

Is there a version of SeqAn that would be happy with the newer gcc? how much effort would it take to upgrade tophat to use that?

Perhaps I could assist with a pull request, if it is not too involved in deep knowledge of the tophat codebase.

wookietreiber commented 9 years ago

Try using clang, this is how I got it to work in current Arch Linux (cf. PKGBUILD):

export CC=clang
export CXX=clang++

./configure --prefix=/usr

make -j1
kotoroshinoto commented 9 years ago

there is no clang, i'd have to build it from source.

kotoroshinoto commented 9 years ago

is it strictly required that make only use 1 thread when building tophat?

(i'm going to try wookie's suggestion once llvm/clang/etc finish compiling)

kotoroshinoto commented 9 years ago

for some reason llvm + clang / clang++ did not like my boost libraries.

kotoroshinoto commented 9 years ago

the thread test was failing due to missing a linker flag "-lrt", giving cryptic error that it was unable to use boost thread, when it was really a missing dependency.

wookietreiber commented 9 years ago

Is it possible to use a more recent version of SeqAn that does not have these problems, i.e. are later SeqAn versions (1.4.2 or 2.0.0) compatible with TopHat 2.1.0?

If yes, could you include a more recent SeqAn version with TopHat?

wookietreiber commented 9 years ago

I finally got it to work without clang, using the Debian build instructions and patch using SeqAn 1.4 instead of 1.3. For the full build that works on Arch Linux, see https://aur4.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tophat. I'll prepare a PR.

wookietreiber commented 9 years ago

BTW @kotoroshinoto : Your fpaste link is dead.

infphilo commented 9 years ago

The use of SeqAn in TopHat is very limited - we would rather prune unused parts of SeqAn and modify the remainder so that TopHat can be complied with newer GCCs.

kotoroshinoto commented 9 years ago

@wookietreiber well it HAS been a while, they don't maintain those links for long.

kotoroshinoto commented 9 years ago

@infphilo do you actually NEED seqan? would the new HTSLIB and new samtools perhaps provide equivalent functions if you updated them? (i've never used seqAN so I don't quite know what features it provides.)

its just a thought, maybe tackle two problems at once if it does work out.

blaiseli commented 8 years ago

I would very like a tophat that compiles cleanly with recent versions of gcc. I just tried with the source 2.1.0 release as well as with a freshly cloned github repository, and in both cases, compilation fails as follows:

In file included from ./SeqAn-1.3/seqan/file.h:56:0,
                 from ./SeqAn-1.3/seqan/score/score_matrix.h:40,
                 from ./SeqAn-1.3/seqan/score.h:48,
                 from ./SeqAn-1.3/seqan/find.h:45,
                 from reads.cpp:22:
./SeqAn-1.3/seqan/file/file_generated_forwards.h: At global scope:
./SeqAn-1.3/seqan/file/file_generated_forwards.h:927:66: error: invalid abstract return type 'seqan::FileFormat<TFile, TData, TMeta, void>'
 template <typename TFile, typename TData, typename TMeta> inline FileFormat<TFile, TData, TMeta, void> guessFileFormat(TFile & file, TData & data);        // "projects/library/seqan/file/file_format_guess.h"(65)
                                                                  ^
In file included from ./SeqAn-1.3/seqan/file.h:84:0,
                 from ./SeqAn-1.3/seqan/score/score_matrix.h:40,
                 from ./SeqAn-1.3/seqan/score.h:48,
                 from ./SeqAn-1.3/seqan/find.h:45,
                 from reads.cpp:22:
./SeqAn-1.3/seqan/file/file_format.h:143:8: note:   because the following virtual functions are pure within 'seqan::FileFormat<TFile, TData, TMeta, void>':
 struct FileFormat<TFile, TData, TMeta, void>
        ^
./SeqAn-1.3/seqan/file/file_format.h:154:2: note:   virtual void* seqan::FileFormat<TFile, TData, TMeta, void>::formatID_() const
  formatID_() const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:157:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::read_(TFile&, TData&) const
  read_(TFile & file, TData & data) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:159:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::read_(TFile&, TData&, seqan::FileFormat<TFile, TData, TMeta, void>::TSize) const
  read_(TFile & file, TData & data, TSize limit) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:162:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::readMeta_(TFile&, TMeta&) const
  readMeta_(TFile & file, TMeta & meta) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:165:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::goNext_(TFile&) const
  goNext_(TFile & file) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:168:2: note:   virtual seqan::FileFormat<TFile, TData, TMeta, void>::TSize seqan::FileFormat<TFile, TData, TMeta, void>::length_(TFile&) const
  length_(TFile & file) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:171:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::write_(TFile&, TData&) const
  write_(TFile & file, TData & data) const = 0;
  ^
./SeqAn-1.3/seqan/file/file_format.h:173:2: note:   virtual void seqan::FileFormat<TFile, TData, TMeta, void>::write_(TFile&, TData&, TMeta&) const
  write_(TFile & file, TData & data, TMeta & meta) const = 0;
  ^
Makefile:1442: recipe for target 'reads.o' failed
make[2]: *** [reads.o] Error 1
make[2]: Leaving directory '/home/severine.chambeyron/src/tophat/src'
Makefile:377: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/severine.chambeyron/src/tophat'
Makefile:317: recipe for target 'all' failed
make: *** [all] Error 2

Are there plans to fix tophat ?