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

Can not build with curl 8.12 #3271

Open
owent opened this issue Feb 13, 2025 · 2 comments · May be fixed by #3272
Open

Can not build with curl 8.12 #3271

owent opened this issue Feb 13, 2025 · 2 comments · May be fixed by #3272
Labels
bug Something isn't working triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@owent
Copy link
Member

owent commented Feb 13, 2025

Describe your environment

Can not build with libcurl 8.12.

[ 99%] Built target func_otlp_grpc
/usr/bin/gmake  -f functional/otlp/CMakeFiles/func_otlp_http.dir/build.make functional/otlp/CMakeFiles/func_otlp_http.dir/depend
gmake[2]: Entering directory '/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13'
cd /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13 && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0 /home/runner/work/cmake-toolset/cmake-toolset/test/third_party/packages/opentelemetry-cpp-v1.19.0/functional/otlp /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13 /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13/functional/otlp /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13/functional/otlp/CMakeFiles/func_otlp_http.dir/DependInfo.cmake "--color="
gmake[2]: Leaving directory '/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13'
/usr/bin/gmake  -f functional/otlp/CMakeFiles/func_otlp_http.dir/build.make functional/otlp/CMakeFiles/func_otlp_http.dir/build
gmake[2]: Entering directory '/home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13'
[100%] Linking CXX executable func_otlp_http
cd /home/runner/work/cmake-toolset/cmake-toolset/test/build_jobs_dir/_deps/opentelemetry_cpp-v1.19.0/linux-x86_64-gnu-13/functional/otlp && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/func_otlp_http.dir/link.txt --verbose=1
/usr/bin/ld: cannot find -lcares: No such file or directory
/usr/bin/ld: cannot find -lnghttp2: No such file or directory
collect2: error: ld returned 1 exit status
@owent owent added the bug Something isn't working label Feb 13, 2025
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Feb 13, 2025
@owent owent linked a pull request Feb 13, 2025 that will close this issue
3 tasks
@marcalff
Copy link
Member

marcalff commented Feb 13, 2025

There are quite a few changes related to CMake in curl 8.12.1:

I wonder if the issue is with the curl 8.12 install or with opentelemetry-cpp

@owent
Copy link
Member Author

owent commented Feb 14, 2025

The issue arises with curl installation when exporting CMake targets, but no related information is mentioned in the curl 8.12 changelog. vcpkg uses a patch (https://github.com/microsoft/vcpkg/blob/2025.01.13/ports/curl/dependencies.patch) to replace all -lXXX with CMake targets to solve this issue. However, since we are not a build system, we cannot modify curl's build script. #3272 attempts to handle this problem for otel-cpp builds but does not export the link flags.

BTW: There is a problem about curl's target name when using official exporting. #3272 also fixes it.

@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 Feb 24, 2025
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.

2 participants