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

CMake error when building with CURL 8.3.0 and higher #2446

Closed
fgallegosalido opened this issue Dec 12, 2023 · 2 comments · Fixed by #2457
Closed

CMake error when building with CURL 8.3.0 and higher #2446

fgallegosalido opened this issue Dec 12, 2023 · 2 comments · Fixed by #2457
Assignees
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@fgallegosalido
Copy link

Describe your environment Describe any aspect of your environment relevant to the problem, including your platform, build system, version numbers of installed dependencies, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main branch.

Ubuntu 20.04
CMake 3.18
Opentelemetry C++ 1.13.0
GCC 7.5.0
CURL 8.3.0

Steps to reproduce
Compile CURL 8.3.0 or higher. Then try to compile OpenTelemetry C++ with OTLP enabled (so that CURL is actually needed).

What is the expected behavior?
The code should compile without errors.

What is the actual behavior?
This is the error that CMake gives:

CMake Error at cmake/tools.cmake:186 (set_target_properties):
  set_target_properties can not be used on an ALIAS target.
Call Stack (most recent call first):
  cmake/patch-imported-config.cmake:25 (project_build_tools_patch_default_imported_config)
  CMakeLists.txt:685 (include)


CMake Error at cmake/tools.cmake:186 (set_target_properties):
  set_target_properties can not be used on an ALIAS target.
Call Stack (most recent call first):
  cmake/patch-imported-config.cmake:25 (project_build_tools_patch_default_imported_config)
  CMakeLists.txt:685 (include)

Additional context
I was able to find the exact commit where the build breaks: curl/curl@1199308

My intuition tells me that, by making the target CURL::libcurl an ALIAS, the CMake function project_build_tools_patch_default_imported_config in cmake/patch-imported-config.cmake doesn't work anymore, as it is trying to modify a target that is an ALIAS.

@fgallegosalido fgallegosalido added the bug Something isn't working label Dec 12, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Dec 12, 2023
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 13, 2023
@marcalff
Copy link
Member

Hi @owent

This issue seem related to project_build_tools_patch_default_imported_config in CMake.

Could you take a look and comment ?

Thanks.

@owent
Copy link
Member

owent commented Dec 15, 2023

Thanks, I raised a PR to solve this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants