Skip to content

[Build] Build break when using WITH_OTLP_HTTP=ON, WITH_OTLP_GRPC=OFF #1826

@marcalff

Description

@marcalff

When compiling with the OTLP HTTP exporter but not the OTLP GRPC exporter,
the build fails:

In file included from .../opentelemetry-cpp/opentelemetry-cpp-1.8.0/exporters/otlp/src/otlp_grpc_utils.cc:4:
.../opentelemetry-cpp/opentelemetry-cpp-1.8.0/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_utils.h:6:10: fatal error: grpcpp/grpcpp.h: No such file or directory
    6 | #include <grpcpp/grpcpp.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

Suggested fix for exporter/otlp/CMakeLists.txt:

  • do not add otlp_grpc_utils.cc in the opentelemetry_otlp_recordable library
  • add otlp_grpc_utils.cc in the opentelemetry_exporter_otlp_grpc library instead ? (to investigate)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions