Kingsford-Group / squid

SQUID detects both fusion-gene and non-fusion-gene structural variations from RNA-seq data
BSD 3-Clause "New" or "Revised" License
40 stars 22 forks source link

Linker error when compiling SQUID #23

Open Lyn16 opened 3 years ago

Lyn16 commented 3 years ago

Here is the error message when I run make on the Makefile of squid

src/ReadRec.o: In functionBuildChimericSBamRecord(std::vector<ReadRec_t, std::allocator >&, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >)': ReadRec.cpp:(.text+0x34f9): undefined reference to BamTools::BamAlignment::BamAlignment(BamTools::BamAlignment const&)' src/SegmentGraph.o: In functionSegmentGraph_t::BuildNode_STAR(std::vector<int, std::allocator > const&, std::vector<ReadRec_t, std::allocator >&, std::cxx11::basic_string<char, std::char_traits, std::allocator >)': SegmentGraph.cpp:(.text+0x2a1f): undefined reference to BamTools::BamAlignment::BamAlignment(BamTools::BamAlignment const&)' src/SegmentGraph.o: In functionSegmentGraph_t::BuildNode_BWA(std::vector<int, std::allocator > const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >)': SegmentGraph.cpp:(.text+0x9355): undefined reference to BamTools::BamAlignment::BamAlignment(BamTools::BamAlignment const&)' src/SegmentGraph.o: In functionSegmentGraph_t::RawEdgesOther(std::vector<ReadRec_t, std::allocator >&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >)': SegmentGraph.cpp:(.text+0x1225e): undefined reference to BamTools::BamAlignment::BamAlignment(BamTools::BamAlignment const&)' src/SegmentGraph.o: In functionSegmentGraph_t::RawEdges(std::vector<ReadRec_t, std::allocator >&, std::cxx11::basic_string<char, std::char_traits, std::allocator >)': SegmentGraph.cpp:(.text+0x13b99): undefined reference to BamTools::BamAlignment::BamAlignment(BamTools::BamAlignment const&)' collect2: error: ld returned 1 exit status make: *** [bin/squid] Error 1

Congm12 commented 3 years ago

This error is related to the update of bamtools. We update the installation instruction according to the latest bamtools. Please replace the Makefile with the latest version (update the path to boost, glpk accordingly), and reinstall bamtools according to the latest instruction. Let us know if there are further problems.

Lyn16 commented 3 years ago

Hi, thanks a lot for the last replying. I think i still have a problem with compiling the squid; I followed the latest instruction for installing bamtools and for everything else. And I did update the Makefile accordingly, this time I got a different error message(attached below), I wonder if it's still a problem from the installation of bamtools? Thanks!

`In file included from src/main.cpp:8:0: src/ReadRec.h:21:27: fatal error: api/BamReader.h: No such file or directory

include "api/BamReader.h"

                       ^

compilation terminated. make: *** [src/main.o] Error 1`

Congm12 commented 3 years ago

Please make sure that the correct path of bamtools installation is passed into the Makefile. This folder should be the one in cmake -DCMAKE_INSTALL_PREFIX instead of the git clone folder. You should be able to see the following contents in <bamtools_installation_folder>: