Closed karlybirdkarly closed 6 years ago
The messages themselves indicate that you haven't installed these dependencies, and they'll be turned off by CMake. Although LMDB and LevelDB and some other dependencies are marked as "optional" officially, they're required in actual use. I recommend you use Anaconda instead of vanilla Python, and install LMDB and LevelDB by: conda install lmdb leveldb Also, don't turn BUILD_TEST on. They'll produce enormous errors. It could also be recommended that you turn BUILD_SHARED_LIBS off, but I haven't tested it, so I don't know if it is really necessary to disable it. I think by installing some "required" dependencies and turn certain options off, you'll at least be able to build Caffe2 lib under CPU context.
OK, this issue was solved by detecting ALL pythons installed on my mac, and deleting all of them except for a system python which is located at /usr/bin. Then I added export PYTHONPATH=/usr/local:$PYTHONPATH export PYTHONPATH=$PYTHONPATH:~/caffe2/build export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH to ~/bash.profile. Also I installed everything with brew and pip only. Didn't use anaconda at all.
I am having this log during the installation of caffe2, when I tried to run <cmake -DUSE_CUDA=OFF> command.
-- Setting CMAKE_FIND_NO_INSTALL_PREFIX -- Using protobuf compiler /usr/local/bin/protoc -- The BLAS backend of choice:Eigen -- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY PTHREADPOOL_LIBRARY) -- Will try to build NNPACK from source. If anything fails, follow the NNPACK prerequisite installation steps. CMake Warning at cmake/External/nnpack.cmake:155 (message): NNPACK is chosen to be installed, but confu and ninja that are needed by it are not installed. As a result we won't build with NNPACK. Call Stack (most recent call first): cmake/Dependencies.cmake:73 (include) CMakeLists.txt:74 (include),
CMake Warning at cmake/Dependencies.cmake:78 (message): Not compiling with NNPACK. Suppress this warning with -DUSE_NNPACK=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Found gflags (include: /usr/local/include, library: /usr/local/lib/libgflags.dylib) -- Found system gflags install. -- Found glog (include: /usr/local/include, library: /usr/local/lib/libglog.dylib) -- Found system glog install. -- Found PythonInterp: /Users/karlygashzhuginissova/anaconda3/bin/python (found version "3.5.2") -- Could NOT find Benchmark (missing: Benchmark_INCLUDE_DIR Benchmark_LIBRARY) -- git Version: v0.0.0-dirty -- Version: 0.0.0 -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile -- Performing Test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- success -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- success -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- success -- Could NOT find LMDB (missing: LMDB_INCLUDE_DIR LMDB_LIBRARIES) CMake Warning at cmake/Dependencies.cmake:131 (message): Not compiling with LMDB. Suppress this warning with -DUSE_LMDB=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Could NOT find LevelDB (missing: LevelDB_INCLUDE LevelDB_LIBRARY) -- Could NOT find Snappy (missing: Snappy_INCLUDE_DIR Snappy_LIBRARIES) CMake Warning at cmake/Dependencies.cmake:147 (message): Not compiling with LevelDB. Suppress this warning with -DUSE_LEVELDB=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Could NOT find RocksDB (missing: RocksDB_INCLUDE_DIR RocksDB_LIBRARIES) CMake Warning at cmake/Dependencies.cmake:159 (message): Not compiling with RocksDB. Suppress this warning with -DUSE_ROCKSDB=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
CMake Warning at cmake/Dependencies.cmake:202 (message): Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Found PythonInterp: /Users/karlygashzhuginissova/anaconda3/bin/python (found suitable version "3.5.2", minimum required is "2.7") -- NumPy ver. 1.11.1 found (include: /Users/karlygashzhuginissova/anaconda3/lib/python3.5/site-packages/numpy/core/include) -- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR) -- MPI support found -- MPI compile flags: -- MPI include path: /usr/local/include -- MPI LINK flags path: -- MPI libraries: /usr/local/lib/libmpi.dylib CMake Warning at cmake/Dependencies.cmake:273 (message): OpenMPI found, but it is not built with CUDA support. Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) (found version "1.0") -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) (found version "1.0") CMake Warning at cmake/Dependencies.cmake:292 (message): Not compiling with OpenMP. Suppress this warning with -DUSE_OPENMP=OFF Call Stack (most recent call first): CMakeLists.txt:74 (include)
CMake Warning at cmake/Dependencies.cmake:333 (message): If not using cuda, one should not use NCCL either. Call Stack (most recent call first): CMakeLists.txt:74 (include)
CMake Warning at cmake/Dependencies.cmake:358 (message): Gloo can only be used on Linux. Call Stack (most recent call first): CMakeLists.txt:74 (include)
CMake Warning at cmake/Dependencies.cmake:408 (message): mobile opengl is only used in android or ios builds. Call Stack (most recent call first): CMakeLists.txt:74 (include)
CMake Warning at cmake/Dependencies.cmake:428 (message): Metal is only used in ios builds. Call Stack (most recent call first): CMakeLists.txt:74 (include)
-- Need to define long as a separate typeid. -- Current compiler supports avx2 extention. Will build perfkernels. -- NCCL operators skipped due to no CUDA support -- CUDA RTC operators skipped due to no CUDA support -- Excluding image processing operators due to no opencv -- Excluding video processing operators due to no opencv -- Excluding mkl operators as we are not using mkl -- Automatically generating missing init.py files. -- -- **** Summary **** -- General: -- Git version : v0.8.1-497-g0ab17512-dirty -- System : Darwin -- C++ compiler : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- C++ compiler version : 8.1.0.8020042 -- Protobuf compiler : /usr/local/bin/protoc -- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing -- Build type : Release -- Compile definitions : -- -- BUILD_BINARY : ON -- BUILD_PYTHON : ON -- Python version : 2.7.10 -- Python library : /usr/lib/libpython2.7.dylib -- BUILD_SHARED_LIBS : ON -- BUILD_TEST : ON -- USE_ATEN : OFF -- USE_ASAN : OFF -- USE_CUDA : OFF -- USE_EIGEN_FOR_BLAS : 1 -- USE_FFMPEG : OFF -- USE_GFLAGS : ON -- USE_GLOG : ON -- USE_GLOO : OFF -- USE_LEVELDB : OFF -- USE_LITE_PROTO : OFF -- USE_LMDB : OFF -- USE_METAL : OFF -- USE_MKL : -- USE_MOBILE_OPENGL : OFF -- USE_MPI : ON -- USE_NCCL : OFF -- USE_NERVANA_GPU : OFF -- USE_NNPACK : OFF -- USE_OBSERVERS : OFF -- USE_OPENCV : OFF -- USE_OPENMP : OFF -- USE_REDIS : OFF -- USE_ROCKSDB : OFF -- USE_THREADS : ON -- USE_ZMQ : OFF -- Configuring done -- Generating done -- Build files have been written to: /Users//caffe2/build
Caffe2 testing returns Failure. Trying to get this for 2 days. Any help is appreciated.