This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Cannot build cufflinks 2.2.1 from source (possible problem with samtools 1.3.1)

Platform Ubuntu 16.04

I followed all the instructions in https://github.com/cole-trapnell-lab/cufflinks and I am pretty sure this isn't something huge. I am using samtools 1.3.1. In the include dir for samtools I had to copy the htslib dir (from samtools_instalation/htslib-1.3.1/) as bam/sam.h in samtools/include contains an include to htslib/sam.h. I have added the library libhts.a in samtools/lib (together with libbam.a)

I export (--with-eigen= doesn't seem to work)

export EIGEN_CPPFLAGS="-I/opt/eigen3"

I configure

./configure --prefix=/opt/cufflinks-2.2.1 --with-boost=/opt/boost_1_61_0 --with-bam=/opt/samtools-1.3.1

Which gives me the following:

  C++ compiler:        g++ -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wunused -Wuninitialized -ftemplate-depth-1024 -m64 -O3  -DNDEBUG  -pthread -I/opt/boost_1_61_0/include -I/opt/samtools-1.3.1/include -I/opt/eigen3/include  
  GCC version:         gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413
  Host System type:    x86_64-unknown-linux-gnu
  Install prefix:      /opt/cufflinks-2.2.1
  Install eprefix:     ${prefix}

and I make (and after a ton of warnings) - I get to this error

g++  -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wunused -Wuninitialized -ftemplate-depth-1024 -m64 -O3  -DNDEBUG  -pthread -I/opt/boost_1_61_0/include -I/opt/samtools-1.3.1/include -I/opt/eigen3   -o cufflinks  -L/opt/boost_1_61_0/lib -L/opt/samtools-1.3.1/lib  cufflinks.o libcufflinks.a libgc.a -lboost_thread -lboost_system  -lboost_serialization  -lbam  -lz 
libcufflinks.a(hits.o): In function `samread':
/opt/samtools-1.3.1/include/bam/sam.h:95: undefined reference to `sam_read1'
libcufflinks.a(hits.o): In function `BAMHitFactory::get_hit_from_buf(char const*, ReadHit&, bool, char*, char*)':
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:557: undefined reference to `bam_aux_get'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:560: undefined reference to `bam_aux2A'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:567: undefined reference to `bam_aux_get'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:570: undefined reference to `bam_aux2i'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:573: undefined reference to `bam_aux_get'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:576: undefined reference to `bam_aux2i'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:580: undefined reference to `bam_aux_get'
/home/jp/Downloads/installations/cufflinks-2.2.1/src/hits.cpp:583: undefined reference to `bam_aux2i'
libcufflinks.a(hits.o): In function `BAMHitFactory::undo_hit()':

Note that method sam_read1 is commented out in samtools header ./bam/bam.h line 224, it is called from ./bam/sam.h line 95 and is declared in (samtools/include) htslib/sam.h line 365.

~/Downloads/installations/samtools-1.3.1/bam.h:224:    // int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b);
~/Downloads/installations/samtools-1.3.1/htslib-1.3.1/htslib/sam.h:365:    int sam_read1(samFile *fp, bam_hdr_t *h, bam1_t *b) HTS_RESULT_USED;
~/Downloads/installations/samtools-1.3.1/htslib-1.3.1/sam.c:1030:int sam_read1(htsFile *fp, bam_hdr_t *h, bam1_t *b)

Can someone shed some light on this please? Or try to point me in the right direction? How to I get this to build?

rna-seq cufflinks samtools building

Try samtools-0.1.19, or better yet just download the precompiled version of cufflinks.

0 answers

No answers yet.

Log in to answer this question.