Cmake Amazon Linux 2023 Build fails for WITH_OTLP_GRPC=ON #2586
Labels
bug
Something isn't working
triage/needs-information
Indicates an issue needs more information in order to work on it.
Describe your environment: the OpenTelemetry C++ client library cmake build on Amazon Linux 2023 fails when the option
WITH_OTLP_GRPC
is set toON
, as in-DWITH_OTLP_GRPC=ON
, see below. The build runs under the native AL23 g++ v11.4.1 compiler with the protobuf and the grpc binaries also provided by AL23 via thesudo yum install -y protobuf-devel grpc-cpp grpc-devel grpc-plugins
command that installs the header files and the libraries into/usr/incude
and/usr/lib64
directories. The otel repo was cloned as described in the installation instructions, via thegit clone --recurse-submodules https://github.com/open-telemetry/opentelemetry-cpp
command. All the other code that depends on the protobuf and the grpc libraries builds perfectly fine.Steps to reproduce
Do the git clone command as shown above on AL23 machine. Then, do
and execute the cmake as follows:
What is the expected behavior?
The build is expected to work and complete successfully, producing the needed shared libraries and headers.
What is the actual behavior?
The build fails. First, cmake produces the following:
saying, on the one hand, that it "Found Protobuf" and, on the other hand, saying twice that it "Could NOT find Protobuf (missing: Protobuf_DIR)".
Hence, the question: if I specified
-DProtobuf_DIR=/usr/lib64
then why does the cmake say that it "Could NOT find Protobuf (missing: Protobuf_DIR)" when Protobuf_DIR was defined?Then, running the
cmake --build . --target all
command, the build proceeds, compiles 61% of the project and at 62% completion fails with errors in the absl land:There are more errors like the ones shown above but fixing these few errors should be a good start.
Any ideas how to fix this and make it work?
Thank you in advance.
The text was updated successfully, but these errors were encountered: