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
Upgrade c-ares minimum version to 1.15+ #2029
Comments
Thank you for suggestion. We usually do not bump version just because it has better cmake files, but in this case I think it is OK to bump minimum version because 1.15 is old enough. |
Thank you! For context, users who fetch and build c-ares as part of their build will not have it installed ahead of time. I am one such user, and I hit this exact issue. In order to make nghttp2 work with c-ares as part of a build that builds curl, this is what I had to do for c-ares:
And this is what I had to do for nghttp2:
Where the patch file is the following:
I had to remove the version check, since the version header doesn't exist until after the build. If we update nghttp2 to do the following:
Then when building a project with CMake >= 3.24, |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Comment -- I'll go after this |
#2137 requires c-ares >= 1.16.0 for ares_getaddrinfo. |
Great news -- I'll put in the CMake changes afterwards |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
C-ares 1.15 introduced a c-ares-config.cmake file:
c-ares/c-ares@4989438
This file makes the detection of c-ares much better than the current find module implementation:
https://github.com/nghttp2/nghttp2/blob/master/CMakeLists.txt#L61
https://github.com/nghttp2/nghttp2/blob/master/cmake/FindLibcares.cmake
Since Unix traditionally builds packages using autotools instead of CMake, the file will only exist when built by the user.
How does the following logic sound?
find_package(c-ares CONFIG)
first, and if that fails, we fallback tofind_package(Libcares)
find_package(c-ares CONFIG)
was successful, we set the same variables to match the module mode.I picked 1.15 instead of a later version since Ubuntu focal has that version, so there's less breakage across builds:
https://launchpad.net/ubuntu/+source/c-ares
What do you think @tatsuhiro-t ?
The text was updated successfully, but these errors were encountered: