googlesamples / assistant-sdk-cpp

Example of Google Assistant gRPC in C++
Apache License 2.0
96 stars 44 forks source link

Unable to build googleapis in the latest version #35

Open Nitya05 opened 6 years ago

Nitya05 commented 6 years ago

"make LANGUAGE=cpp" for googleapis is giving the following error:

google/ads/googleads/v0/common/custom_parameter.proto:31:8: Option "php_metadata_namespace" unknown. Makefile:46: recipe for target 'google/ads/googleads/v0/common/custom_parameter.pb.cc' failed make: *** [google/ads/googleads/v0/common/custom_parameter.pb.cc] Error 1

Any leads on resolving this?

Fleker commented 6 years ago

Yeah I'm seeing the same thing. It looks like some changes were made to the googleads protos. I'll see if I can clean up the build process. In the meantime, you should be fine to delete the google/ads/ directory.

protoc --proto_path=.:/usr/local/include --cpp_out=./gens --grpc_out=./gens --plugin=protoc-gen-grpc=/usr/local/bin/grpc_cpp_plugin google/ads/googleads/v0/services/ad_group_service.proto
google/ads/googleads/v0/common/custom_parameter.proto:31:8: Option "php_metadata_namespace" unknown.
google/ads/googleads/v0/enums/ad_group_status.proto:29:8: Option "php_metadata_namespace" unknown.
google/ads/googleads/v0/enums/ad_group_type.proto:29:8: Option "php_metadata_namespace" unknown.
google/ads/googleads/v0/resources/ad_group.proto: Import "google/ads/googleads/v0/common/custom_parameter.proto" was not found or had errors.
google/ads/googleads/v0/resources/ad_group.proto: Import "google/ads/googleads/v0/enums/ad_group_status.proto" was not found or had errors.
google/ads/googleads/v0/resources/ad_group.proto: Import "google/ads/googleads/v0/enums/ad_group_type.proto" was not found or had errors.
google/ads/googleads/v0/resources/ad_group.proto:60:3: "enums.AdGroupStatusEnum.AdGroupStatus" is not defined.
google/ads/googleads/v0/resources/ad_group.proto:63:3: "enums.AdGroupTypeEnum.AdGroupType" is not defined.
google/ads/googleads/v0/resources/ad_group.proto:70:12: "common.CustomParameter" is not defined.
google/ads/googleads/v0/services/ad_group_service.proto: Import "google/ads/googleads/v0/resources/ad_group.proto" was not found or had errors.
google/ads/googleads/v0/services/ad_group_service.proto:76:5: "resources.AdGroup" is not defined.
google/ads/googleads/v0/services/ad_group_service.proto:79:5: "resources.AdGroup" is not defined.
google/ads/googleads/v0/services/ad_group_service.proto:38:46: "resources.AdGroup" is not defined.
make: *** [google/ads/googleads/v0/services/ad_group_service.pb.cc] Error 1
Nitya05 commented 6 years ago

Okay, thanks. This worked.

mpoullet commented 5 years ago

The option php_metadata_namespace is only known to protoc version 3.6.0 and above. gRPC v1.11.0 used in build.sh only generates protoc version 3.5.0. Using e.g. gRPC v1.15.0 fixes this issue properly by building protoc version 3.6.1.