-1

Tried to install as per grpc quickstart page. Installation of gRPC itself was fine but third-party/abseil-cpp is giving lot of errors ("make -j" step):

#error "C++ versions less than C++11 are not supported."
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:108:15: error: static_assert expression is not an integral constant expression
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/policy_checks.h:77:2: error: "C++ versions less than C++11 are not supported."
#error "C++ versions less than C++11 are not supported."
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:108:15: error: static_assert expression is not an integral constant expression
error: "lts_20210324"
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:880:44: note: expanded from #error "C++ versions less than C++11 are not supported."
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:108:15: error: static_assert expression is not an integral constant expression
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:111:15: error: static_assert expression is not an integral constant expression
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:111:15: error: static_assert expression is not an integral constant expression
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/config.h:111:15: error: static_assert expression is not an integral constant expression
/home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/base/internal/fast_type_id.h:28:3: In file included from /home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/absl/random/internal/randen_round_keys.ccerror:: 15:
error: unknown type name 'constexpr'
<truncated>
coder
  • 39
  • 6

1 Answers1

0

In /home/guest/grpc/grpc-cpp/grpc/third_party/abseil-cpp/cmake/build/CMakeCache.txt add to CXX_FLAGS line as follows:

//Flags used by the CXX compiler during all build types. CMAKE_CXX_FLAGS:STRING= --std=c++11

With this, "make -j" and "make install" works and grpc-cpp is ready to run.

coder
  • 39
  • 6