bioinfologics / satsuma2

FFT cross-correlation based synteny aligner, (re)designed to make full use of parallel computing
41 stars 13 forks source link

Make fails on Ubuntu 16.04 LTS undefined reference to `pthread_create` #2

Closed bschiffthaler closed 7 years ago

bschiffthaler commented 8 years ago

These targets fail with the above error.

Fix by linking target libraries in CMakeLists.txt:

target_link_libraries(KMatch pthread)
target_link_libraries(ColaAlignSatsuma pthread)
target_link_libraries(SatsumaSynteny2 pthread)
target_link_libraries(HomologyByXCorrSlave pthread)

Platform:

4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 GNU/Linux
cmake version 3.5.1
bschiffthaler commented 7 years ago

I just saw that this is now referenced in the README

Change:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread -std=c++14 -O3 -w") 

to

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread -pthread -std=c++14 -O3 -w")

in CMakeLists.txt. This means I'll be closing this issue.