mini-caffe icon indicating copy to clipboard operation
mini-caffe copied to clipboard

//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

Open lucasjinreal opened this issue 7 years ago • 3 comments

what is the error:

[100%] Linking CXX executable run_net
/usr/bin/ld: CMakeFiles/run_net.dir/tests/run_net.cpp.o: undefined reference to symbol 'pthread_create@@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
CMakeFiles/run_net.dir/build.make:99: recipe for target 'run_net' failed
make[2]: *** [run_net] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/run_net.dir/all' failed
make[1]: *** [CMakeFiles/run_net.dir/all] Error 2
Makefile:83: recipe for target 'all' failed

lucasjinreal avatar Jan 03 '18 10:01 lucasjinreal

You need to link pthread, add link flags in tests.cmake

luoyetx avatar Jan 03 '18 14:01 luoyetx

Why not add that directly in repo as people may always got this error.

lucasjinreal avatar Jan 03 '18 15:01 lucasjinreal

This error depends on your system platform.

luoyetx avatar Jan 04 '18 01:01 luoyetx