Caffe Not installing on mac OS

1,018 views
Skip to first unread message

Anagh Rao

unread,
Jan 25, 2019, 1:58:24 PM1/25/19
to Caffe Users
I am not able to install caffe on my macbook pro I do not have an external GPU and followed the instructions acc to this link : https://gist.github.com/doctorpangloss/f8463bddce2a91b949639522ea1dcbe4

And when I am trying to run the command $ make

I am getting about 20 errors and I dont know what to do. 

fatal error: too many errors emitted, stopping now [-ferror-limit=]

46 warnings and 20 errors generated.

make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1


Pls suggest what to do. 

Ravi

unread,
Jan 26, 2019, 3:26:00 AM1/26/19
to Caffe Users
Dear Anagh,

Please try following things to debug the problem:
  1. Make sure you have protobuf compiler installed
  2. Make sure the config file, i.e., Makefile.config is correct 
PS: Please show us complete errors reported at the console. You may copy the whole console, after invoking make.

-
Regards
Ravi

Pratibha Gupta

unread,
Jan 28, 2020, 2:16:51 PM1/28/20
to Caffe Users
I'm also running into issues with installing Caffe on my Macbook Pro (Catalina v10.15.1).

I tried building from source, and encountered a number of errors in the protobuf compilation, most of them related to C++11 extensions.
(I have the later versions of clang++ v11, and g++, so I'm puzzled by these warnings...)

Makefile.config, is set to CPU-only mode, and the remaining configs are default.

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
/bin/sh: line 0: [: -gt: unary operator expected
/bin/sh: line 0: [: -gt: unary operator expected
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:
In file included from .build_release/src/caffe/proto/caffe.pb.h:23:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:141:
In file included from /usr/local/include/google/protobuf/stubs/common.h:46:
/usr/local/include/google/protobuf/stubs/port.h:114:2: error: "Protobuf requires at least C++11."
#error "Protobuf requires at least C++11."
^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:
In file included from .build_release/src/caffe/proto/caffe.pb.h:23:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:141:
/usr/local/include/google/protobuf/stubs/common.h:167:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto volatile unused = &var;
^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:
In file included from .build_release/src/caffe/proto/caffe.pb.h:23:
/usr/local/include/google/protobuf/io/coded_stream.h:827:22: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint8* buffer_end_ = buffer_;
^
/usr/local/include/google/protobuf/io/coded_stream.h:830:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool had_error_ = false;
.....
.....
In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:
In file included from .build_release/src/caffe/proto/caffe.pb.h:26:
In file included from /usr/local/include/google/protobuf/generated_message_table_driven.h:34:
In file included from /usr/local/include/google/protobuf/map.h:48:
In file included from /usr/local/include/google/protobuf/generated_enum_util.h:36:
/usr/local/include/google/protobuf/message_lite.h:128:21: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
  template <typename... Args>
                    ^
/usr/local/include/google/protobuf/message_lite.h:129:22: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
  void Construct(Args&&... args) {
                     ^
/usr/local/include/google/protobuf/message_lite.h:135:3: error: unknown type name 'constexpr'
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ^
/usr/local/include/google/protobuf/message_lite.h:135:13: error: expected member name or ';' after declaration specifiers
  constexpr const T& get() const { return reinterpret_cast<const T&>(union_); }
  ~~~~~~~~~ ^

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 warnings and 20 errors generated.

Jinrui Wei

unread,
Feb 16, 2020, 7:37:06 AM2/16/20
to Caffe Users

Hi, it seems like you need to change your Makefile (not Makefile.config) 
there is one line like this: CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
and you should try to change it like this: CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
在 2020年1月29日星期三 UTC+8上午3:16:51,Pratibha Gupta写道:
Reply all
Reply to author
Forward
0 new messages