TL;DR
If you get the error CURL: Required feature AsynchDNS is not found while building this project, it is (probably) a false negative.
Apparently a fix was made for CURL component/feature detection starting in CMake 3.29 (something to do with pkgconfig parsing).
In my case, I'm targeting a RHEL8 distro, whose dnf info cmake shows 3.26.5 as the latest version.
If you're getting CURL: Required feature AsynchDNS is not found with libcurl-devel installed, curl-config --feature containing AsynchDNS (a feature added in 2003), you need to probably uninstall your package-installed cmake and install a later version available from the CMake GitHub.
I think the best fix for this would be to change
|
find_package(CURL REQUIRED COMPONENTS AsynchDNS) |
to
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.29.0")
find_package(CURL REQUIRED COMPONENTS AsynchDNS)
else()
# due to an issue with certain versions of CMake, don't try to check for AsynchDNS. The runtime check will fail anyway...
find_package(CURL REQUIRED)
endif()
It seems to be impossible to find a libcurl that doesn't have AsynchDNS enabled anyway...
Related issue (#838)
cc @supervacuus
TL;DR
If you get the error
CURL: Required feature AsynchDNS is not foundwhile building this project, it is (probably) a false negative.Apparently a fix was made for CURL component/feature detection starting in CMake 3.29 (something to do with pkgconfig parsing).
In my case, I'm targeting a RHEL8 distro, whose
dnf info cmakeshows 3.26.5 as the latest version.If you're getting
CURL: Required feature AsynchDNS is not foundwithlibcurl-develinstalled,curl-config --featurecontainingAsynchDNS(a feature added in 2003), you need to probably uninstall your package-installed cmake and install a later version available from the CMake GitHub.I think the best fix for this would be to change
sentry-native/CMakeLists.txt
Line 329 in d0d732e
to
It seems to be impossible to find a libcurl that doesn't have AsynchDNS enabled anyway...
Related issue (#838)
cc @supervacuus