Opentelemetry windows runtime issue
Opentelemtry is build on Windows 10 with shared libs on. When i linked to the test app and run the test app. i see below issue.
D:\workdir\win_shared_build\tc-monitor-cpp\build>.\bin\Release\runTests.exe WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1758866127.468952 33748 descriptor_database.cc:633] File already exists in database: opentelemetry/proto/common/v1/common.proto F0000 00:00:1758866127.469228 33748 descriptor.cc:2236] Check failed: GeneratedDatabase()->Add(encoded_file_descriptor, size) *** Check failure stack trace: *** @ 00007FFCAF4B2499 (unknown) @ 00007FFC761C70DF (unknown) @ 00007FFC762234C6 (unknown) @ 00007FFC762234B2 (unknown) @ 00007FFC762234B2 (unknown) @ 00007FFD477AE473 (unknown) @ 00007FFD24900F86 (unknown) @ 00007FFD249010FC (unknown) @ 00007FFD49E29A1D (unknown) @ 00007FFD49E7D2F7 (unknown) @ 00007FFD49E7D08A (unknown) @ 00007FFD49E7D110 (unknown) @ 00007FFD49E7D110 (unknown) @ 00007FFD49EE3CB2 (unknown) @ 00007FFD49E85DEB (unknown) @ 00007FFD49E85C73 (unknown) @ 00007FFD49E85C1E (unknown)
opentelemetry-cpp/cmake/opentelemetry-proto.cmake content,
if(CMAKE_SYSTEM_NAME MATCHES "Windows|MinGW|WindowsStore") list(APPEND OTELCPP_PROTO_TARGET_OPTIONS STATIC) elseif(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS) list(APPEND OTELCPP_PROTO_TARGET_OPTIONS SHARED) else() list(APPEND OTELCPP_PROTO_TARGET_OPTIONS STATIC) endif()
Incase of windows the STATIC library is being build which further links same protobuf sources to multiple opentelemetry libs which is causing the issue. Is there any specific reason to hardcode like this ?
Implemented in #2097. I mistakenly left the shared proto library without full support for non-Windows platforms. Apologies for the oversight. I’ll pick this up after my vacation and aim to finish it within a few days. I’ll update this thread once it’s done.
Hi, Thanks for the update. Please reply in this thread once the code is updated.
Regards Chandra
This issue was marked as stale due to lack of activity.
#3714 is ready. Could this PR be marked as do-not-stale ?
#3714 is ready. Could this PR be marked as do-not-stale ?
Done.
Note that stale as no effect, because the process to auto-close stale issues or PR is disabled.