open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
863 stars 413 forks source link

Failed to build #3017

Open artyomb opened 2 months ago

artyomb commented 2 months ago

Trying to build the version v1.16.1 on ubuntu 22.04

sudo apt-get install git cmake g++ libcurl4-openssl-dev
sudo apt-get install protobuf-compiler libprotobuf-dev
sudo apt-get install -y libgrpc++-dev libgrpc-dev protobuf-compiler-grpc
git clone --depth 1 --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp -b v1.16.1
cd opentelemetry-cpp
mkdir -p build && cd build
cmake -DBUILD_TESTING=OFF -DWITH_OTLP_GRPC=ON ..

Got the following error:

-- PROTOBUF_PROTOC_EXECUTABLE=/usr/bin/protoc
-- opentelemetry-proto dependency satisfied by: git submodule
-- gRPC_CPP_PLUGIN_EXECUTABLE=/usr/bin/grpc_cpp_plugin
CMake Error at cmake/opentelemetry-proto.cmake:348 (get_target_property):
  get_target_property() called with non-existent target "gRPC::grpc++".
Call Stack (most recent call first):
  CMakeLists.txt:447 (include)
owent commented 2 months ago

Could you please use ci/setup_grpc.sh to install gRPC, we only support cmake config package now.

github-actions[bot] commented 2 weeks ago

This issue was marked as stale due to lack of activity.