google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Enable google/cloud/storagetransfer on macOS

Open devbww opened this issue 3 years ago • 1 comments

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) */
                           ^

devbww avatar Apr 25 '22 17:04 devbww

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) */
                           ^

devbww avatar May 29 '22 20:05 devbww

Still waiting for the protobuf updates

coryan avatar Nov 09 '22 19:11 coryan

We need to check after Protobuf v23 and the corresponding gRPC.

coryan avatar Apr 19 '23 18:04 coryan