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

GRPC Storage client cannot be built from source

Open jaystarshot opened this issue 9 months ago • 1 comments

Does this issue affect the google-cloud-cpp project? Yes

What component of google-cloud-cpp is this related to? For example, is this related to bigtable (i.e., something in google/cloud/bigtable), or GCS (i.e., something in google/cloud/storage)?

GRPC GCS client

Describe the bug A clear and concise description of what the bug is. external_googleapis_set_version_and_alias seems broken when trying to install GRPC support

Make Error at cmake/GoogleCloudCppLibrary.cmake:72 (external_googleapis_set_version_and_alias):
  Unknown CMake command "external_googleapis_set_version_and_alias".
Call Stack (most recent call first):
  google/cloud/storage/google_cloud_cpp_storage_grpc.cmake:41 (google_cloud_cpp_add_library_protos)
  google/cloud/storage/CMakeLists.txt:43 (include)

To Reproduce Steps to reproduce the behavior: git clone --recurse-submodules -b v2.36.0 https://github.com/googleapis/google-cloud-cpp.git

mkdir build && cd build

cmake ..
-DGOOGLE_CLOUD_CPP_ENABLE=storage
-DGOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC=ON
-DBUILD_TESTING=OFF
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF

Expected behavior A clear and concise description of what you expected to happen.

Operating system: If you are using a Linux distribution please include the name and version of the distribution too.

What compiler and version are you using? Please include the output of g++ -v or clang++ -v or the equivalent command-line flag.

What version of google-cloud-cpp are you using? Please include the output from git rev-parse HEAD if you are compiling from source, or the version number from the applicable google/cloud/*/version.h file.

Additional context Add any other context about the problem here.

jaystarshot avatar Mar 21 '25 21:03 jaystarshot

Please try using the storage_grpc value for GOOGLE_CLOUD_CPP_ENABLE and omitting the GOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC argument, e.g.:

cmake .. -DGOOGLE_CLOUD_CPP_ENABLE=storage_grpc -DBUILD_TESTING=OFF -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF

While there is a deprecation message emitted when listing the GOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC option. It appears we're missing a similar deprecation message when attempting to use GOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC.

scotthart avatar Mar 24 '25 15:03 scotthart

Solved by https://github.com/googleapis/google-cloud-cpp/pull/15144

diegomarquezp avatar Jun 30 '25 17:06 diegomarquezp