Closed FlouriteJ closed 6 years ago
This line "-- Configuring incomplete, errors occurred!" means that the cmake
command did not work, but the real cause of the error is not in this output. Can you post the full cmake
output?
Our build system is essentially two commands, cmake
which configures the files, finds packages, and generates makefiles, and then make
, which compiles and links Caffe2 together. The cmake
command did not work for you because it could not find some of the packages that it needed.
@pjh5 -- Does not need to define long separately. -- std::exception_ptr is supported. -- NUMA is available -- Current compiler supports avx2 extention. Will build perfkernels. -- Caffe2: Found protobuf with old-style protobuf targets. -- Caffe2 protobuf include directory: -- The BLAS backend of choice:Eigen -- Found NNPACK (include: /usr/local/include, library: /usr/local/lib/libnnpack.a) -- Found PTHREADPOOL (library: /usr/local/lib/libpthreadpool.a) -- Found CPUINFO (library: /usr/local/lib/libcpuinfo.a) INFOFound external NNPACK installation. CMake Error at cmake/Dependencies.cmake:97 (add_subdirectory): The source directory
/home/yqz/caffe2/caffe2/third_party/cpuinfo
does not contain a CMakeLists.txt file. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Error at cmake/Dependencies.cmake:102 (set_property): set_property could not find TARGET cpuinfo. Perhaps it has not yet been created. Call Stack (most recent call first): CMakeLists.txt:101 (include)
-- Caffe2: Cannot find gflags automatically. Using legacy find. -- Caffe2: Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so) -- Caffe2: Cannot find glog automatically. Using legacy find. -- Caffe2: Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so) CMake Error at cmake/Dependencies.cmake:152 (add_subdirectory): The source directory
/home/yqz/caffe2/caffe2/third_party/googletest
does not contain a CMakeLists.txt file. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Error at cmake/Dependencies.cmake:159 (add_subdirectory): The source directory
/home/yqz/caffe2/caffe2/third_party/benchmark
does not contain a CMakeLists.txt file. Call Stack (most recent call first): CMakeLists.txt:101 (include)
-- Found lmdb (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so) -- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so) -- Found Snappy (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so) -- Found Numa (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libnuma.so) -- OpenCV found (/usr/share/OpenCV) -- Found system Eigen at /usr/local/include/eigen3 -- NumPy ver. 1.14.0 found (include: /usr/local/lib/python2.7/dist-packages/numpy/core/include) -- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) -- Caffe2: CUDA detected: 7.5 -- Found cuDNN: v5.1.10 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Automatic GPU detection returned 6.1 6.1. -- Added CUDA NVCC flags for: sm_61 -- Could NOT find NCCL (missing: NCCL_INCLUDE_DIRS NCCL_LIBRARIES) CMake Error at /usr/share/cmake-3.5/Modules/ExternalProject.cmake:1915 (message): No download info given for 'nccl_external' and its source directory:
/home/yqz/caffe2/caffe2/third_party/nccl
is not an existing non-empty directory. Please specify one of:
-- Could NOT find CUB (missing: CUB_INCLUDE_DIR) -- Could NOT find Gloo (missing: Gloo_INCLUDE_DIR Gloo_LIBRARY) CMake Error at cmake/Dependencies.cmake:417 (add_subdirectory): The source directory
/home/yqz/caffe2/caffe2/third_party/gloo
does not contain a CMakeLists.txt file. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Warning at cmake/Dependencies.cmake:457 (message): mobile opengl is only used in android or ios builds. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Warning at cmake/Dependencies.cmake:533 (message): Metal is only used in ios builds. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Error at cmake/Dependencies.cmake:566 (add_subdirectory): The source directory
/home/yqz/caffe2/caffe2/third_party/onnx
does not contain a CMakeLists.txt file. Call Stack (most recent call first): CMakeLists.txt:101 (include)
CMake Error at cmake/public/utils.cmake:7 (get_target_property): get_target_property() called with non-existent target "onnx". Call Stack (most recent call first): cmake/Dependencies.cmake:569 (caffe2_interface_library) CMakeLists.txt:101 (include)
-- BUILD_BINARY : ON -- BUILD_DOCS : OFF -- BUILD_PYTHON : ON -- Python version : 2.7.12 -- Python includes : /usr/include/python2.7 -- BUILD_SHARED_LIBS : ON -- BUILD_TEST : ON -- USE_ATEN : OFF -- USE_ASAN : OFF -- USE_CUDA : ON -- CUDA version : 7.5 -- CuDNN version : 5.1.10 -- CUDA root directory : /usr -- CUDA library : /usr/lib/x86_64-linux-gnu/libcuda.so -- CUDA NVRTC library : /usr/lib/x86_64-linux-gnu/libnvrtc.so -- CUDA runtime library: /usr/lib/x86_64-linux-gnu/libcudart.so -- CUDA include path : /usr/include -- NVCC executable : /usr/bin/nvcc -- CUDA host compiler : /usr/bin/cc -- USE_EIGEN_FOR_BLAS : 1 -- USE_FFMPEG : OFF -- USE_GFLAGS : ON -- USE_GLOG : ON -- USE_GLOO : ON -- USE_LEVELDB : ON -- LevelDB version : 1.18 -- Snappy version : 1.1.3 -- USE_LITE_PROTO : OFF -- USE_LMDB : ON -- LMDB version : 0.9.17 -- USE_METAL : OFF -- USE_MKL : -- USE_MOBILE_OPENGL : OFF -- USE_MPI : OFF -- USE_NCCL : ON -- USE_NERVANA_GPU : OFF -- USE_NNPACK : ON -- USE_OBSERVERS : ON -- USE_OPENCV : ON -- OpenCV version : 2.4.9.1 -- USE_OPENMP : OFF -- USE_PROF : OFF -- USE_REDIS : OFF -- USE_ROCKSDB : OFF -- USE_THREADS : ON -- USE_ZMQ : OFF -- Configuring incomplete, errors occurred! See also "/home/yqz/caffe2/caffe2/build/CMakeFiles/CMakeOutput.log". See also "/home/yqz/caffe2/caffe2/build/CMakeFiles/CMakeError.log".
@pjh5 I encountered the same problem in the same environment. We need your help, thank you! CMakeError.log: Determining if the pthread_create exist failed with the following output: Change Dir: /dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_ef45c/fast"
/usr/bin/make -f CMakeFiles/cmTC_ef45c.dir/build.make CMakeFiles/cmTC_ef45c.dir/build
make[1]: Entering directory '/dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_ef45c.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_ef45c.dir/CheckSymbolExists.c.o -c /dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_ef45c
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ef45c.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_ef45c.dir/CheckSymbolExists.c.o -o cmTC_ef45c -rdynamic
CMakeFiles/cmTC_ef45c.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x16): undefined reference to
pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_ef45c.dir/build.make:97: recipe for target 'cmTC_ef45c' failed
make[1]: [cmTC_ef45c] Error 1
make[1]: Leaving directory '/dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_ef45c/fast' failed
make: [cmTC_ef45c/fast] Error 2
File /dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp/CheckSymbolExists.c: / /
int main(int argc, char** argv) { (void)argv;
return ((int*)(&pthread_create))[argc];
(void)argc; return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_0629d/fast" /usr/bin/make -f CMakeFiles/cmTC_0629d.dir/build.make CMakeFiles/cmTC_0629d.dir/build make[1]: Entering directory '/dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_0629d.dir/CheckFunctionExists.c.o /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_0629d.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.5/Modules/CheckFunctionExists.c Linking C executable cmTC_0629d /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0629d.dir/link.txt --verbose=1 /usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_0629d.dir/CheckFunctionExists.c.o -o cmTC_0629d -rdynamic -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status CMakeFiles/cmTC_0629d.dir/build.make:97: recipe for target 'cmTC_0629d' failed make[1]: [cmTC_0629d] Error 1 make[1]: Leaving directory '/dev/shm/minglu2/soft_common/caff_install_method/caffe2-master/build_minglu/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_0629d/fast' failed make: [cmTC_0629d/fast] Error 2
@FlouriteJ you need to run git submodule update
. When you clone Caffe2 you must use the --recursive
flag.
@FlouriteJ the error you mention in the title is not anywhere in the output you pasted. Is that another error you got? What did you run to generate that error?
@pjh5 In fact, I downloaded the zip file of master branch instead of cloning. May it be the reason of error? @pjh5 The title came from the file "CMakeError.log"(Ln 52). CMakeError.log
@FlouriteJ Tt is the reason. I do the same as you.
System information
CMake summary output
I tried /issues/2144, but it didn't help.