make step fails with an error
mohsinali1990 opened this issue · 2 comments
mohsinali1990 commented
I am using Linux subsystem on windows 10. while installing the SCOPE as recommended, the following error comes every time:
/usr/bin/ld: CMakeFiles/scope.dir/src/matmult.cpp.o: in function `MatMult::multiply_y_pre_fast(Eigen::Matrix<double, -1, -1, 1, -1, -1>&, int, Eigen::Matrix<double, -1, -1, 1, -1, -1>&, bool)':
> matmult.cpp:(.text+0x209c): undefined reference to `pthread_create'
> /usr/bin/ld: matmult.cpp:(.text+0x21b5): undefined reference to `pthread_create'
-bash: command substitution: line 1: syntax error near unexpected token `Eigen::Matrix'
-bash: command substitution: line 1: `MatMult::multiply_y_pre_fast(Eigen::Matrix<double, -1, -1, 1, -1, -1>&, int, Eigen::Matrix<double, -1, -1, 1, -1, -1>&, bool)':'
Could you please guide us on how to fix or bypass this error to run SCOPE?
alecmchiu commented
Hello,
Can you try adding -pthread to the line set(CMAKE_CXX_FLAGS "-std=c++0x -O3 -lrt") to CMakeLists.txt?
It should read set(CMAKE_CXX_FLAGS "-std=c++0x -O3 -lrt -pthread") after the change.
Best,
Alec
mohsinali1990 commented
Thanks a lot. SCOPE is working fine.
Regards
Mohsin