Closed deter3 closed 7 years ago
I just found solution , in CMakeLists.txt , add "pthread"
TARGET_LINK_LIBRARIES(LBPGPU ${CUDA_LIBRARIES} nppc nppi X11 )
to
TARGET_LINK_LIBRARIES(LBPGPU ${CUDA_LIBRARIES} nppc nppi X11 pthread )
also need to edit ~/.bashrc , otherwise you will see errors "/usr/bin/ld: cannot find -lnppi "
Yes of course the pthread library must also be there. Will you do a pull request or should I fix it?
How about you fix it ?
Done
I was trying to compile hf-lbp for amazon GPU ubuntu 14.04 opencv 2.4 .
I used "cmake -BUILD_LBPGPU=ON -BUILD_PYTHON=ON .." , and then "make" , got the error as below . I searched a lot how to fix the error "undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'" , tried couple solution and it did not worked out . I am not c++ guy , so can you please point me to the right direction how to fix the problem .
ubuntu@ip-xx-xx-x-xx:~/LBP/build$ make Scanning dependencies of target LBP [ 14%] Building CXX object CMakeFiles/LBP.dir/LBP.cpp.o Linking CXX shared library libLBP.so [ 14%] Built target LBP [ 28%] Building NVCC (Device) object CMakeFiles/LBPGPU.dir//./LBPGPU_generated_LBPGPU.cu.o Scanning dependencies of target LBPGPU Linking CXX executable LBPGPU /usr/bin/ld: CMakeFiles/LBPGPU.dir/./LBPGPU_generated_LBPGPU.cu.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [LBPGPU] Error 1 make[1]: [CMakeFiles/LBPGPU.dir/all] Error 2 make: *** [all] Error 2