Hello,
I'm trying to build Gerrit on macOS, and I keep on getting errors related to compiling protobuf.
In file included from external/com_google_protobuf/src/google/protobuf/stubs/statusor.cc:31:
external/com_google_protobuf/src/google/protobuf/stubs/statusor.h:193:29: error: no member named 'UNKNOWN' in 'google::protobuf::util::status_internal::Status'
: status_(util::Status::UNKNOWN) {
~~~~~~~~~~~~~~^
external/com_google_protobuf/src/google/protobuf/stubs/statusor.h:199:22: error: use of undeclared identifier 'error'
status_ = Status(error::INTERNAL, "Status::OK is not a valid argument.");
^
external/com_google_protobuf/src/google/protobuf/stubs/statusor.h:208:22: error: use of undeclared identifier 'error'
status_ = Status(error::INTERNAL, "nullptr is not a valid argument.");
^
external/com_google_protobuf/src/google/protobuf/stubs/statusor.h:210:23: error: no member named 'OK' in 'google::protobuf::util::status_internal::Status'
status_ = Status::OK;
~~~~~~~~^
I suspect my problem is the gcc version.
I've been using what I think is the default version that gets installed with Xcode
✗ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I'm running macOS Big Sur 11.6, and Java 11:
✗ java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Homebrew (build 11.0.12+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.12+0, mixed mode)
The documentation doesn't say what GCC versions are required. I've successfully build on Linux with gcc 4.8.5, but it's difficult to get that version installed on Big Sur.