kosta777 / parallel-genomeseq

Parallelization of popular genome sequencing algorithms
4 stars 1 forks source link

Failure to build #7

Closed spaceben closed 4 years ago

spaceben commented 4 years ago

Could someone more versed in make help me out here. It seems that .cpp files expect for main.cpp are never compiled. I am going insane... After this is fixed I can merge into master.

g++ -std=c++14 -Wall -O3 -c -o obj/main.o src/main.cpp
g++ -std=c++14 -Wall -O3 -o bin/parseqal obj/main.o
/usr/bin/ld: obj/main.o: in function `main':
main.cpp:(.text.startup+0xb8): undefined reference to `SWAligner::SWAligner(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&)'
/usr/bin/ld: main.cpp:(.text.startup+0xc0): undefined reference to `SWAligner::calculateScore()'
collect2: error: ld returned 1 exit status
make: *** [Makefile:33: bin/parseqal] Error 1
huanglangwen commented 4 years ago

I think you need to follow the readme file and use cmake.

kosta777 commented 4 years ago

Yeah definitely try using cmake first in the build directory.

spaceben commented 4 years ago
/usr/bin/ld: liblibaligner.a(smithwatermanlinear.cpp.o): in function `SWAligner::SWAligner(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&)':
/home/ben/Documents/edu/dphpc/parallel-genomeseq/src/aligner/smithwatermanlinear.cpp:10: undefined reference to `Similarity_Matrix::Similarity_Matrix()'
/usr/bin/ld: liblibaligner.a(smithwatermanlinear.cpp.o): in function `LocalAligner::LocalAligner()':
/home/ben/Documents/edu/dphpc/parallel-genomeseq/src/aligner/localaligner.h:6: undefined reference to `vtable for LocalAligner'
/usr/bin/ld: liblibaligner.a(smithwatermanlinear.cpp.o):(.data.rel.ro._ZTV9SWAligner[_ZTV9SWAligner]+0x18): undefined reference to `SWAligner::getScore() const'
/usr/bin/ld: liblibaligner.a(smithwatermanlinear.cpp.o):(.data.rel.ro._ZTV9SWAligner[_ZTV9SWAligner]+0x20): undefined reference to `SWAligner::getPos() const'
/usr/bin/ld: liblibaligner.a(smithwatermanlinear.cpp.o):(.data.rel.ro._ZTI9SWAligner[_ZTI9SWAligner]+0x10): undefined reference to `typeinfo for LocalAligner'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/parseqal_debug.dir/build.make:86: ../bin/parseqal_debug] Error 1
make[1]: *** [CMakeFiles/Makefile2:148: CMakeFiles/parseqal_debug.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I followed your advice. I am still stuck though. Would be happy if somebody could take a second look.

spaceben commented 4 years ago

Solved. Constructor incorrect.