zeeev / wham

Structural variant detection and association testing
Other
101 stars 25 forks source link

Error installation (buildWHAMBAM), collect2: error: ld returned 1 exit status #29

Closed sahilseth closed 8 years ago

sahilseth commented 8 years ago

I am getting an error running the step make buildWHAMBAM.

Could you direct me towards a possible issue/fix?

make buildWHAMBAM
.
.
.
.

make[1]: Entering directory `/rsrch2/iacs/apps/wham/wham_git/src/Complete-Striped-Smith-Waterman-Library/src'
gcc -c -o ssw.o ssw.c -Wall -O3 -pipe
gcc -o ssw_test ssw.o main.c -Wall -O3 -pipe  -lm -lz
gcc -o example_c ssw.o example.c -Wall -O3 -pipe  -lm -lz
g++ -o example_cpp example.cpp ssw.o ssw_cpp.o -Wall -O3 -pipe  -lm -lz
gcc -Wall -O3 -pipe  -fPIC -shared -rdynamic -o libssw.so ssw.c
make[1]: Leaving directory `/rsrch2/iacs/apps/wham/wham_git/src/Complete-Striped-Smith-Waterman-Library/src'
g++ -Wall -DVERSION=\"v1.7.0-199-g6106-dirty\" -DFAST -std=c++0x  -Wno-sign-compare src/lib/*cpp src/bin/multi-wham-testing.cpp -Isrc/lib -Isrc/bamtools/include -Isrc/bamtools/src -Isrc/ -Isrc/fastahack -Isrc/Complete-Striped-Smith-Waterman-Library/src/ -Isrc/seqan/core/include/ -Isrc/seqan/extras/include -L./ -lbamtools -fopenmp -lz -lm  src/fastahack/Fasta.o                                                                                                                                                                            src/Complete-Striped-Smith-Waterman-Library/src/ssw_cpp.o src/Complete-Striped-Smith-Waterman-Library/src/ssw.o  -o bin/WHAM-BAM -Wl,-rpath=src/bamtools/lib/
src/bin/multi-wham-testing.cpp: In function 'bool loadReadsIntoIndvs(std::map<std::__cxx11::basic_string<char>, indvDat*>&, readPileUp&, global_opts&, insertDat&, long int*, std::vector<int>&, std::vector<int>&)':
src/bin/multi-wham-testing.cpp:1026:11: warning: variable 'test' set but not used [-Wunused-but-set-variable]
       int test = 0;
           ^
src/fastahack/Fasta.o: In function `operator<<(std::ostream&, FastaIndexEntry const&)':
Fasta.cpp:(.text+0x1fea): undefined reference to `split(std::string const&, char)'
src/fastahack/Fasta.o: In function `FastaIndex::readIndexFile(std::string)':
Fasta.cpp:(.text+0x305e): undefined reference to `split(std::string const&, char)'
Fasta.cpp:(.text+0x30ad): undefined reference to `split(std::string const&, std::string const&)'
src/fastahack/Fasta.o: In function `FastaIndex::flushEntryToIndex(FastaIndexEntry&)':
Fasta.cpp:(.text+0x3b1c): undefined reference to `split(std::string const&, std::string const&)'
/tmp/cc3QW61M.o: In function `randomRegion::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)':
randomregion.cpp:(.text+0x55): undefined reference to `BamTools::BamReader::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/ccKVTEXy.o: In function `bool BamTools::BamAlignment::GetTag<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&) const':
readPileUp.cpp:(.text._ZNK8BamTools12BamAlignment6GetTagINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKS7_RT_[_ZNK8BamTools12BamAlignment6GetTagINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKS7_RT_]+0x9d): undefined reference to `BamTools::BamAlignment::FindTag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char*&, unsigned int const&, unsigned int&) const'
/tmp/cc8SlUfV.o: In function `grabInsertLengths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
multi-wham-testing.cpp:(.text+0x2b77): undefined reference to `BamTools::BamReader::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc8SlUfV.o: In function `prepBams(BamTools::BamMultiReader&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
multi-wham-testing.cpp:(.text+0x3c3a): undefined reference to `BamTools::BamMultiReader::Open(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
multi-wham-testing.cpp:(.text+0x3cdb): undefined reference to `_ZNK8BamTools14BamMultiReader14GetErrorStringB5cxx11Ev'
/tmp/cc8SlUfV.o: In function `intraChromosomeSvEnd(std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> >&, int*, readPileUp&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, long*, long&, long&, long&, FastaReference&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
multi-wham-testing.cpp:(.text+0x7e44): undefined reference to `FastaReference::getSubSequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)'
/tmp/cc8SlUfV.o: In function `score(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long*, readPileUp&, insertDat&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, global_opts&, std::vector<unsigned long, std::allocator<unsigned long> >&, std::vector<BamTools::RefData, std::allocator<BamTools::RefData> >&, int&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, FastaReference&)':
multi-wham-testing.cpp:(.text+0xa06a): undefined reference to `FastaReference::getSubSequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)'
/tmp/cc8SlUfV.o: In function `runRegion(int, int, int, std::vector<BamTools::RefData, std::allocator<BamTools::RefData> >, std::vector<unsigned long, std::allocator<unsigned long> >)':
multi-wham-testing.cpp:(.text+0xc013): undefined reference to `FastaReference::open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
multi-wham-testing.cpp:(.text+0xc097): undefined reference to `FastaReference::getSubSequence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int)'
collect2: error: ld returned 1 exit status
make: *** [buildWHAMBAM] Error 1
zeeev commented 8 years ago

@sahilseth Let's try a basic install first. Please do the following:

git clone --recursive https://github.com/zeeev/wham.git
cd wham
make
sahilseth commented 8 years ago

Initially had tried make, then make buildWHAMBAM.

It seems the issue was with cmake. I minute ago, installing with version 4, works.

Thanks for the quick response!

On Apr 12, 2016, at 10:52 AM, Zev Kronenberg notifications@github.com wrote:

@sahilseth Let's try a basic install first. Please do the following:

git clone --recursive https://github.com/zeeev/wham.git cd wham make — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

zeeev commented 8 years ago

@sahilseth thanks for the bug report.