You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
curl_addrinfo.c error: 'getaddrinfo' undeclared in old-MinGW CI builds #9214
The appveyor CI builds with cmake using Visual Studio 2022 are permafailing since a while back. See log
The compiler errors are:
C:/projects/curl/lib/curl_addrinfo.c: In function 'Curl_getaddrinfo_ex':
C:/projects/curl/lib/curl_addrinfo.c:192:5: error: implicit declaration of function 'freeaddrinfo'; did you mean 'getaddrinfo'? [-Werror=implicit-function-declaration]
192 | freeaddrinfo(aihead);
| ^~~~~~~~~~~~
| getaddrinfo
C:/projects/curl/lib/curl_addrinfo.c:192:5: error: nested extern declaration of 'freeaddrinfo' [-Werror=nested-externs]
C:/projects/curl/lib/curl_addrinfo.c: In function 'curl_dbg_getaddrinfo':
C:/projects/curl/lib/curl_addrinfo.c:556:14: error: 'getaddrinfo' undeclared (first use in this function); did you mean 'addrinfo'?
556 | int res = (getaddrinfo)(hostname, service, hints, result);
| ^~~~~~~~~~~
| addrinfo
C:/projects/curl/lib/curl_addrinfo.c:556:14: note: each undeclared identifier is reported only once for each function it appears in
cc1.exe: all warnings being treated as errors
make[2]: *** [lib/CMakeFiles/libcurl.dir/build.make:242: lib/CMakeFiles/libcurl.dir/curl_addrinfo.c.obj] Error 1
This is the classic MinGW build, which uses MinGW's own SDK and defaults to _WIN32_WINNT = 0x500.
The output clearly says "-- Looking for freeaddrinfo - not found", so we shouldn't try to use it. I haven't investigated yet what broke it.
set HAVE_GETADDRINFO? The autotools builds correctly determines it to be unavailable, and I currently don't have a CMake setup usable with classic MinGW 😕
(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?)
Reacted by Marcel Raad, Jay Satiro and Marc Hörsken
changed the title [-]curl_addrinfo.c error: 'getaddrinfo' undeclared in Visual Studio 2022 CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in MSYS-classic CI builds[/+]on Aug 30, 2022
changed the title [-]curl_addrinfo.c error: 'getaddrinfo' undeclared in MSYS-classic CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in legacy MinGW CI builds[/+]on Aug 30, 2022
changed the title [-]curl_addrinfo.c error: 'getaddrinfo' undeclared in legacy MinGW CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in old-MinGW CI builds[/+]on Aug 30, 2022
Activity
gvanem commentedon Jul 27, 2022
Looks like a
_WIN32_WINNT >= 0x0602is not set on AppVeyor. But I fail to understand which SDK is used and how CMake uses it.Edit. From the above log, it seems to use the old SDK under
C:\Program Files\Microsoft SDKs\Windows\v7.1.mback2k commentedon Aug 15, 2022
Ping @MarcelRaad
MarcelRaad commentedon Aug 15, 2022
This is the classic MinGW build, which uses MinGW's own SDK and defaults to
_WIN32_WINNT = 0x500.The output clearly says "-- Looking for freeaddrinfo - not found", so we shouldn't try to use it. I haven't investigated yet what broke it.
MarcelRaad commentedon Aug 15, 2022
8ba22ff removed forcing
_WIN32_WINNTto0x501, which previously madegetaddrinfoandfreeaddrinfoavailable for classic MinGW.But why does
curl/CMakeLists.txt
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 😕vszakats commentedon Aug 15, 2022
@MarcelRaad: In
CMake/Platforms/WindowsCache.cmakethere is this: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?)
appveyor: remove permafailing CI build
appveyor: pass target windows version to MSVS 2022 + cmake + msys build
[-]curl_addrinfo.c error: 'getaddrinfo' undeclared in Visual Studio 2022 CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in MSYS-classic CI builds[/+][-]curl_addrinfo.c error: 'getaddrinfo' undeclared in MSYS-classic CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in legacy MinGW CI builds[/+][-]curl_addrinfo.c error: 'getaddrinfo' undeclared in legacy MinGW CI builds[/-][+]curl_addrinfo.c error: 'getaddrinfo' undeclared in old-MinGW CI builds[/+]