Skip to content

[Build] Multiple CURL packages leads to invalid build. #1738

@marcalff

Description

@marcalff

Assume a machine with:

  • a CURL package, version A, installed in system headers
  • a CURL package, version B, installed elsewhere.

During CMake, package B is found, which is the expected result.

In ./ext/src/http/client/curl/CMakeLists.txt, the makefile adds the proper include directory:

    target_include_directories(opentelemetry_http_client_curl
                               INTERFACE "${CURL_INCLUDE_DIRS}")

which points to package B, as expected.

During the build however, the following line of code:

#include <curl/curl.h>

does not see header files from B, but uses A instead.

The compiler does not uses the include path given by the makefile, and uses the system package.

Code is build with header files that do not match libraries, leading to an inconsistent build.

Please fix ext/include/opentelemetry/ext/http/client/curl/http_operation_curl.h
to use quotes, not curly brackets, when including the curl header files.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions