Skip to content

Failed to build with external abseil-cpp #1065

@hcoona

Description

@hcoona

It's simple to understand so I didn't follow the template.

The opentelemetry-cpp vendor parts of the absl source code within the API but without change the namespace. If I build a cpp target included both opentelementry-cpp & abseil-cpp, it would occurred an error (build with bazel & llvm-13):

external/com_google_absl/absl/meta/type_traits.h:162:8: error: redefinition of 'is_detected_convertible_impl<typename std::enable_if<std::is_convertible<Op<Args...>, To>::value>::type, To, Op, Args...>'
struct is_detected_convertible_impl<
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/external/io_opentelemetry_cpp/api/_virtual_includes/api/opentelemetry/nostd/./absl/types/../types/internal/../../meta/type_traits.h:154:8: note: previous definition is here
struct is_detected_convertible_impl<
       ^

The critical rule is to use an alternative namespace than the original namespace absl when vendoring any source code.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions