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

Enable google/cloud/channel on macOS

Open devjgm opened this issue 3 years ago • 3 comments

https://github.com/googleapis/google-cloud-cpp/pull/8116 adds the google/cloud/channel library. However, that build breaks on macos due to:

bazel-out/darwin-fastbuild/bin/external/com_google_googleapis/google/cloud/channel/v1/common.pb.h:545:33: error: expected member name or ';' after declaration specifiers
  static constexpr CustomerType DOMAIN =
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode_12.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/math.h:732:17: note: expanded from macro 'DOMAIN'
#define DOMAIN          1
                        ^

https://source.cloud.google.com/results/invocations/8ee5da3b-6410-4185-a0d2-b38f5282069c/targets/cloud-cpp%2Fgithub%2Fgoogle-cloud-cpp%2Fmain%2Fmacos%2Fbazel-presubmit/log

That is, protobuf-generated code uses a symbol named DOMAIN that conflicts w/ a macro definition.

We will temporarily disable this library on macos, and re-enable it once protobuf is fixed to not choke on DOMAIN.

Originally posted by @devjgm in https://github.com/googleapis/google-cloud-cpp/issues/8115#issuecomment-1022677732

devjgm avatar Jan 26 '22 23:01 devjgm

The fix was submitted internally in cl/424720867. Now we need to wait for a release that contains the fix.

devjgm avatar Jan 27 '22 23:01 devjgm

This is also a problem on Windows.

coryan avatar Feb 05 '22 18:02 coryan

I sent a CL to fix Protobuf, but it will take a while to seep into the open source version.

coryan avatar Jul 08 '22 14:07 coryan

Still blocked on GCC < 8. I will send a PR to Protobuf, since we have about a year left with GCC 7.

coryan avatar May 25 '23 12:05 coryan

This is now fixed.

coryan avatar Nov 29 '23 20:11 coryan