You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe your environment
Building RPMs for Fedora on f36, f37, f38, rawhide. The build itself proceeds without error, but when checking the installed libs using ldd, the undefined symbol error is reported. The rpmlint checker also reports this error as undefined-non-weak-symbol error.
Steps to reproduce
Build rpm using rpm build tools.
Install the rpms.
Test the installed libs using either:
$ rpmlint -i opentelemetry-cpp
or directly with:
$ ldd -r -d /usr/lib64/libopentelemetry*.so
What is the expected behavior?
No errors reported.
What is the actual behavior?
What did you see instead?
Additional context
The build for Fedora also requires that the version number be included into the naming of the libs, along with links. To achieve this, the attached patch file mostly contains cmake VERSION and SOVERSION declarations for each set_target_properties declaration.
The full build log and artifacts can be examined in the opentelemetry-cpp-1.9.0-1 build on Copr.
The error can be seen in the review.log - look for "Rpmlint (installed packages)"
Proposed fix
By adding the missing libraries to the target_link_libraries declaration in the appropriate CMakeLists.txt files, the problem is solved.
For opentelemetry_exporter_ostream_metrics.so, add opentelemetry_resources to the target_link_libraries declaration.
For opentelemetry_http_client_curl.so, add opentelemetry_common to the target_link_libraries declaration.
The full build log and artifacts of the corrected build can be examined in the opentelemetry-cpp-1.9.0-2 build on Copr.
The patch file used and which contains the corrected CMakeLists.txt files: opentelemetry-cpp-1.9.0.patch.tar.gz
The text was updated successfully, but these errors were encountered:
Describe your environment
Building RPMs for Fedora on f36, f37, f38, rawhide. The build itself proceeds without error, but when checking the installed libs using
ldd
, the undefined symbol error is reported. Therpmlint
checker also reports this error asundefined-non-weak-symbol
error.Steps to reproduce
or directly with:
What is the expected behavior?
No errors reported.
What is the actual behavior?
What did you see instead?
and
The undefined symbols resolve to:
which is found in
opentelemetry_common
.which is found in
opentelemetry_resources
.Additional context
The build for Fedora also requires that the version number be included into the naming of the libs, along with links. To achieve this, the attached patch file mostly contains cmake
VERSION
andSOVERSION
declarations for eachset_target_properties
declaration.Proposed fix
By adding the missing libraries to the target_link_libraries declaration in the appropriate CMakeLists.txt files, the problem is solved.
For
opentelemetry_exporter_ostream_metrics.so
, addopentelemetry_resources
to thetarget_link_libraries
declaration.For
opentelemetry_http_client_curl.so
, addopentelemetry_common
to thetarget_link_libraries
declaration.The full build log and artifacts of the corrected build can be examined in the opentelemetry-cpp-1.9.0-2 build on Copr.
The patch file used and which contains the corrected CMakeLists.txt files:
opentelemetry-cpp-1.9.0.patch.tar.gz
The text was updated successfully, but these errors were encountered: