make error in ubuntu
Determining if the pthread_create exist failed with the following output: Change Dir: /home/firefly/caffe2/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_43ea0/fast" make[1]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTC_43ea0.dir/build.make CMakeFiles/cmTC_43ea0.dir/build make[2]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' Determining if the pthread_create exist failed with the following output: Change Dir: /home/firefly/caffe2/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_43ea0/fast" make[1]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTC_43ea0.dir/build.make CMakeFiles/cmTC_43ea0.dir/build make[2]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' Determining if the pthread_create exist failed with the following output: Change Dir: /home/firefly/caffe2/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_43ea0/fast"
make[1]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_43ea0.dir/build.make CMakeFiles/cmTC_43ea0.dir/build
make[2]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_43ea0.dir/CheckSymbolExists.c.o
Linking C executable cmTC_43ea0
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_43ea0.dir/link.txt --verbose=1
CMakeFiles/cmTC_43ea0.dir/CheckSymbolExists.c.o: In function main':
CheckSymbolExists.c:(.text+0x14): undefined reference to pthread_create'
CheckSymbolExists.c:(.text+0x18): undefined reference to `pthread_create'
make[2]: *** [cmTC_43ea0] Error 1
make[2]: Leaving directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_43ea0/fast' failed
make[1]: *** [cmTC_43ea0/fast] Error 2
make[1]: Leaving directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
File /home/firefly/caffe2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
int main(int argc, char** argv) #ifndef pthread_create return ((int*)(&pthread_create))[argc]; #else (void)argc; return 0; #endif }
Run Build Command:"/usr/bin/make" "cmTC_32c78/fast" make[1]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTC_32c78.dir/build.make CMakeFiles/cmTC_32c78.dir/build make[2]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_32c78.dir/CheckFunctionExists.c.o CMakeFiles/cmTC_32c78.dir/build.make:97: recipe for target 'cmTC_32c78' failed make[2]: *** [cmTC_32c78] Error 1 make[1]: *** [cmTC_32c78/fast] Error 2 make[1]: Leaving directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
Change Dir: /home/firefly/caffe2/build/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_42898/fast" make[1]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' /usr/bin/make -f CMakeFiles/cmTC_42898.dir/build.make CMakeFiles/cmTC_42898.dir/build make[2]: Entering directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_42898.dir/src.cxx.o /usr/bin/c++ -fopenmp -DHAS_BUILTIN_CPU_SUPPORTS -std=c++11 -o CMakeFiles/cmTC_42898.dir/src.cxx.o -c /home/firefly/caffe2/build/CMakeFiles/CMakeTmp/src.cxx /home/firefly/caffe2/build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main(int, char**)’: /home/firefly/caffe2/build/CMakeFiles/CMakeTmp/src.cxx:4:49: error: ‘__builtin_cpu_supports’ was not declared in this scope std::cout << __builtin_cpu_supports("avx2") << std::endl; ^ CMakeFiles/cmTC_42898.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_42898.dir/src.cxx.o' failed make[2]: *** [CMakeFiles/cmTC_42898.dir/src.cxx.o] Error 1 make[2]: Leaving directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_42898/fast' failed make[1]: *** [cmTC_42898/fast] Error 2 make[1]: Leaving directory '/home/firefly/caffe2/build/CMakeFiles/CMakeTmp'
Source file was:
#include
int main(int argc, char** argv) {
std::cout << __builtin_cpu_supports("avx2") << std::endl;
return 0;
}
can anybody fix this problem?...i met this err too....
@harry103 do u solve this problem?or u got another way to pass this error?...THX~
@ibeilinGX I made this error only because I did not clone the full package. I do the git clone again and is ok.
@harry103 i fix this problem by put the third party libs into third_party
I also meet this problem, how do you solve this problem, thx!