KleinYuan/Caffe2-iOS

Build caffe2 failed when click the setup.sh

1icas opened this issue · 0 comments

1icas commented

I git clone your project .And click the setup.sh. But some wrong happened.

That's the error :-- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY)
CMake Warning at cmake/External/nnpack.cmake:58 (message):
NNPACK for mobile cmake support is wip
Call Stack (most recent call first):
cmake/Dependencies.cmake:52 (include)
CMakeLists.txt:85 (include)

-- Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
CMake Warning at cmake/External/gflags.cmake:10 (message):
gflags is not found. Caffe2 will build without gflags support but it is
strongly recommended that you install gflags.
Call Stack (most recent call first):
cmake/External/glog.cmake:2 (include)
cmake/Dependencies.cmake:64 (include)
CMakeLists.txt:85 (include)

-- Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
CMake Warning at cmake/External/glog.cmake:13 (message):
glog is not found. Caffe2 will build without glog support but it is
strongly recommended that you install glog.
Call Stack (most recent call first):
cmake/Dependencies.cmake:64 (include)
CMakeLists.txt:85 (include)

CMake Warning at cmake/Dependencies.cmake:70 (message):
Not compiling with glog. Suppress this warning with -DUSE_GLOG=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Warning at cmake/Dependencies.cmake:83 (message):
Not compiling with gflags. Suppress this warning with -DUSE_GFLAGS=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Could NOT find RocksDB (missing: RocksDB_INCLUDE_DIR RocksDB_LIBRARIES)
CMake Warning at cmake/Dependencies.cmake:131 (message):
Not compiling with RocksDB. Suppress this warning with -DUSE_ROCKSDB=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Warning at cmake/Dependencies.cmake:174 (message):
Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
CMake Warning at cmake/Dependencies.cmake:241 (message):
Not compiling with OpenMP. Suppress this warning with -DUSE_OPENMP=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Warning at cmake/Dependencies.cmake:283 (message):
If not using cuda, one should not use NCCL either.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Warning at cmake/Dependencies.cmake:316 (message):
Gloo can only be used on Linux.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Performing Test CAFFE2_LONG_IS_INT32_OR_64
-- Performing Test CAFFE2_LONG_IS_INT32_OR_64 - Failed
-- Need to define long as a separate typeid.
-- Performing Test HAS_BUILTIN_CPU_SUPPORTS
-- Performing Test HAS_BUILTIN_CPU_SUPPORTS - Failed
-- This compiler does not have builtin_cpu_supports feature.
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING
-- Performing Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING - Failed
-- Turning off deprecation warning due to glog.
-- NCCL operators built due to no CUDA support
-- Include NNPACK operators
-- CUDA RTC operators built due to no CUDA support
-- Excluding image processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- MPI operators skipped due to no MPI support

-- ******** Summary ********
-- General:
-- Git version :
-- System : Darwin
-- C++ compiler : /usr/bin/g++
-- C++ compiler version : 9.0.0.9000039
-- Protobuf compiler : /Users/licas/tmp/caffe2/build_host_protoc/bin/protoc
-- CXX flags : -fembed-bitcode -Wno-deprecated-declarations -Wno-deprecated -std=c++11 -fPIC -Wno-narrowing
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;EIGEN_MPL2_ONLY;CAFFE2_UNIQUE_LONG_TYPEMETA;CAFFE2_NO_BUILTIN_CPU_SUPPORTS

-- BUILD_SHARED_LIBS : OFF
-- BUILD_PYTHON : OFF
-- Python version :
-- Python library :
-- USE_CUDA : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : OFF
-- USE_GFLAGS : OFF
-- USE_LMDB : OFF
-- USE_LEVELDB : OFF
-- USE_OPENCV : OFF
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : OFF
-- USE_NNPACK : ON
-- USE_OPENMP : OFF
-- USE_REDIS : OFF
-- USE_GLOO : OFF
-- Configuring done
CMake Error at cmake/External/nnpack.cmake:102 (add_library):
Cannot find source file:

/Users/licas/tmp/caffe2/third_party/NNPACK/src/psimd/fft-block-mac.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
Call Stack (most recent call first):
cmake/Dependencies.cmake:52 (include)
CMakeLists.txt:85 (include)

CMake Error at cmake/External/nnpack.cmake:64 (add_library):
Cannot find source file:

/Users/licas/tmp/caffe2/third_party/NNPACK_deps/pthreadpool/src/threadpool-pthreads.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
Call Stack (most recent call first):
cmake/Dependencies.cmake:52 (include)
CMakeLists.txt:85 (include)

CMake Error: Cannot determine link language for target "CAFFE2_PTHREADPOOL".
CMake Error: CMake can not determine linker language for target: CAFFE2_PTHREADPOOL
CMake Error: Cannot determine link language for target "CAFFE2_NNPACK".
CMake Error: CMake can not determine linker language for target: CAFFE2_NNPACK
WARNING: Target "libprotoc" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it. CMake does not define behavior for this case.
WARNING: Target "protoc" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it. CMake does not define behavior for this case.
-- Generating done
-- Build files have been written to: /Users/licas/tmp/caffe2/build_ios
Can you help me ? :(