Compile error).Whenever I run make -jnproc I get the following errors
fatal error: too many errors emitted, stopping now [-ferror-limit=]
45 warnings and 20 errors generated.
make[5]: *** [src/caffe/CMakeFiles/caffeproto.dir/__/__/include/caffe/proto/caffe.pb.cc.o] Error 1
make[4]: *** [src/caffe/CMakeFiles/caffeproto.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [caffe/src/openpose_caffe-stamp/openpose_caffe-build] Error 2
make[1]: *** [CMakeFiles/openpose_caffe.dir/all] Error 2
make: *** [all] Error 2
make -jnproc
fatal error: too many errors emitted, stopping now [-ferror-limit=]
45 warnings and 20 errors generated.
make[5]: *** [src/caffe/CMakeFiles/caffeproto.dir/__/__/include/caffe/proto/caffe.pb.cc.o] Error 1
make[4]: *** [src/caffe/CMakeFiles/caffeproto.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [caffe/src/openpose_caffe-stamp/openpose_caffe-build] Error 2
make[1]: *** [CMakeFiles/openpose_caffe.dir/all] Error 2
make: *** [all] Error 2
OpenPose version:
latest version from git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose
General configuration:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Non-default settings:
3rd-party software:
CMake version : cmake version 3.12.1
OpenCV version: compiled from source
If CPU-only mode issue:
If Python API:
Please paste the error to pastebin and then paste the link here.
Also, unfortunately nobody in our lab has the latest OSX so its quite impossible to test it
@soulslicer Point noted.
Here is the pastebin link of the full error log.
@SreehariRamMohan I'm using MacOS High Sierra as well. I assume you got the same issue with CMake and cloned caffe directly from GitHub by following this issue comment?
I got it to work by following this stackoverflow answer
Basically I just added set(CMAKE_CXX_STANDARD 11) to the following files:
openpose/build/caffe/src/openpose_caffe-build/CMakeFiles/3.12.1/CMakeCXXCompiler.cmake
openpose/build/CMakeFiles/3.12.1/CMakeCXXCompiler.cmake
and then ran
make -j`nproc`
This is a protobuf issue. Either there is some unknown bug of caffe with OSX 10.13, or you have Anaconda installed which has a incompatible version of protobuf. But it looks like its the latter
@soulslicer Yes you are correct I have installed Anaconda (which is why I think there is an incompatible version of protobuf). How can I solve this issue? Some ideas I have for solving the issue are to upgrade the version of protobuf in anaconda (but which version should I download), or to create a virtual environment (not entirely sure how to do this). What course of action would you recommend to allow me to download openpose successfully?
@carlovirtucio will this fix the issue with my incompatible protobuf version from Anaconda?
@SreehariRamMohan I’m not sure if it would. Have you tried the steps with your machine? (I can detail it out more if needed)
@carlovirtucio I did the steps that you suggested (using vim to add set(CMAKE_CXX_STANDARD 11) at the top of both files) however I still get the same error.
@SreehariRamMohan Hmm I guess it really is the protobuf issue with Anaconda. The possible reason why it worked for me is probably because I don't have conda installed in my device.
If the errors come from protobuf (3rd party library), it is unrelated to OpenPose, so this is no longer an OP issue.
How do you suggest I fix this issue @gineshidalgo99
@carlovirtucio What else can I try
Please take a look at the other issues. Unfortunately, installing anaconda installs a protobuf that is incompatible with Caffe. Either you uninstall anaconda and install protobuf via apt-get, or you compile your own caffe and link it to openpose
https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/677
Please see above
@soulslicer Thank you so much! I was able to use the advice from #677 to install openpose! I linked my old pre-installed Caffe to openpose!
Most helpful comment
@SreehariRamMohan I'm using MacOS High Sierra as well. I assume you got the same issue with CMake and cloned caffe directly from GitHub by following this issue comment?
I got it to work by following this stackoverflow answer
Basically I just added
set(CMAKE_CXX_STANDARD 11)to the following files:openpose/build/caffe/src/openpose_caffe-build/CMakeFiles/3.12.1/CMakeCXXCompiler.cmakeopenpose/build/CMakeFiles/3.12.1/CMakeCXXCompiler.cmakeand then ran