Closed hlzz closed 7 years ago
This is a known protobuf-nvcc compatibility issue for some protobuf versions - if your mac does not have a cuda gpu, it might be easier to simply turn off cuda by -DUSE_CUDA=OFF.
@Yangqing I do have a NVIDIA gpu. Do you know which specific protobuf version is affected? My configuration is the following:
Mac OS: 10.12.4 protobuf 3.2.0_1 clang: Apple LLVM version 8.0.0 (clang-800.0.42.1) nvcc: Cuda compilation tools, release 8.0, V8.0.61
@hlzz In the next protobuf release this is fixed, but for now I temporarily fixed it on my machine like this:
I open up my own version of this file in /usr/local/Cellar/protobuf/3.2.0_1/include/google/protobuf/stubs/atomicops.h and just manually commented out lines 198 through 205:
// Apple.
/*
#elif defined(GOOGLE_PROTOBUF_OS_APPLE)
#if __has_feature(cxx_atomic) || _GNUC_VER >= 407
#include <google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h>
#else // __has_feature(cxx_atomic) || _GNUC_VER >= 407
#include <google/protobuf/stubs/atomicops_internals_macosx.h>
#endif // __has_feature(cxx_atomic) || _GNUC_VER >= 407
*/
In the official version of protobuf used by tensorflow, you can see this bit is actually just removed, so it seems to be the right thing to do until protobuf v3.2.1 is released, where this is fixed using the same approach.
@jquave Thanks a lot! This temporarily fix the issue. Let's wait for the update of protobuf. I am closing this issue now.
I built the project on Mac 10.12 with xcode 8.2. The cmake info is the following:
However, I met this error:
Any idea why it is happening?