google-cloud-cpp
google-cloud-cpp copied to clipboard
Enable google/cloud/storagetransfer on macOS
We cannot compile google/cloud/storagetransfer with the latest googleapis (current as-of 2022-04-25) because the protos define a UID enum, which generates a UID_MAX identifier, which is a macro on macOS:
In file included from bazel-out/darwin-fastbuild/bin/external/com_google_googleapis/google/storagetransfer/v1/transfer.pb.h:39:
bazel-out/darwin-fastbuild/bin/external/com_google_googleapis/google/storagetransfer/v1/transfer_types.pb.h:3485:24: error: expected member name or ';' after declaration specifiers
static constexpr UID UID_MAX =
~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode_12.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/syslimits.h:86:28: note: expanded from macro 'UID_MAX'
#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
^
Sigh. The same thing happens for GID_MAX:
bazel-out/darwin-fastbuild/bin/external/com_google_googleapis/google/storagetransfer/v1/transfer_types.pb.h:3520:24: error: expected member name or ';' after declaration specifiers
static constexpr GID GID_MAX =
~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode_12.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/syslimits.h:78:28: note: expanded from macro 'GID_MAX'
#define GID_MAX 2147483647U /* max value for a gid_t (2^31-2) */
^
Still waiting for the protobuf updates
We need to check after Protobuf v23 and the corresponding gRPC.