open-telemetry / opentelemetry-cpp

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

Symbol name "opentelemetry.proto.common.v1.AnyValue" conflicts with the existing symbol "opentelemetry.proto.common.v1.AnyValue". #2585

Closed archliu321 closed 6 months ago

archliu321 commented 6 months ago

I built opentelemetry-cpp to shared lib, but when i run my code, coredump occured with such message. Can anyone help me, thanks a lot.

[libprotobuf ERROR google/protobuf/descriptor_database.cc:669] Symbol name "opentelemetry.proto.common.v1.AnyValue" conflicts with the existing symbol "opentelemetry.proto.common.v1.AnyValue".

archliu321 commented 6 months ago

more detail at image

esigo commented 6 months ago

@archliu321 please provide minimal reproduction steps. you are probably linking proto twice.

archliu321 commented 6 months ago

@esigo Thank you very much for your suggestion. After careful investigation, I did find that I had inadvertently included the same proto definition twice in the project. Now, It works well.