New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build caffe2 on Raspberry3 Failed! #299

Closed
ghost opened this Issue Apr 19, 2017 · 22 comments

Comments

Projects
None yet
@ghost

ghost commented Apr 19, 2017

I run the build_raspbian.sh in scripts,but it failed with the hint that

could not find NNPACK(missing NNPACK_INCLUDE_DIR NNPACK_LIBRARY)

and a lot of errors that

does not contain a CMakeLists.txt file

how do i solve it ?

@wangmingg

This comment has been minimized.

Show comment
Hide comment
@wangmingg

wangmingg Apr 19, 2017

I meet the same problem,and how can i solve it

wangmingg commented Apr 19, 2017

I meet the same problem,and how can i solve it

@Yangqing

This comment has been minimized.

Show comment
Hide comment
@Yangqing

Yangqing Apr 19, 2017

Member

Could you paste the full cmake output? If you do not need NNPACK, you can probably turn it off with -DUSE_NNPACK=OFF and things should compile properly.

Member

Yangqing commented Apr 19, 2017

Could you paste the full cmake output? If you do not need NNPACK, you can probably turn it off with -DUSE_NNPACK=OFF and things should compile properly.

@wangmingg

This comment has been minimized.

Show comment
Hide comment
@wangmingg

wangmingg Apr 20, 2017

I try to run that with -DUSE_NNPACK=OFF,but no use.I will put the output later.

wangmingg commented Apr 20, 2017

I try to run that with -DUSE_NNPACK=OFF,but no use.I will put the output later.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 20, 2017

here is all the output:
and the uploaded zip file is cmakeoutput.log and cmakeerror.log

cmakelog.zip

Caffe2 codebase root is: /home/pi/caffe2-master
Build Caffe2 raspbian into: /home/pi/caffe2-master/build
Installing dependencies.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgflags-dev is already the newest version.
libgoogle-glog-dev is already the newest version.
libprotobuf-dev is already the newest version.
libpython-dev is already the newest version.
protobuf-compiler is already the newest version.
python-protobuf is already the newest version.
cmake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already satisfied (use --upgrade to upgrade): hypothesis in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python2.7/dist-packages (from hypothesis)
Cleaning up...
Building caffe2
fatal: Not a git repository (or any of the parent directories): .git
-- The BLAS backend of choice:Eigen
-- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY)
-- Will try to build NNPACK from source. If anything fails, follow the NNPACK prerequisite installation steps.
CMake Warning at cmake/External/nnpack.cmake:157 (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:52 (include)
CMakeLists.txt:85 (include)

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

-- Found gflags (include: /usr/include, library: /usr/lib/arm-linux-gnueabihf/libgflags.so)
-- Found system gflags install.
-- Found glog (include: /usr/include, library: /usr/lib/arm-linux-gnueabihf/libglog.so)
-- Found system glog install.
CMake Error at cmake/Dependencies.cmake:90 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/googletest

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Error at cmake/Dependencies.cmake:92 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/benchmark

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Could NOT find LMDB (missing: LMDB_INCLUDE_DIR LMDB_LIBRARIES)
CMake Warning at cmake/Dependencies.cmake:103 (message):
Not compiling with LMDB. Suppress this warning with -DUSE_LMDB=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (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:119 (message):
Not compiling with LevelDB. Suppress this warning with -DUSE_LEVELDB=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)

-- NumPy ver. 1.8.2 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include)
-- Could NOT find MPI_C (missing: MPI_C_LIBRARIES MPI_C_INCLUDE_PATH)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)
CMake Warning at cmake/Dependencies.cmake:226 (message):
Not compiling with MPI. Suppress this warning with -DUSE_MPI=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Adding -fopenmp
CMake Warning at cmake/Dependencies.cmake:262 (message):
Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

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

CMake Error at cmake/Dependencies.cmake:314 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/gloo

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Need to define long as a separate typeid.
-- This compiler does not have builtin_cpu_supports feature.
-- Turning off deprecation warning due to glog.
-- GCC 4.9.2: Adding gcc and gcc_s libs to link line
-- NCCL operators built due to no CUDA support
-- 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
-- Automatically generating missing init.py files.

-- ******** Summary ********
-- General:
-- Git version : unknown
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Protobuf compiler : /usr/bin/protoc
-- CXX flags : -fopenmp -Wno-deprecated -std=c++11 -fPIC -Wno-narrowing -mfpu=neon -mfloat-abi=hard
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;CAFFE2_USE_GFLAGS;EIGEN_MPL2_ONLY;CAFFE2_UNIQUE_LONG_TYPEMETA;CAFFE2_NO_BUILTIN_CPU_SUPPORTS

-- BUILD_SHARED_LIBS : ON
-- BUILD_PYTHON : ON
-- Python version : 2.7.9
-- Python library : /usr/lib/arm-linux-gnueabihf/libpython2.7.so
-- USE_CUDA : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : ON
-- USE_GFLAGS : ON
-- USE_LMDB : OFF
-- USE_LEVELDB : OFF
-- USE_OPENCV : OFF
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : OFF
-- USE_NNPACK : OFF
-- USE_OPENMP : ON
-- USE_REDIS : OFF
-- USE_GLOO : ON
-- Configuring incomplete, errors occurred!
See also "/home/pi/caffe2-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/caffe2-master/build/CMakeFiles/CMakeError.log".

ghost commented Apr 20, 2017

here is all the output:
and the uploaded zip file is cmakeoutput.log and cmakeerror.log

cmakelog.zip

Caffe2 codebase root is: /home/pi/caffe2-master
Build Caffe2 raspbian into: /home/pi/caffe2-master/build
Installing dependencies.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgflags-dev is already the newest version.
libgoogle-glog-dev is already the newest version.
libprotobuf-dev is already the newest version.
libpython-dev is already the newest version.
protobuf-compiler is already the newest version.
python-protobuf is already the newest version.
cmake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already satisfied (use --upgrade to upgrade): hypothesis in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): enum34 in /usr/local/lib/python2.7/dist-packages (from hypothesis)
Cleaning up...
Building caffe2
fatal: Not a git repository (or any of the parent directories): .git
-- The BLAS backend of choice:Eigen
-- Could NOT find NNPACK (missing: NNPACK_INCLUDE_DIR NNPACK_LIBRARY)
-- Will try to build NNPACK from source. If anything fails, follow the NNPACK prerequisite installation steps.
CMake Warning at cmake/External/nnpack.cmake:157 (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:52 (include)
CMakeLists.txt:85 (include)

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

-- Found gflags (include: /usr/include, library: /usr/lib/arm-linux-gnueabihf/libgflags.so)
-- Found system gflags install.
-- Found glog (include: /usr/include, library: /usr/lib/arm-linux-gnueabihf/libglog.so)
-- Found system glog install.
CMake Error at cmake/Dependencies.cmake:90 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/googletest

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

CMake Error at cmake/Dependencies.cmake:92 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/benchmark

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Could NOT find LMDB (missing: LMDB_INCLUDE_DIR LMDB_LIBRARIES)
CMake Warning at cmake/Dependencies.cmake:103 (message):
Not compiling with LMDB. Suppress this warning with -DUSE_LMDB=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (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:119 (message):
Not compiling with LevelDB. Suppress this warning with -DUSE_LEVELDB=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)

-- NumPy ver. 1.8.2 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include)
-- Could NOT find MPI_C (missing: MPI_C_LIBRARIES MPI_C_INCLUDE_PATH)
-- Could NOT find MPI_CXX (missing: MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH)
CMake Warning at cmake/Dependencies.cmake:226 (message):
Not compiling with MPI. Suppress this warning with -DUSE_MPI=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Adding -fopenmp
CMake Warning at cmake/Dependencies.cmake:262 (message):
Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

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

CMake Error at cmake/Dependencies.cmake:314 (add_subdirectory):
The source directory

/home/pi/caffe2-master/third_party/gloo

does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
CMakeLists.txt:85 (include)

-- Need to define long as a separate typeid.
-- This compiler does not have builtin_cpu_supports feature.
-- Turning off deprecation warning due to glog.
-- GCC 4.9.2: Adding gcc and gcc_s libs to link line
-- NCCL operators built due to no CUDA support
-- 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
-- Automatically generating missing init.py files.

-- ******** Summary ********
-- General:
-- Git version : unknown
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Protobuf compiler : /usr/bin/protoc
-- CXX flags : -fopenmp -Wno-deprecated -std=c++11 -fPIC -Wno-narrowing -mfpu=neon -mfloat-abi=hard
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;CAFFE2_USE_GFLAGS;EIGEN_MPL2_ONLY;CAFFE2_UNIQUE_LONG_TYPEMETA;CAFFE2_NO_BUILTIN_CPU_SUPPORTS

-- BUILD_SHARED_LIBS : ON
-- BUILD_PYTHON : ON
-- Python version : 2.7.9
-- Python library : /usr/lib/arm-linux-gnueabihf/libpython2.7.so
-- USE_CUDA : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : ON
-- USE_GFLAGS : ON
-- USE_LMDB : OFF
-- USE_LEVELDB : OFF
-- USE_OPENCV : OFF
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : OFF
-- USE_NNPACK : OFF
-- USE_OPENMP : ON
-- USE_REDIS : OFF
-- USE_GLOO : ON
-- Configuring incomplete, errors occurred!
See also "/home/pi/caffe2-master/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/caffe2-master/build/CMakeFiles/CMakeError.log".

@wangmingg

This comment has been minimized.

Show comment
Hide comment
@wangmingg

wangmingg commented Apr 20, 2017

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 20, 2017

God! I find the problem! you have to use git clone to download the caffe2 instead of downloading it from web browser!

ghost commented Apr 20, 2017

God! I find the problem! you have to use git clone to download the caffe2 instead of downloading it from web browser!

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 20, 2017

A new problem:

/home/pi/caffe2/caffe2/third_party/gloo/gloo/mpi/context.cc:63:51: error: no matching function for call to 'max(long unsigned int&, std::vector<char>::size_type)'
    maxLength = std::max(maxLength, address.size());

ghost commented Apr 20, 2017

A new problem:

/home/pi/caffe2/caffe2/third_party/gloo/gloo/mpi/context.cc:63:51: error: no matching function for call to 'max(long unsigned int&, std::vector<char>::size_type)'
    maxLength = std::max(maxLength, address.size());

@cbalint13

This comment has been minimized.

Show comment
Hide comment
@cbalint13

cbalint13 Apr 20, 2017

Contributor
  • Disable GLOO (i doubt on raspi can be usefull): cmake .. -DUSE_GLOO=OFF
  • Or add #include <algorithm> to your local copy of /home/pi/caffe2/caffe2/third_party/gloo/gloo/mpi/context.cc
Contributor

cbalint13 commented Apr 20, 2017

  • Disable GLOO (i doubt on raspi can be usefull): cmake .. -DUSE_GLOO=OFF
  • Or add #include <algorithm> to your local copy of /home/pi/caffe2/caffe2/third_party/gloo/gloo/mpi/context.cc
@raymondlmy

This comment has been minimized.

Show comment
Hide comment
@raymondlmy

raymondlmy Apr 20, 2017

updated with attached log files:
Archive.zip

I couldn't finish the build also:
I grep caffe2 by git clone --recursive https://github.com/caffe2/caffe2.git
but then I can't find gloo in my error log:
CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_1c7ad/fast"
/usr/bin/make -f CMakeFiles/cmTC_1c7ad.dir/build.make CMakeFiles/cmTC_1c7ad.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_1c7ad
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1c7ad.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o -o cmTC_1c7ad -rdynamic
CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x38): undefined reference topthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_1c7ad.dir/build.make:97: recipe for target 'cmTC_1c7ad' failed
make[1]: *** [cmTC_1c7ad] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_1c7ad/fast' failed
make: *** [cmTC_1c7ad/fast] Error 2

File /home/pi/caffe2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_1563f/fast"
/usr/bin/make -f CMakeFiles/cmTC_1563f.dir/build.make CMakeFiles/cmTC_1563f.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.6/Modules/CheckFunctionExists.c
Linking C executable cmTC_1563f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1563f.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o -o cmTC_1563f -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_1563f.dir/build.make:97: recipe for target 'cmTC_1563f' failed
make[1]: *** [cmTC_1563f] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_1563f/fast' failed
make: *** [cmTC_1563f/fast] Error 2

Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_76c41/fast"
/usr/bin/make -f CMakeFiles/cmTC_76c41.dir/build.make CMakeFiles/cmTC_76c41.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_76c41.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -DHAVE_CXX_FLAG_WSHORTEN_64_TO_32 -Wshorten-64-to-32 -Wshorten-64-to-32 -o CMakeFiles/cmTC_76c41.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-Wshorten-64-to-32'
c++: error: unrecognized command line option '-Wshorten-64-to-32'
CMakeFiles/cmTC_76c41.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_76c41.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_76c41.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_76c41/fast' failed
make: *** [cmTC_76c41/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WTHREAD_SAFETY failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e87fb/fast"
/usr/bin/make -f CMakeFiles/cmTC_e87fb.dir/build.make CMakeFiles/cmTC_e87fb.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_e87fb.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wfloat-equal -fstrict-aliasing -Wzero-as-null-pointer-constant -Wstrict-aliasing -DHAVE_CXX_FLAG_WTHREAD_SAFETY -Wthread-safety -Wthread-safety -o CMakeFiles/cmTC_e87fb.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-Wthread-safety'
c++: error: unrecognized command line option '-Wthread-safety'
CMakeFiles/cmTC_e87fb.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_e87fb.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_e87fb.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_e87fb/fast' failed
make: *** [cmTC_e87fb/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CAFFE2_LONG_IS_INT32_OR_64 failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0ebc4/fast"
/usr/bin/make -f CMakeFiles/cmTC_0ebc4.dir/build.make CMakeFiles/cmTC_0ebc4.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0ebc4.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DCAFFE2_LONG_IS_INT32_OR_64 -std=c++11 -o CMakeFiles/cmTC_0ebc4.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_0ebc4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ebc4.dir/link.txt --verbose=1
/usr/bin/c++ -fopenmp -DCAFFE2_LONG_IS_INT32_OR_64 -std=c++11 CMakeFiles/cmTC_0ebc4.dir/src.cxx.o -o cmTC_0ebc4 -rdynamic
CMakeFiles/cmTC_0ebc4.dir/src.cxx.o: In function main': src.cxx:(.text+0x3c): undefined reference tovoid Foo()'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_0ebc4.dir/build.make:97: recipe for target 'cmTC_0ebc4' failed
make[1]: *** [cmTC_0ebc4] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_0ebc4/fast' failed
make: *** [cmTC_0ebc4/fast] Error 2

Source file was:
#include

template <typename T> void Foo();
template<> void Foo<int32_t>() {}
template<> void Foo<int64_t>() {}
int main(int argc, char** argv) {
  Foo<long>();
  return 0;
}

Performing C++ SOURCE FILE Test HAS_BUILTIN_CPU_SUPPORTS failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0598f/fast"
/usr/bin/make -f CMakeFiles/cmTC_0598f.dir/build.make CMakeFiles/cmTC_0598f.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0598f.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DHAS_BUILTIN_CPU_SUPPORTS -std=c++11 -o CMakeFiles/cmTC_0598f.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
/home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main(int, char**)’:
/home/pi/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_0598f.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_0598f.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_0598f.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_0598f/fast' failed
make: *** [cmTC_0598f/fast] Error 2

Source file was:
#include

int main(int argc, char** argv) {
  std::cout << __builtin_cpu_supports("avx2") << std::endl;
  return 0;
}

Performing C++ SOURCE FILE Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0d181/fast"
/usr/bin/make -f CMakeFiles/cmTC_0d181.dir/build.make CMakeFiles/cmTC_0d181.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0d181.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DCAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING -std=c++11 -o CMakeFiles/cmTC_0d181.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
In file included from /usr/include/c++/4.9/ext/hash_set:60:0,
from /usr/include/glog/stl_logging.h:54,
from /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx:1:
/usr/include/c++/4.9/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
#warning
^
Linking CXX executable cmTC_0d181
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d181.dir/link.txt --verbose=1
/usr/bin/c++ -fopenmp -DCAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING -std=c++11 CMakeFiles/cmTC_0d181.dir/src.cxx.o -o cmTC_0d181 -rdynamic
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'

Source file was:
#include <glog/stl_logging.h>
int main(int argc, char** argv) {
return 0;
}

raymondlmy commented Apr 20, 2017

updated with attached log files:
Archive.zip

I couldn't finish the build also:
I grep caffe2 by git clone --recursive https://github.com/caffe2/caffe2.git
but then I can't find gloo in my error log:
CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_1c7ad/fast"
/usr/bin/make -f CMakeFiles/cmTC_1c7ad.dir/build.make CMakeFiles/cmTC_1c7ad.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_1c7ad
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1c7ad.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o -o cmTC_1c7ad -rdynamic
CMakeFiles/cmTC_1c7ad.dir/CheckSymbolExists.c.o: In function main': CheckSymbolExists.c:(.text+0x38): undefined reference topthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_1c7ad.dir/build.make:97: recipe for target 'cmTC_1c7ad' failed
make[1]: *** [cmTC_1c7ad] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_1c7ad/fast' failed
make: *** [cmTC_1c7ad/fast] Error 2

File /home/pi/caffe2/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_1563f/fast"
/usr/bin/make -f CMakeFiles/cmTC_1563f.dir/build.make CMakeFiles/cmTC_1563f.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.6/Modules/CheckFunctionExists.c
Linking C executable cmTC_1563f
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_1563f.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_1563f.dir/CheckFunctionExists.c.o -o cmTC_1563f -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_1563f.dir/build.make:97: recipe for target 'cmTC_1563f' failed
make[1]: *** [cmTC_1563f] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_1563f/fast' failed
make: *** [cmTC_1563f/fast] Error 2

Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_76c41/fast"
/usr/bin/make -f CMakeFiles/cmTC_76c41.dir/build.make CMakeFiles/cmTC_76c41.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_76c41.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -DHAVE_CXX_FLAG_WSHORTEN_64_TO_32 -Wshorten-64-to-32 -Wshorten-64-to-32 -o CMakeFiles/cmTC_76c41.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-Wshorten-64-to-32'
c++: error: unrecognized command line option '-Wshorten-64-to-32'
CMakeFiles/cmTC_76c41.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_76c41.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_76c41.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_76c41/fast' failed
make: *** [cmTC_76c41/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WTHREAD_SAFETY failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_e87fb/fast"
/usr/bin/make -f CMakeFiles/cmTC_e87fb.dir/build.make CMakeFiles/cmTC_e87fb.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_e87fb.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wfloat-equal -fstrict-aliasing -Wzero-as-null-pointer-constant -Wstrict-aliasing -DHAVE_CXX_FLAG_WTHREAD_SAFETY -Wthread-safety -Wthread-safety -o CMakeFiles/cmTC_e87fb.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option '-Wthread-safety'
c++: error: unrecognized command line option '-Wthread-safety'
CMakeFiles/cmTC_e87fb.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_e87fb.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_e87fb.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_e87fb/fast' failed
make: *** [cmTC_e87fb/fast] Error 2

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test CAFFE2_LONG_IS_INT32_OR_64 failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0ebc4/fast"
/usr/bin/make -f CMakeFiles/cmTC_0ebc4.dir/build.make CMakeFiles/cmTC_0ebc4.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0ebc4.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DCAFFE2_LONG_IS_INT32_OR_64 -std=c++11 -o CMakeFiles/cmTC_0ebc4.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_0ebc4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0ebc4.dir/link.txt --verbose=1
/usr/bin/c++ -fopenmp -DCAFFE2_LONG_IS_INT32_OR_64 -std=c++11 CMakeFiles/cmTC_0ebc4.dir/src.cxx.o -o cmTC_0ebc4 -rdynamic
CMakeFiles/cmTC_0ebc4.dir/src.cxx.o: In function main': src.cxx:(.text+0x3c): undefined reference tovoid Foo()'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_0ebc4.dir/build.make:97: recipe for target 'cmTC_0ebc4' failed
make[1]: *** [cmTC_0ebc4] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_0ebc4/fast' failed
make: *** [cmTC_0ebc4/fast] Error 2

Source file was:
#include

template <typename T> void Foo();
template<> void Foo<int32_t>() {}
template<> void Foo<int64_t>() {}
int main(int argc, char** argv) {
  Foo<long>();
  return 0;
}

Performing C++ SOURCE FILE Test HAS_BUILTIN_CPU_SUPPORTS failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0598f/fast"
/usr/bin/make -f CMakeFiles/cmTC_0598f.dir/build.make CMakeFiles/cmTC_0598f.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0598f.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DHAS_BUILTIN_CPU_SUPPORTS -std=c++11 -o CMakeFiles/cmTC_0598f.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
/home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx: In function ‘int main(int, char**)’:
/home/pi/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_0598f.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_0598f.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_0598f.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_0598f/fast' failed
make: *** [cmTC_0598f/fast] Error 2

Source file was:
#include

int main(int argc, char** argv) {
  std::cout << __builtin_cpu_supports("avx2") << std::endl;
  return 0;
}

Performing C++ SOURCE FILE Test CAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING failed with the following output:
Change Dir: /home/pi/caffe2/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_0d181/fast"
/usr/bin/make -f CMakeFiles/cmTC_0d181.dir/build.make CMakeFiles/cmTC_0d181.dir/build
make[1]: Entering directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_0d181.dir/src.cxx.o
/usr/bin/c++ -fopenmp -DCAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING -std=c++11 -o CMakeFiles/cmTC_0d181.dir/src.cxx.o -c /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx
In file included from /usr/include/c++/4.9/ext/hash_set:60:0,
from /usr/include/glog/stl_logging.h:54,
from /home/pi/caffe2/build/CMakeFiles/CMakeTmp/src.cxx:1:
/usr/include/c++/4.9/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
#warning
^
Linking CXX executable cmTC_0d181
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0d181.dir/link.txt --verbose=1
/usr/bin/c++ -fopenmp -DCAFFE2_NEED_TO_TURN_OFF_DEPRECATION_WARNING -std=c++11 CMakeFiles/cmTC_0d181.dir/src.cxx.o -o cmTC_0d181 -rdynamic
make[1]: Leaving directory '/home/pi/caffe2/build/CMakeFiles/CMakeTmp'

Source file was:
#include <glog/stl_logging.h>
int main(int argc, char** argv) {
return 0;
}

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Apr 20, 2017

I have built successfully... you have to modify your build_raspbin.sh file find cmake and add -DUSE_GLOO=OFF just like @cbalint13 mentioned. and then i can build successfully.

ghost commented Apr 20, 2017

I have built successfully... you have to modify your build_raspbin.sh file find cmake and add -DUSE_GLOO=OFF just like @cbalint13 mentioned. and then i can build successfully.

@Scliang

This comment has been minimized.

Show comment
Hide comment
@Scliang

Scliang Apr 21, 2017

Makefile add
rpi:
@./scripts/build_raspbian.sh

Scliang commented Apr 21, 2017

Makefile add
rpi:
@./scripts/build_raspbian.sh

@huzi96

This comment has been minimized.

Show comment
Hide comment
@huzi96

huzi96 Apr 21, 2017

No help adding #include <algorithm>

huzi96 commented Apr 21, 2017

No help adding #include <algorithm>

@hehengxiang0

This comment has been minimized.

Show comment
Hide comment
@hehengxiang0

hehengxiang0 May 3, 2017

a new problem!

/home/pi/share/caffe2/caffe2/queue/rebatching_queue.cc:66:76: error: ‘split’ function uses ‘auto’ type specifier without trailing return type
auto split(CPUContext& context, const std::vector<const TensorCPU*>& inputs) {
^
/home/pi/share/caffe2/caffe2/queue/rebatching_queue.cc:66:76: note: deduced return type only available with -std=c++1y or -std=gnu++1y

hehengxiang0 commented May 3, 2017

a new problem!

/home/pi/share/caffe2/caffe2/queue/rebatching_queue.cc:66:76: error: ‘split’ function uses ‘auto’ type specifier without trailing return type
auto split(CPUContext& context, const std::vector<const TensorCPU*>& inputs) {
^
/home/pi/share/caffe2/caffe2/queue/rebatching_queue.cc:66:76: note: deduced return type only available with -std=c++1y or -std=gnu++1y

@pietern

This comment has been minimized.

Show comment
Hide comment
@pietern

pietern May 4, 2017

Contributor

@hehengxiang0 This problem is fixed on master (see ba4c997)

Contributor

pietern commented May 4, 2017

@hehengxiang0 This problem is fixed on master (see ba4c997)

@pietern

This comment has been minimized.

Show comment
Hide comment
@pietern

pietern May 4, 2017

Contributor

@AngularLock Thanks for helping out here. Updated CMake skip Gloo on 32 bit systems (see 5b5ba3e).

That resolves this particular build issue.

If there is another issue building on Raspberry Pi then please open a new issue.

Contributor

pietern commented May 4, 2017

@AngularLock Thanks for helping out here. Updated CMake skip Gloo on 32 bit systems (see 5b5ba3e).

That resolves this particular build issue.

If there is another issue building on Raspberry Pi then please open a new issue.

@pietern pietern closed this May 4, 2017

@Avi-avidan

This comment has been minimized.

Show comment
Hide comment
@Avi-avidan

Avi-avidan Aug 10, 2017

Hi,
I am trying to set up caffe2 on my mac. getting tons of cmakelists.txt missing warning and a bunch of other error messages. PLEASE ADVISE.

Many thanks in advance,
Avi

-- The BLAS backend of choice:Eigen
-- 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/avidan/anaconda3/envs/py2/bin/python (found version "2.7.13")
-- Could NOT find Benchmark (missing: Benchmark_INCLUDE_DIR Benchmark_LIBRARY)
-- git Version: v0.0.0
-- 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
-- Found lmdb (include: /usr/local/include, library: /usr/local/lib/liblmdb.dylib)
-- Found LevelDB (include: /usr/local/include, library: /usr/local/lib/libleveldb.dylib)
-- Found Snappy (include: /usr/local/include, library: /usr/local/lib/libsnappy.dylib)
-- OpenCV found (/usr/local/share/OpenCV)
-- Found PythonInterp: /Users/avidan/anaconda3/envs/py2/bin/python (found suitable version "2.7.13", minimum required is "2.7")
-- NumPy ver. 1.13.1 found (include: /Users/avidan/anaconda3/envs/py2/lib/python2.7/site-packages/numpy/core/include)
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)
CMake Warning at cmake/Dependencies.cmake:313 (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:351 (message):
Gloo can only be used on Linux.
Call Stack (most recent call first):
CMakeLists.txt:74 (include)

CMake Warning at cmake/Dependencies.cmake:391 (message):
mobile opengl is only used in android or 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
CMake Error at caffe2/contrib/CMakeLists.txt:6 (add_subdirectory):
The source directory

/Users/avidan/caffe2/caffe2/contrib/opengl

does not contain a CMakeLists.txt file.

-- CUDA RTC operators skipped due to no CUDA support
-- Including image processing operators
-- Excluding video processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- MPI operators skipped due to no MPI support
-- Automatically generating missing init.py files.

-- ******** Summary ********
-- General:
-- Git version :
-- System : Darwin
-- C++ compiler : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- C++ compiler version : 8.1.0.8020042
-- Protobuf compiler : /Users/avidan/anaconda3/envs/py2/bin/protoc
-- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;CAFFE2_USE_GFLAGS;EIGEN_MPL2_ONLY;CAFFE2_UNIQUE_LONG_TYPEMETA;CAFFE2_PERF_WITH_AVX;CAFFE2_PERF_WITH_AVX2

-- BUILD_SHARED_LIBS : ON
-- BUILD_PYTHON : ON
-- Python version : 2.7.13
-- Python library : /Users/avidan/anaconda3/envs/py2/lib/libpython2.7.dylib
-- BUILD_TEST : ON
-- USE_CUDA : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : ON
-- USE_GFLAGS : ON
-- USE_LMDB : ON
-- LMDB version : 0.9.21
-- USE_LEVELDB : ON
-- LevelDB version : 1.20
-- Snappy version : ..
-- USE_OPENCV : ON
-- OpenCV version : 2.4.13.2
-- USE_FFMPEG :
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : OFF
-- USE_NNPACK : OFF
-- USE_OPENMP : OFF
-- USE_REDIS : OFF
-- USE_GLOO : OFF
-- Configuring incomplete, errors occurred!

Avi-avidan commented Aug 10, 2017

Hi,
I am trying to set up caffe2 on my mac. getting tons of cmakelists.txt missing warning and a bunch of other error messages. PLEASE ADVISE.

Many thanks in advance,
Avi

-- The BLAS backend of choice:Eigen
-- 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/avidan/anaconda3/envs/py2/bin/python (found version "2.7.13")
-- Could NOT find Benchmark (missing: Benchmark_INCLUDE_DIR Benchmark_LIBRARY)
-- git Version: v0.0.0
-- 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
-- Found lmdb (include: /usr/local/include, library: /usr/local/lib/liblmdb.dylib)
-- Found LevelDB (include: /usr/local/include, library: /usr/local/lib/libleveldb.dylib)
-- Found Snappy (include: /usr/local/include, library: /usr/local/lib/libsnappy.dylib)
-- OpenCV found (/usr/local/share/OpenCV)
-- Found PythonInterp: /Users/avidan/anaconda3/envs/py2/bin/python (found suitable version "2.7.13", minimum required is "2.7")
-- NumPy ver. 1.13.1 found (include: /Users/avidan/anaconda3/envs/py2/lib/python2.7/site-packages/numpy/core/include)
-- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)
CMake Warning at cmake/Dependencies.cmake:313 (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:351 (message):
Gloo can only be used on Linux.
Call Stack (most recent call first):
CMakeLists.txt:74 (include)

CMake Warning at cmake/Dependencies.cmake:391 (message):
mobile opengl is only used in android or 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
CMake Error at caffe2/contrib/CMakeLists.txt:6 (add_subdirectory):
The source directory

/Users/avidan/caffe2/caffe2/contrib/opengl

does not contain a CMakeLists.txt file.

-- CUDA RTC operators skipped due to no CUDA support
-- Including image processing operators
-- Excluding video processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- MPI operators skipped due to no MPI support
-- Automatically generating missing init.py files.

-- ******** Summary ********
-- General:
-- Git version :
-- System : Darwin
-- C++ compiler : /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- C++ compiler version : 8.1.0.8020042
-- Protobuf compiler : /Users/avidan/anaconda3/envs/py2/bin/protoc
-- CXX flags : -std=c++11 -O2 -fPIC -Wno-narrowing
-- Build type : Release
-- Compile definitions : CAFFE2_USE_EIGEN_FOR_BLAS;CAFFE2_USE_GOOGLE_GLOG;CAFFE2_USE_GFLAGS;EIGEN_MPL2_ONLY;CAFFE2_UNIQUE_LONG_TYPEMETA;CAFFE2_PERF_WITH_AVX;CAFFE2_PERF_WITH_AVX2

-- BUILD_SHARED_LIBS : ON
-- BUILD_PYTHON : ON
-- Python version : 2.7.13
-- Python library : /Users/avidan/anaconda3/envs/py2/lib/libpython2.7.dylib
-- BUILD_TEST : ON
-- USE_CUDA : OFF
-- USE_NERVANA_GPU : OFF
-- USE_GLOG : ON
-- USE_GFLAGS : ON
-- USE_LMDB : ON
-- LMDB version : 0.9.21
-- USE_LEVELDB : ON
-- LevelDB version : 1.20
-- Snappy version : ..
-- USE_OPENCV : ON
-- OpenCV version : 2.4.13.2
-- USE_FFMPEG :
-- USE_ZMQ : OFF
-- USE_ROCKSDB : OFF
-- USE_MPI : OFF
-- USE_NCCL : OFF
-- USE_NNPACK : OFF
-- USE_OPENMP : OFF
-- USE_REDIS : OFF
-- USE_GLOO : OFF
-- Configuring incomplete, errors occurred!

@Avi-avidan

This comment has been minimized.

Show comment
Hide comment
@Avi-avidan

Avi-avidan Aug 10, 2017

added export=~PYTHONPATH to virtualenvpath/bin/activate file
restarted virtualenv (deactivate then activate)
and it complied!!

Avi-avidan commented Aug 10, 2017

added export=~PYTHONPATH to virtualenvpath/bin/activate file
restarted virtualenv (deactivate then activate)
and it complied!!

@Avi-avidan

This comment has been minimized.

Show comment
Hide comment
@Avi-avidan

Avi-avidan Aug 10, 2017

I have now another issue. When running -
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
It succeeds in the build directory but fail outside of it.

No change after using -

sudo install_name_tool -change libpython2.7.dylib ~/anaconda/lib/libpython2.7.dylib /usr/local/caffe2/python/caffe2_pybind11_state.so

Thanks in advance.

Avi-avidan commented Aug 10, 2017

I have now another issue. When running -
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
It succeeds in the build directory but fail outside of it.

No change after using -

sudo install_name_tool -change libpython2.7.dylib ~/anaconda/lib/libpython2.7.dylib /usr/local/caffe2/python/caffe2_pybind11_state.so

Thanks in advance.

@zimenglan-sysu-512

This comment has been minimized.

Show comment
Hide comment
@zimenglan-sysu-512

zimenglan-sysu-512 Feb 1, 2018

hi @AngularLock,
have u solved the problem "fatal: Not a git repository: caffe2/.git/modules/third_party/NNPACK"?
thanks.

zimenglan-sysu-512 commented Feb 1, 2018

hi @AngularLock,
have u solved the problem "fatal: Not a git repository: caffe2/.git/modules/third_party/NNPACK"?
thanks.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Feb 1, 2018

@zimenglan-sysu-512
hi!
that time,i found that u have to use a git command to download the whole framework. and i use the download button on the website that cause the problem

ghost commented Feb 1, 2018

@zimenglan-sysu-512
hi!
that time,i found that u have to use a git command to download the whole framework. and i use the download button on the website that cause the problem

@zimenglan-sysu-512

This comment has been minimized.

Show comment
Hide comment
@zimenglan-sysu-512

zimenglan-sysu-512 Feb 2, 2018

hi @AngularLock,
yes i use git clone to download, and can install caffe2. but after installation, it encounters this problem.

zimenglan-sysu-512 commented Feb 2, 2018

hi @AngularLock,
yes i use git clone to download, and can install caffe2. but after installation, it encounters this problem.

@orionr

This comment has been minimized.

Show comment
Hide comment
@orionr

orionr Feb 3, 2018

Contributor

Hi all - correct. You need to use git clone --recursive https://github.com/caffe2/caffe2.git. The --recursive is to make sure all of the third_party libraries are downloaded as well.

Contributor

orionr commented Feb 3, 2018

Hi all - correct. You need to use git clone --recursive https://github.com/caffe2/caffe2.git. The --recursive is to make sure all of the third_party libraries are downloaded as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment