-
Notifications
You must be signed in to change notification settings - Fork 477
Replies: 2 comments · 8 replies
-
Can you try change the gRPC version in the below file to the version with your expected protobuf? https://github.com/open-telemetry/opentelemetry-cpp/blob/main/third_party_release |
Beta Was this translation helpful? Give feedback.
All reactions
-
Finally I used protobuf definitions variables, I did the same for abseil and nlohmann_json cmake -DPROTOBUF_PROTOC_EXECUTABLE=third_party/protobuf_24.3/bin/protoc.exe \
-DProtobuf_PROTOC_LIBRARY=third_party/protobuf_24.3/lib/libprotoc.lib \
-DProtobuf_LIBRARY=third_party/protobuf_24.3/lib/libprotobuf.lib \
-DProtobuf_LITE_LIBRARY=third_party/protobuf_24.3/lib/libprotobuf-lite.lib \
-DProtobuf_INCLUDE_DIR=third_party/protobuf_24.3/include \
-Dabsl_DIR=third_party/abseil_20230802.1/lib/cmake/absl \
-Dnlohmann_json_DIR=third_party/nlohmann_json/share/cmake/nlohmann_json/ \
-DWITH_STL=ON -DWITH_ABSEIL=ON -DWITH_OTLP_GRPC=OFF \
-DBUILD_TESTING=OFF -DWITH_OTLP_HTTP=ON -DCMAKE_CXX_STANDARD=17 \ the libraries are built, but I have some linking errors with my program:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
protobuf 3.13 or upper are all available.You should link abseil-cpp if you are using protobuf v22/4.22 or upper.Because protobuf depends it from v22/4.22. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I have the same linking errors plus others errors related to absl when I build the example example_otlp_http:
I used the cmake command below for opentelemetry:
|
Beta Was this translation helpful? Give feedback.
All reactions
-
abseil-cpp should be linked before protobuf if you are using protobuf v22/4.22 or above.I recommand to use cmake CONFIG package, it will resolve the link order automatically.(Using |
Beta Was this translation helpful? Give feedback.
All reactions
-
I see that in your personal projet that examples are not compiled https://github.com/atframework/cmake-toolset/blob/main/ports/telemetry/opentelemetry-cpp.cmake#L60, is there is an issue with examples ? I have linking problem only on Windows , on Linux openTelemetry libraries linked correctly with my program. |
Beta Was this translation helpful? Give feedback.
All reactions
-
No, this is a build system. It's not necessary to build example and tests for third party libraries. We have both build otel-cpp and protobuf as shared and static libraries in our internal projects.The linking problem above depends the version of protobuf, the link order of protobuf and abseil, and the visibility when compiling. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Which combinaison of recent versions of protobuf and abseil are you using on Windows for the version v1.11 and the version v1.12 of opentelemetry ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
When I use the below command on Windows:
even if I changed the version of protobuf in file
opentelemetry-cpp/tools/ports/protobuf/vcpkg.json
Line 3 in 0563a71
it builds the version 3.15.8 of protobuf.
Is is possible to build with a version different from 3.15.8 ?
Beta Was this translation helpful? Give feedback.
All reactions