Skip to content
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

Compiling on mac OS CPU mode only #7078

Open
brennanleez-coder opened this issue Apr 28, 2024 · 2 comments
Open

Compiling on mac OS CPU mode only #7078

brennanleez-coder opened this issue Apr 28, 2024 · 2 comments

Comments

@brennanleez-coder
Copy link

Issue summary

Unable to compile caffe locally. Received about 50 errors.

  1. C++ versions less than C++14 are not supported
  2. whole bunch of other seemingly like syntax errors

Steps to reproduce

Download zip, run make all command in root folder.

Tried solutions

I have already changed my root CMakeLists:

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

stuck here ever since.

System configuration

  • Operating system: MAC OS X 14.2.1 INTEL
  • Compiler: clang++
  • CUDA version (if applicable): NA
  • CUDNN version (if applicable): NA
  • BLAS:
  • Python version (if using pycaffe): NA
  • MATLAB version (if using matcaffe): NA

Logs

(base) brennanlee@Brennans-MBP caffe % make all
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
In file included from /usr/local/include/absl/base/config.h:92:
/usr/local/include/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."
#error "C++ versions less than C++14 are not supported."
^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
/usr/local/include/absl/base/config.h:162:15: error: static assertion expression is not an integral constant expression
static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0',

/usr/local/include/absl/base/config.h:160:3: note: expanded from macro 'ABSL_INTERNAL_INLINE_NAMESPACE_STR'
  ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
  ^
/usr/local/include/absl/base/config.h:125:36: note: expanded from macro 'ABSL_INTERNAL_TOKEN_STR'
#define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
                                   ^
/usr/local/include/absl/base/config.h:124:39: note: expanded from macro 'ABSL_INTERNAL_DO_TOKEN_STR'
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
                                      ^
<scratch space>:85:1: note: expanded from here
"lts_20240116"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:47: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                                              ^~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
/usr/local/include/absl/base/config.h:165:15: error: static assertion expression is not an integral constant expression
static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/absl/base/config.h:160:3: note: expanded from macro 'ABSL_INTERNAL_INLINE_NAMESPACE_STR'
  ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
  ^
/usr/local/include/absl/base/config.h:125:36: note: expanded from macro 'ABSL_INTERNAL_TOKEN_STR'
#define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
                                   ^
/usr/local/include/absl/base/config.h:124:39: note: expanded from macro 'ABSL_INTERNAL_DO_TOKEN_STR'
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
                                      ^
<scratch space>:86:1: note: expanded from here
"lts_20240116"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:47: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                                              ^~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
/usr/local/include/google/protobuf/port_def.inc:139:1: error: static assertion failed due to requirement '199711L >= 201402L': Protobuf only supports C++14 and newer.
static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:32: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                               ^              ~~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
/usr/local/include/google/protobuf/port_def.inc:986:2: error: expected expression
[[noreturn]] PROTOBUF_EXPORT void protobuf_assumption_failed(const char *pred,
 ^
/usr/local/include/google/protobuf/port_def.inc:986:30: error: expected unqualified-id
[[noreturn]] PROTOBUF_EXPORT void protobuf_assumption_failed(const char *pred,
                             ^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:20:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:108:
In file included from /usr/local/include/google/protobuf/stubs/common.h:21:
In file included from /usr/local/include/absl/strings/string_view.h:40:
In file included from /usr/local/include/absl/base/nullability.h:153:
In file included from /usr/local/include/absl/base/internal/nullability_impl.h:22:
/usr/local/include/absl/meta/type_traits.h:54:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]
ABSL_NAMESPACE_BEGIN
^
/usr/local/include/absl/base/config.h:181:3: note: expanded from macro 'ABSL_NAMESPACE_BEGIN'
  inline namespace ABSL_OPTION_INLINE_NAMESPACE_NAME {
  ^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:20:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:108:
In file included from /usr/local/include/google/protobuf/stubs/common.h:21:
In file included from /usr/local/include/absl/strings/string_view.h:40:
In file included from /usr/local/include/absl/base/nullability.h:153:
In file included from /usr/local/include/absl/base/internal/nullability_impl.h:22:
/usr/local/include/absl/meta/type_traits.h:58:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:60:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = void;
               ^
/usr/local/include/absl/meta/type_traits.h:77:41: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, template <class...> class Op, class... Args>
                                        ^
/usr/local/include/absl/meta/type_traits.h:77:61: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, template <class...> class Op, class... Args>
                                                            ^
/usr/local/include/absl/meta/type_traits.h:79:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::false_type;
               ^
/usr/local/include/absl/meta/type_traits.h:82:26: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                         ^
/usr/local/include/absl/meta/type_traits.h:82:46: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                                             ^
/usr/local/include/absl/meta/type_traits.h:83:54: error: a space is required between consecutive right angle brackets (use '> >')
struct is_detected_impl<typename VoidTImpl<Op<Args...>>::type, Op, Args...> {
                                                     ^~
                                                     > >
/usr/local/include/absl/meta/type_traits.h:84:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::true_type;
               ^
/usr/local/include/absl/meta/type_traits.h:87:26: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                         ^
/usr/local/include/absl/meta/type_traits.h:87:46: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                                             ^
/usr/local/include/absl/meta/type_traits.h:90:51: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, class To, template <class...> class Op, class... Args>
                                                  ^
/usr/local/include/absl/meta/type_traits.h:90:71: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, class To, template <class...> class Op, class... Args>
                                                                      ^
/usr/local/include/absl/meta/type_traits.h:92:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::false_type;
               ^
/usr/local/include/absl/meta/type_traits.h:95:36: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                   ^
/usr/local/include/absl/meta/type_traits.h:95:56: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:99:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::true_type;
               ^
/usr/local/include/absl/meta/type_traits.h:102:36: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                   ^
/usr/local/include/absl/meta/type_traits.h:102:56: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:120:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:121:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
               ^
/usr/local/include/absl/meta/type_traits.h:132:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:135:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename T, typename... Ts>
                              ^
/usr/local/include/absl/meta/type_traits.h:151:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:154:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename T, typename... Ts>
                              ^
/usr/local/include/absl/meta/type_traits.h:156:54: error: a space is required between consecutive right angle brackets (use '> >')
      std::conditional<T::value, T, disjunction<Ts...>>::type {};
                                                     ^~
                                                     > >
/usr/local/include/absl/meta/type_traits.h:226:7: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      typename std::remove_cv<typename std::remove_reference<T>::type>::type;
      ^
/usr/local/include/absl/meta/type_traits.h:230:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cvref_t = typename remove_cvref<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:238:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cv_t = typename std::remove_cv<T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:241:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_const_t = typename std::remove_const<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:244:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_volatile_t = typename std::remove_volatile<T>::type;
                          ^
/usr/local/include/absl/meta/type_traits.h:247:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_cv_t = typename std::add_cv<T>::type;
                 ^
/usr/local/include/absl/meta/type_traits.h:250:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_const_t = typename std::add_const<T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:253:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_volatile_t = typename std::add_volatile<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:256:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_reference_t = typename std::remove_reference<T>::type;
                           ^
/usr/local/include/absl/meta/type_traits.h:259:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
                               ^
/usr/local/include/absl/meta/type_traits.h:262:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_rvalue_reference_t = typename std::add_rvalue_reference<T>::type;
                               ^
/usr/local/include/absl/meta/type_traits.h:265:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_pointer_t = typename std::remove_pointer<T>::type;
                         ^
/usr/local/include/absl/meta/type_traits.h:268:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_pointer_t = typename std::add_pointer<T>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:271:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using make_signed_t = typename std::make_signed<T>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:274:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using make_unsigned_t = typename std::make_unsigned<T>::type;
                        ^
/usr/local/include/absl/meta/type_traits.h:277:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_extent_t = typename std::remove_extent<T>::type;
                        ^
/usr/local/include/absl/meta/type_traits.h:280:30: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_all_extents_t = typename std::remove_all_extents<T>::type;
                             ^
/usr/local/include/absl/meta/type_traits.h:288:1: error: expected expression
struct default_alignment_of_aligned_storage;
^
/usr/local/include/absl/meta/type_traits.h:288:44: error: expected '>'
struct default_alignment_of_aligned_storage;
                                           ^
/usr/local/include/absl/meta/type_traits.h:287:56: note: to match this '<'
template <size_t Len, typename T = std::aligned_storage<Len>>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:288:44: error: expected ',' or '>' in template-parameter-list
struct default_alignment_of_aligned_storage;
                                           ^
/usr/local/include/absl/meta/type_traits.h:288:44: error: declaration does not declare anything
/usr/local/include/absl/meta/type_traits.h:292:44: error: expected expression
    Len, std::aligned_storage<Len, Align>> {
                                           ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: expected '>'
};
 ^
/usr/local/include/absl/meta/type_traits.h:292:30: note: to match this '<'
    Len, std::aligned_storage<Len, Align>> {
                             ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: type name requires a specifier or qualifier
};
 ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: expected '>'
/usr/local/include/absl/meta/type_traits.h:291:44: note: to match this '<'
struct default_alignment_of_aligned_storage<
                                           ^
/usr/local/include/absl/meta/type_traits.h:299:27: error: no member named 'default_alignment_of_aligned_storage' in namespace 'absl::type_traits_internal'
                          default_alignment_of_aligned_storage<Len>::value>
                          ^
/usr/local/include/absl/meta/type_traits.h:299:70: error: no type named 'value' in the global namespace
                          default_alignment_of_aligned_storage<Len>::value>
                                                                   ~~^
/usr/local/include/absl/meta/type_traits.h:299:75: error: expected unqualified-id
                          default_alignment_of_aligned_storage<Len>::value>
                                                                          ^
/usr/local/include/absl/meta/type_traits.h:304:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using decay_t = typename std::decay<T>::type;
                ^
/usr/local/include/absl/meta/type_traits.h:307:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using enable_if_t = typename std::enable_if<B, T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:310:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using conditional_t = typename std::conditional<B, T, F>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:312:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... T>
                  ^
/usr/local/include/absl/meta/type_traits.h:313:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using common_type_t = typename std::common_type<T...>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:316:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using underlying_type_t = typename std::underlying_type<T>::type;
                          ^
/usr/local/include/absl/meta/type_traits.h:328:40: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template<typename F> using result_of = std::result_of<F>;
                                       ^
/usr/local/include/absl/meta/type_traits.h:334:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using result_of_t = typename type_traits_internal::result_of<F>::type;
                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
50 warnings and 20 errors generated.
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1
(base) brennanlee@Brennans-MBP caffe % make all
CXX .build_release/src/caffe/proto/caffe.pb.cc
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
In file included from /usr/local/include/absl/base/config.h:92:
/usr/local/include/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported."
#error "C++ versions less than C++14 are not supported."
 ^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
/usr/local/include/absl/base/config.h:162:15: error: static assertion expression is not an integral constant expression
static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0',
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/absl/base/config.h:160:3: note: expanded from macro 'ABSL_INTERNAL_INLINE_NAMESPACE_STR'
  ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
  ^
/usr/local/include/absl/base/config.h:125:36: note: expanded from macro 'ABSL_INTERNAL_TOKEN_STR'
#define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
                                   ^
/usr/local/include/absl/base/config.h:124:39: note: expanded from macro 'ABSL_INTERNAL_DO_TOKEN_STR'
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
                                      ^
<scratch space>:85:1: note: expanded from here
"lts_20240116"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:47: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                                              ^~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
In file included from /usr/local/include/google/protobuf/port_def.inc:33:
In file included from /usr/local/include/absl/base/attributes.h:37:
/usr/local/include/absl/base/config.h:165:15: error: static assertion expression is not an integral constant expression
static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/absl/base/config.h:160:3: note: expanded from macro 'ABSL_INTERNAL_INLINE_NAMESPACE_STR'
  ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME)
  ^
/usr/local/include/absl/base/config.h:125:36: note: expanded from macro 'ABSL_INTERNAL_TOKEN_STR'
#define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x)
                                   ^
/usr/local/include/absl/base/config.h:124:39: note: expanded from macro 'ABSL_INTERNAL_DO_TOKEN_STR'
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
                                      ^
<scratch space>:86:1: note: expanded from here
"lts_20240116"
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:47: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                                              ^~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
/usr/local/include/google/protobuf/port_def.inc:139:1: error: static assertion failed due to requirement '199711L >= 201402L': Protobuf only supports C++14 and newer.
static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and newer.");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:477:32: note: expanded from macro 'static_assert'
#    define static_assert(...) _Static_assert(__VA_ARGS__)
                               ^              ~~~~~~~~~~~
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:13:
/usr/local/include/google/protobuf/port_def.inc:986:2: error: expected expression
[[noreturn]] PROTOBUF_EXPORT void protobuf_assumption_failed(const char *pred,
 ^
/usr/local/include/google/protobuf/port_def.inc:986:30: error: expected unqualified-id
[[noreturn]] PROTOBUF_EXPORT void protobuf_assumption_failed(const char *pred,
                             ^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:20:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:108:
In file included from /usr/local/include/google/protobuf/stubs/common.h:21:
In file included from /usr/local/include/absl/strings/string_view.h:40:
In file included from /usr/local/include/absl/base/nullability.h:153:
In file included from /usr/local/include/absl/base/internal/nullability_impl.h:22:
/usr/local/include/absl/meta/type_traits.h:54:1: warning: inline namespaces are a C++11 feature [-Wc++11-inline-namespace]
ABSL_NAMESPACE_BEGIN
^
/usr/local/include/absl/base/config.h:181:3: note: expanded from macro 'ABSL_NAMESPACE_BEGIN'
  inline namespace ABSL_OPTION_INLINE_NAMESPACE_NAME {
  ^
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:
In file included from .build_release/src/caffe/proto/caffe.pb.h:20:
In file included from /usr/local/include/google/protobuf/io/coded_stream.h:108:
In file included from /usr/local/include/google/protobuf/stubs/common.h:21:
In file included from /usr/local/include/absl/strings/string_view.h:40:
In file included from /usr/local/include/absl/base/nullability.h:153:
In file included from /usr/local/include/absl/base/internal/nullability_impl.h:22:
/usr/local/include/absl/meta/type_traits.h:58:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:60:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = void;
               ^
/usr/local/include/absl/meta/type_traits.h:77:41: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, template <class...> class Op, class... Args>
                                        ^
/usr/local/include/absl/meta/type_traits.h:77:61: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, template <class...> class Op, class... Args>
                                                            ^
/usr/local/include/absl/meta/type_traits.h:79:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::false_type;
               ^
/usr/local/include/absl/meta/type_traits.h:82:26: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                         ^
/usr/local/include/absl/meta/type_traits.h:82:46: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                                             ^
/usr/local/include/absl/meta/type_traits.h:83:54: error: a space is required between consecutive right angle brackets (use '> >')
struct is_detected_impl<typename VoidTImpl<Op<Args...>>::type, Op, Args...> {
                                                     ^~
                                                     > >
/usr/local/include/absl/meta/type_traits.h:84:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::true_type;
               ^
/usr/local/include/absl/meta/type_traits.h:87:26: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                         ^
/usr/local/include/absl/meta/type_traits.h:87:46: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <template <class...> class Op, class... Args>
                                             ^
/usr/local/include/absl/meta/type_traits.h:90:51: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, class To, template <class...> class Op, class... Args>
                                                  ^
/usr/local/include/absl/meta/type_traits.h:90:71: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class Enabler, class To, template <class...> class Op, class... Args>
                                                                      ^
/usr/local/include/absl/meta/type_traits.h:92:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::false_type;
               ^
/usr/local/include/absl/meta/type_traits.h:95:36: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                   ^
/usr/local/include/absl/meta/type_traits.h:95:56: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:99:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  using type = std::true_type;
               ^
/usr/local/include/absl/meta/type_traits.h:102:36: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                   ^
/usr/local/include/absl/meta/type_traits.h:102:56: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <class To, template <class...> class Op, class... Args>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:120:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:121:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using void_t = typename type_traits_internal::VoidTImpl<Ts...>::type;
               ^
/usr/local/include/absl/meta/type_traits.h:132:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:135:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename T, typename... Ts>
                              ^
/usr/local/include/absl/meta/type_traits.h:151:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Ts>
                  ^
/usr/local/include/absl/meta/type_traits.h:154:31: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename T, typename... Ts>
                              ^
/usr/local/include/absl/meta/type_traits.h:156:54: error: a space is required between consecutive right angle brackets (use '> >')
      std::conditional<T::value, T, disjunction<Ts...>>::type {};
                                                     ^~
                                                     > >
/usr/local/include/absl/meta/type_traits.h:226:7: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
      typename std::remove_cv<typename std::remove_reference<T>::type>::type;
      ^
/usr/local/include/absl/meta/type_traits.h:230:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cvref_t = typename remove_cvref<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:238:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_cv_t = typename std::remove_cv<T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:241:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_const_t = typename std::remove_const<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:244:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_volatile_t = typename std::remove_volatile<T>::type;
                          ^
/usr/local/include/absl/meta/type_traits.h:247:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_cv_t = typename std::add_cv<T>::type;
                 ^
/usr/local/include/absl/meta/type_traits.h:250:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_const_t = typename std::add_const<T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:253:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_volatile_t = typename std::add_volatile<T>::type;
                       ^
/usr/local/include/absl/meta/type_traits.h:256:28: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_reference_t = typename std::remove_reference<T>::type;
                           ^
/usr/local/include/absl/meta/type_traits.h:259:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_lvalue_reference_t = typename std::add_lvalue_reference<T>::type;
                               ^
/usr/local/include/absl/meta/type_traits.h:262:32: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_rvalue_reference_t = typename std::add_rvalue_reference<T>::type;
                               ^
/usr/local/include/absl/meta/type_traits.h:265:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_pointer_t = typename std::remove_pointer<T>::type;
                         ^
/usr/local/include/absl/meta/type_traits.h:268:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using add_pointer_t = typename std::add_pointer<T>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:271:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using make_signed_t = typename std::make_signed<T>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:274:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using make_unsigned_t = typename std::make_unsigned<T>::type;
                        ^
/usr/local/include/absl/meta/type_traits.h:277:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_extent_t = typename std::remove_extent<T>::type;
                        ^
/usr/local/include/absl/meta/type_traits.h:280:30: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using remove_all_extents_t = typename std::remove_all_extents<T>::type;
                             ^
/usr/local/include/absl/meta/type_traits.h:288:1: error: expected expression
struct default_alignment_of_aligned_storage;
^
/usr/local/include/absl/meta/type_traits.h:288:44: error: expected '>'
struct default_alignment_of_aligned_storage;
                                           ^
/usr/local/include/absl/meta/type_traits.h:287:56: note: to match this '<'
template <size_t Len, typename T = std::aligned_storage<Len>>
                                                       ^
/usr/local/include/absl/meta/type_traits.h:288:44: error: expected ',' or '>' in template-parameter-list
struct default_alignment_of_aligned_storage;
                                           ^
/usr/local/include/absl/meta/type_traits.h:288:44: error: declaration does not declare anything
/usr/local/include/absl/meta/type_traits.h:292:44: error: expected expression
    Len, std::aligned_storage<Len, Align>> {
                                           ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: expected '>'
};
 ^
/usr/local/include/absl/meta/type_traits.h:292:30: note: to match this '<'
    Len, std::aligned_storage<Len, Align>> {
                             ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: type name requires a specifier or qualifier
};
 ^
/usr/local/include/absl/meta/type_traits.h:294:2: error: expected '>'
/usr/local/include/absl/meta/type_traits.h:291:44: note: to match this '<'
struct default_alignment_of_aligned_storage<
                                           ^
/usr/local/include/absl/meta/type_traits.h:299:27: error: no member named 'default_alignment_of_aligned_storage' in namespace 'absl::type_traits_internal'
                          default_alignment_of_aligned_storage<Len>::value>
                          ^
/usr/local/include/absl/meta/type_traits.h:299:70: error: no type named 'value' in the global namespace
                          default_alignment_of_aligned_storage<Len>::value>
                                                                   ~~^
/usr/local/include/absl/meta/type_traits.h:299:75: error: expected unqualified-id
                          default_alignment_of_aligned_storage<Len>::value>
                                                                          ^
/usr/local/include/absl/meta/type_traits.h:304:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using decay_t = typename std::decay<T>::type;
                ^
/usr/local/include/absl/meta/type_traits.h:307:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using enable_if_t = typename std::enable_if<B, T>::type;
                    ^
/usr/local/include/absl/meta/type_traits.h:310:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using conditional_t = typename std::conditional<B, T, F>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:312:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... T>
                  ^
/usr/local/include/absl/meta/type_traits.h:313:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using common_type_t = typename std::common_type<T...>::type;
                      ^
/usr/local/include/absl/meta/type_traits.h:316:27: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using underlying_type_t = typename std::underlying_type<T>::type;
                          ^
/usr/local/include/absl/meta/type_traits.h:328:40: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
template<typename F> using result_of = std::result_of<F>;
                                       ^
/usr/local/include/absl/meta/type_traits.h:334:21: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using result_of_t = typename type_traits_internal::result_of<F>::type;
                    ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
50 warnings and 20 errors generated.
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

### Issue checklist

- [ x] read the guidelines and removed the first paragraph
- [ x] written a short summary and detailed steps to reproduce
- [ x] explained how solutions to related problems failed (tick if found none)
- [ x] filled system configuration
- [ x] attached relevant logs/config files (tick if not applicable)
@franzcrs
Copy link

franzcrs commented Jun 4, 2024

Hello, the error you have is most likely due to an incompatible compiler version. Try with CMAKE_CXX_STANDARD 17. In the case you keep producing error or face other error due to the change, you can try referring to the changes I did in this commit (e0e5833). It contains the modifications for securing a build of OpenPose and Caffe in a M1 Mac. You can try all the changes done inside the caffe folder, or you can clone the repo and run the instructions. The drawback is that you will unnecessarily build OpenPose. Hope you find this helpful!

@dragonQian
Copy link

dragonQian commented Jun 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants