-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
curl_addrinfo.c error: 'getaddrinfo' undeclared in old-MinGW CI builds #9214
Comments
Looks like a Edit. From the above log, it seems to use the old SDK under |
Ping @MarcelRaad |
This is the classic MinGW build, which uses MinGW's own SDK and defaults to |
8ba22ff removed forcing Line 1069 in d48dd15
HAVE_GETADDRINFO ? The autotools builds correctly determines it to be unavailable, and I currently don't have a CMake setup usable with classic MinGW 😕
|
@MarcelRaad: In if(ENABLE_IPV6)
set(HAVE_GETADDRINFO 1)
else()
set(HAVE_GETADDRINFO 0)
endif() Can it be related to this issue? (Half-guessing, so this may totally be wrong, but this file seems to be offering predefined configuration values for Windows, and for these, the actual test is not performed?) |
The Visual Studio 2022 / cmake / msys build has failed to build for months. Removing it. Fixes #9214
1. Re-enable `HAVE_GETADDRINFO` detection on Windows Commit d08ee3c (in 2013) added logic that automatically assumed `getaddrinfo()` to be present for builds with IPv6 enabled. As it turns out, certain toolchains (e.g. original MinGW) by default target older Windows versions, and thus do not support `getaddrinfo()` out of the box. The issue was masked for a while by CMake builds forcing a newer Windows version, but that logic got deleted in commit 8ba22ff. Since then, some CI builds started failing due to IPv6 enabled, `HAVE_GETADDRINFO` set, but `getaddrinfo()` in fact missing. It also turns out that IPv6 works without `getaddrinfo()` since commit 67a08dc (from 2019, via curl#4662). So, to resolve all this, we can now revert the initial commit, thus restoring `getaddrinfo()` detection and support IPv6 regardless of its outcome. Reported-by: Daniel Stenberg 2. Omit `bcrypt` with original MinGW Original (aka legacy/old) MinGW versions do not support `bcrypt` (introduced with Vista). We already have logic to handle that in `lib/rand.c` and autotools builds, where we do not call the unsupported API and do not link `bcrypt`, respectively, when using original MinGW. This patch ports that logic to CMake, fixing the link error: `c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lbcrypt` Ref: https://ci.appveyor.com/project/curlorg/curl/builds/44624888/job/40vle84cn4vle7s0#L508 Regression since 7617251 Fixes curl#9214 Fixes curl#9393 Fixes curl#9395 Closes curl#9396
The appveyor CI builds with cmake using Visual Studio 2022 are permafailing since a while back. See log
The compiler errors are:
The text was updated successfully, but these errors were encountered: