-
Notifications
You must be signed in to change notification settings - Fork 415
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 with external abseil not working, ambiguous references #3063
Comments
Could you please check whether It seems otel-cpp's headers are included without |
For me it looks like this in this file set_target_properties(opentelemetry-cpp::api PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "OPENTELEMETRY_DEPRECATED_SDK_FACTORY;HAVE_ABSEIL;OPENTELEMETRY_STL_VERSION=2023;OPENTELEMETRY_ABI_VERSION_NO=1"
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "absl::bad_variant_access;absl::any;absl::base;absl::bits;absl::city"
) And in my app it looks like this now: #### Tracing Library ####
find_package(opentelemetry-cpp CONFIG REQUIRED)
message(STATUS "Found otel: ${opentelemetry-cpp_DIR}")
#print INTERFACE_COMPILE_DEFINITIONS
message("INTERFACE_COMPILE_DEFINITIONS: ${opentelemetry-cpp_INTERFACE_COMPILE_DEFINITIONS}")
if(NOT DEFINED HAVE_ABSEIL)
message(FATAL_ERROR "HAVE_ABSEIL not defined")
endif(NOT DEFINED HAVE_ABSEIL)
if(NOT DEFINED ${HAVE_ABSEIL})
message(FATAL_ERROR "HAVE_ABSEIL empty")
else ()
message("HAVE_ABSEIL defined as ${HAVE_ABSEIL}")
endif(NOT DEFINED ${HAVE_ABSEIL})
Adding |
|
Describe your environment
Ubuntu 22.04
CMake build
I want to add tracing to my already existing app where we also use and link against grpc/abseil.
Steps to reproduce
I made a little install script for otel:
and I added some output to see if otel finds my installed version of abseil:
Output: Found Abseil: /usr/alpen/lib/cmake/absl
Then in my app I created a little testing lib to see if it will build:
But when compile I always get this error: reference to ‘base_internal’ is ambiguous
What is the expected behavior?
I can build without interfering header files from different abseil libs.
What is the actual behavior?
I see this error:
Additional context
I looked at the hints here, but they had no effect.
The text was updated successfully, but these errors were encountered: