Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD] Add missing target dependencies #2128

Merged
merged 3 commits into from
May 3, 2023

Conversation

lalitb
Copy link
Member

@lalitb lalitb commented May 3, 2023

Fixes #2113

Changes

Fixes missing target dependencies for 3 libraries:
Before fix:

$ ldd -r -d libopentelemetry_*so  2>&1 | grep undefin
undefined symbol: _ZNK13opentelemetry2v13sdk8resource8Resource13GetAttributesEv (./libopentelemetry_exporter_ostream_metrics.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_exporter_otlp_grpc_client.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_http_client_curl.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_exporter_otlp_http_client.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_http_client_curl.so)
$

After fix:

$ ldd -r -d libopentelemetry_*so  2>&1 | grep undefin
$

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@lalitb lalitb requested a review from a team May 3, 2023 07:28
@codecov
Copy link

codecov bot commented May 3, 2023

Codecov Report

Merging #2128 (2ab56e7) into main (8c75041) will increase coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2128      +/-   ##
==========================================
+ Coverage   87.17%   87.19%   +0.03%     
==========================================
  Files         166      166              
  Lines        4784     4784              
==========================================
+ Hits         4170     4171       +1     
+ Misses        614      613       -1     

see 1 file with indirect coverage changes

@@ -36,7 +36,8 @@ if(WITH_OTLP_GRPC)

target_link_libraries(
opentelemetry_exporter_otlp_grpc_client
PUBLIC opentelemetry_sdk opentelemetry_ext opentelemetry_proto)
PUBLIC opentelemetry_sdk opentelemetry_common opentelemetry_ext
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This problem is already fixed in #2097 .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct me otherwise, but I don't see this is fixed with #2097. Also validated by building shared libs from that PR, and below is the result:

$ ldd -r -d libopentelemetry_*so  2>&1 | grep undefin
undefined symbol: _ZNK13opentelemetry2v13sdk8resource8Resource13GetAttributesEv (./libopentelemetry_exporter_ostream_metrics.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_exporter_otlp_grpc_client.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_http_client_curl.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_exporter_otlp_http_client.so)
undefined symbol: _ZN13opentelemetry2v13sdk6common12internal_log16GlobalLogHandler18GetHandlerAndLevelEv        (./libopentelemetry_http_client_curl.so)
undefined symbol: _ZN4grpc24g_core_codegen_interfaceE   (./libopentelemetry_proto_grpc.so)
undefined symbol: _ZN4grpc6g_glipE      (./libopentelemetry_proto_grpc.so)
undefined symbol: _ZN4absl12lts_202103245MutexD1Ev      (./libopentelemetry_proto_grpc.so)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean the proto dependency of opentelemetry_exporter_otlp_grpc_client is added in #2097 . I didn't see opentelemetry_common before and it's still useful.
I can solve the conflict later.

@@ -467,7 +467,7 @@ update the semantic convention in instrumentation library is needed.
* [BUILD] Don't require applications using jaeger exporter to know about libcurl
[#1518](https://github.com/open-telemetry/opentelemetry-cpp/pull/1518)
* [EXPORTER] Inline print_value() in ostream exporter [#1512](https://github.com/open-telemetry/opentelemetry-cpp/pull/1512)
* [SDK] fix: urlPaser will incorrect parsing url like "http://abc.com/xxx@xxx/a/b"
* [SDK] fix: urlPaser will incorrect parsing url like `http://abc.com/xxx@xxx/a/b`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI is failing for bare URL here, so fixing this.

Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and thanks.

@@ -36,7 +36,8 @@ if(WITH_OTLP_GRPC)

target_link_libraries(
opentelemetry_exporter_otlp_grpc_client
PUBLIC opentelemetry_sdk opentelemetry_ext opentelemetry_proto)
PUBLIC opentelemetry_sdk opentelemetry_common opentelemetry_ext
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I mean the proto dependency of opentelemetry_exporter_otlp_grpc_client is added in #2097 . I didn't see opentelemetry_common before and it's still useful.
I can solve the conflict later.

@ThomsonTan ThomsonTan merged commit b4ff53d into open-telemetry:main May 3, 2023
@marcalff marcalff changed the title Add missing target dependencies [BUILD] Add missing target dependencies May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two libraries build with undefined symbols in Fedora
3 participants