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

libcurl/7.80.0: configure for x86_64-w64-mingw32 fails #13811

Closed
klausholstjacobsen opened this issue Oct 27, 2022 · 8 comments · Fixed by #13813
Closed

libcurl/7.80.0: configure for x86_64-w64-mingw32 fails #13811

klausholstjacobsen opened this issue Oct 27, 2022 · 8 comments · Fixed by #13813
Labels
bug Something isn't working

Comments

@klausholstjacobsen
Copy link
Contributor

klausholstjacobsen commented Oct 27, 2022

Description

Configure script fails with a very strange error message:

checking for clock_gettime in libraries... no additional lib required
checking for zlib.h... yes
checking for
                                      HAVE_LIBZ="1"
                   LIBS="-lz -lz -lssl -lcrypto -lcrypt32 -lws2_32 -ladvapi32 -luser32 -lbcrypt"
                    in -lz gzread... /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/src/configure: line 22781: ${ac_cv_lib_z_gzread_ ______________________________________HAVE_LIBZ_1 ___________________LIBS__lz _lz _lssl _lcrypto _lcrypt32 _lws2_32 _ladvapi32 _luser32 _lbcrypt ___________________+y}: bad substitution
libcurl/7.80.0:
libcurl/7.80.0: ERROR: Package '547ffbe7e14ed535b76e2a9c28a3ce86866a7119' build failed
libcurl/7.80.0: WARN: Build folder /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release
ERROR: libcurl/7.80.0: Error in build() method, line 260
        autotools.configure()
        ConanException: Error 1 while executing "/home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--with-libidn2=no' '--with-librtmp=no' '--with-libpsl=no' '--with-schannel=no' '--with-secure-transport=no' '--with-brotli=no' '--enable-shared=no' '--enable-static=yes' '--enable-dict=yes' '--enable-file=yes' '--enable-ftp=yes' '--enable-gopher=yes' '--enable-http=yes' '--enable-imap=yes' '--enable-ldap=no' '--enable-mqtt=yes' '--enable-pop3=yes' '--enable-rtsp=yes' '--enable-smb=yes' '--enable-smtp=yes' '--enable-telnet=yes' '--enable-tftp=yes' '--enable-debug=no' '--enable-ares=no' '--enable-threaded-resolver=yes' '--enable-cookies=yes' '--enable-ipv6=yes' '--enable-manual=no' '--enable-verbose=yes' '--enable-symbol-hiding=no' '--enable-unix-sockets=no' '--with-ssl=/home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e' '--without-wolfssl' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14' '--with-zstd=no' '--host=x86_64-w64-mingw32' '--build=x86_64-linux-gnu'
CMake Error at Build/BuildSystem/conan.cmake:655 (message):
  Conan install failed='1'

If I however download the sources and run the exact same configure command (with CC, CXX...env variables set-up) manually it works flawless.
It worked without changes a few weeks ago.

Package and Environment Details

libcurl/7.80.0
WSL ubuntu 20.04
mingw64 11.2.0
Conan 1.52.0

Conan profile

build profile:

[settings]
os=Linux
arch=x86_64
build_type=Release

compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11

[env]

[tool_requires]
x86_64-pc-linux-gnu/0.0.3

host profile:

[settings]
os=Windows
arch=x86_64
compiler=gcc
compiler.version=11.2
compiler.libcxx=libstdc++11
build_type=Release

[tool_requires]
x86_64-w64-mingw32/0.0.2

x86_64-w64-mingw32/0.0.2 package recipe:

from conans import ConanFile, tools
import os

class x86_64_w64_mingw32Conan(ConanFile):
    name = "x86_64-w64-mingw32"
    settings = "os", "arch", "build_type"
    description = "mingw GCC toolchain package for building to windows"
    url = "None"
    license = "None"
    author = "Me"
    topics = None

    def source(self):
        user = tools.get_env("ARTIFACTORY_USER_NAME", environment=os.environ)
        password = tools.get_env("ARTIFACTORY_PASSWORD")
        tools.get(**self.conan_data["sources"][self.version], auth=(user, password))

    def package(self):
        self.copy("*", symlinks=True)

    def package_info(self):
        triplet = "x86_64-w64-mingw32"
        path = os.path.join(self.package_folder, triplet)
        sysroot  = os.path.join(path, triplet, "sysroot")

        self.env_info.CC       = os.path.join(path, "bin/{}-gcc".format(triplet))
        self.env_info.CXX      = os.path.join(path, "bin/{}-g++".format(triplet))
        self.env_info.WINDRES  = os.path.join(path, "bin/{}-windres".format(triplet))
        self.env_info.LD       = os.path.join(path, "bin/{}-ld".format(triplet))
        self.env_info.RANLIB   = os.path.join(path, "bin/{}-ranlib".format(triplet))
        self.env_info.NM       = os.path.join(path, "bin/{}-nm".format(triplet))
        self.env_info.AR       = os.path.join(path, "bin/{}-ar".format(triplet))
        self.env_info.STRIP    = os.path.join(path, "bin/{}-strip".format(triplet))
        self.env_info.OBJDUMP  = os.path.join(path, "bin/{}-objdump".format(triplet))
        #Do not add toolchain bin dir to path. It may cause tools like autom4te to fail

        self.env_info.SYSROOT = sysroot

        if self.settings.build_type == "Debug":
            self.env_info.CFLAGS   = "-std=gnu11 -O0 -ggdb -Wall"
            self.env_info.CXXFLAGS = "-std=c++14 -O0 -ggdb -Wall"
        else:
            self.env_info.CFLAGS   = "-std=gnu11 -s -Os -Wall"
            self.env_info.CXXFLAGS = "-std=c++14 -s -Os -Wall"

Steps to reproduce

conan install -r conancenter foobar/0.1.0@ -pr:b=default -pr:h=default

Logs

configure output from working manual run:

CC=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc CXX=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-g++ WINDRES=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-windres LD=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld RANLIB=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ranlib NM=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm AR=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar STRIP=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-strip OBJDUMP=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-objdump SYSROOT=/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/x86_64-w64-mingw32/sysroot CFLAGS="-std=gnu11 -O0 -ggdb -Wall" CXXFLAGS="-std=c++14 -O0 -ggdb -Wall" ./configure '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--with-libidn2=no' '--with-librtmp=no' '--with-libpsl=no' '--with-schannel=no' '--with-secure-transport=no' '--with-brotli=no' '--enable-shared=no' '--enable-static=yes' '--enable-dict=yes' '--enable-file=yes' '--enable-ftp=yes' '--enable-gopher=yes' '--enable-http=yes' '--enable-imap=yes' '--enable-ldap=no' '--enable-mqtt=yes' '--enable-pop3=yes' '--enable-rtsp=yes' '--enable-smb=yes' '--enable-smtp=yes' '--enable-telnet=yes' '--enable-tftp=yes' '--enable-debug=no' '--enable-ares=no' '--enable-threaded-resolver=yes' '--enable-cookies=yes' '--enable-ipv6=yes' '--enable-manual=no' '--enable-verbose=yes' '--enable-symbol-hiding=no' '--enable-unix-sockets=no' '--with-ssl=/home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e' '--without-wolfssl' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14' '--with-zstd=no' '--host=x86_64-w64-mingw32' '--build=x86_64-linux-gnu'
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... no
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable ECH support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-w64-mingw32-gcc... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc accepts -g... yes
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc option to enable C11 features... none needed
checking whether /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking how to run the C preprocessor... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc -E
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc... gcc3
checking curl version... 7.80.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... yes
checking if _REENTRANT is onwards defined... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld
checking if the linker (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm
checking the name lister (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-w64-mingw32 format... func_convert_file_nix_to_w32
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld option to reload object files... -r
checking for x86_64-w64-mingw32-objdump... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ranlib
checking command to parse /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm output from /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for x86_64-w64-mingw32-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for x86_64-w64-mingw32-as... x86_64-w64-mingw32-as
checking for x86_64-w64-mingw32-dlltool... (cached) x86_64-w64-mingw32-dlltool
checking for x86_64-w64-mingw32-objdump... (cached) /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-objdump
checking for objdir... .libs
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc static flag -static works... yes
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc linker (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... yes
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... no
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for inline... inline
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking if compiler is LCC... no
checking if compiler is SGI MIPSpro C... no
checking if compiler is SGI MIPS C... no
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking if compiler is Watcom C... no
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration
checking if compiler optimizer assumed setting might be used... no
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers -Wenum-conversion
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking if MinGW minimum supported OS should be set to XP... no
checking for windows.h... yes
checking whether build target is a native Windows one... yes
checking for winsock2.h... yes
checking for ws2tcpip.h... yes
checking for wincrypt.h... yes
checking for winldap.h... yes
checking for winber.h... yes
checking whether build target supports WIN32 file API... yes (large file enabled)
checking whether build target supports WIN32 crypto API... yes
checking for good-to-use Darwin CFLAGS... no
checking whether to link macOS CoreFoundation and SystemConfiguration framework... no
checking to see if the compiler supports __builtin_available()... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... no
checking whether to support ldaps... no
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to support mqtt... yes
checking whether to provide built-in manual... no
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lsocket... no
checking for gethostbyname in -lwatt... no
checking for gethostbyname with both nsl and socket libs... no
checking for gethostbyname in -lws2_32... yes
checking for windows.h... (cached) yes
checking for winsock2.h... (cached) yes
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking for zlib.h... yes
checking for gzread in -lz... yes
configure: found both libz and libz.h header
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... no
configure: WARNING: the previous check could not be made default was used
checking if GSS-API support is requested... no
checking whether to enable Windows native SSL/TLS... no
checking whether to enable Secure Transport... no
checking whether to enable Amiga native SSL/TLS (AmiSSL)... no
checking for gdi32... yes
checking for HMAC_Update in -lcrypto... yes
checking for SSL_connect in -lssl... yes
checking for openssl/x509.h... yes
checking for openssl/rsa.h... yes
checking for openssl/crypto.h... yes
checking for openssl/pem.h... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for RAND_egd... no
checking for SSLv2_client_method... no
checking for OpenSSL_version... yes
checking for BoringSSL... no
checking for libressl... no
checking for OpenSSL >= v3... no
checking for OpenSSL headers version... 1.1.1 - 0x111
checking for OpenSSL library version... 1.1.1
checking for OpenSSL headers and library versions matching... yes
configure: WARNING: skipped the /dev/urandom detection when cross-compiling
checking for SRP_Calc_client_key in -lcrypto... yes
configure: built with one SSL backend
checking default CA cert bundle/path... configure: WARNING: skipped the ca-cert path detection when cross-compiling
no
checking whether to use builtin CA store of SSL library... no
checking for library containing gsasl_init... no
configure: WARNING: libgsasl was not found
checking whether versioned symbols are wanted... no
checking whether to enable Windows native IDN (Windows native builds only)... no
checking whether to build with libidn2... no
checking for x86_64-w64-mingw32-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking for libngtcp2 options with pkg-config... no
checking for x86_64-w64-mingw32-pkg-config... no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for fish options with pkg-config... no
checking for malloc.h... yes
checking for memory.h... no
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/select.h... no
checking for sys/socket.h... no
checking for sys/ioctl.h... no
checking for sys/uio.h... no
checking for assert.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for arpa/inet.h... no
checking for net/if.h... no
checking for netinet/in.h... no
checking for netinet/in6.h... no
checking for sys/un.h... no
checking for linux/tcp.h... no
checking for netinet/tcp.h... no
checking for netdb.h... no
checking for sys/sockio.h... no
checking for sys/stat.h... (cached) yes
checking for sys/param.h... yes
checking for termios.h... no
checking for termio.h... no
checking for fcntl.h... yes
checking for alloca.h... no
checking for io.h... yes
checking for pwd.h... no
checking for utime.h... yes
checking for sys/utime.h... yes
checking for sys/poll.h... no
checking for poll.h... no
checking for socket.h... no
checking for sys/resource.h... no
checking for libgen.h... yes
checking for locale.h... yes
checking for errno.h... yes
checking for stdbool.h... yes
checking for arpa/tftp.h... no
checking for sys/filio.h... no
checking for sys/wait.h... no
checking for setjmp.h... yes
checking for an ANSI C-conforming const... yes
checking for compiler support of C99 variadic macro style... yes
checking for compiler support of old gcc variadic macro style... yes
checking for size_t... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for struct timeval... yes
checking size of size_t... 8
checking size of long... 4
checking size of int... 4
checking size of short... 2
checking size of time_t... 8
checking size of off_t... 8
checking size of curl_off_t... 8
checking for long long... yes
checking if numberLL works... yes
checking for ssize_t... yes
checking for bool... yes
checking for sa_family_t... no
checking for ADDRESS_FAMILY... no
checking for suseconds_t... no
checking if time_t is unsigned... no
checking for sys/types.h... (cached) yes
checking for poll.h... (cached) no
checking for sys/poll.h... (cached) no
checking for in_addr_t... no
checking for in_addr_t equivalent... unsigned long
checking for struct sockaddr_storage... yes
checking for sys/select.h... (cached) no
checking for sys/socket.h... (cached) no
checking for select... yes
checking types of args and return type for select... int,fd_set *,struct timeval *,int
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for recv... yes
checking types of args and return type for recv... SOCKET,char *,int,int,int
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for send... yes
checking types of args and return type for send... SOCKET,const char *,int,int,int
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for MSG_NOSIGNAL... no
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking if alarm can be linked... yes
checking if alarm is prototyped... no
checking if alarm might be used... no
checking for sys/types.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for libgen.h... (cached) yes
checking if basename can be linked... yes
checking if basename is prototyped... yes
checking if basename is compilable... yes
checking if basename usage allowed... yes
checking if basename might be used... yes
checking for sys/types.h... (cached) yes
checking for socket.h... (cached) no
checking if closesocket can be linked... yes
checking if closesocket is prototyped... yes
checking if closesocket is compilable... yes
checking if closesocket usage allowed... yes
checking if closesocket might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking if CloseSocket can be linked... no
checking if CloseSocket might be used... no
checking if connect can be linked... yes
checking if connect is prototyped... yes
checking if connect is compilable... yes
checking if connect usage allowed... yes
checking if connect might be used... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for fcntl.h... (cached) yes
checking if fcntl can be linked... no
checking if fcntl might be used... no
checking for windows.h... (cached) yes
checking for winsock2.h... (cached) yes
checking for ws2tcpip.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for netdb.h... (cached) no
checking if freeaddrinfo can be linked... yes
checking if freeaddrinfo is prototyped... yes
checking if freeaddrinfo is compilable... yes
checking if freeaddrinfo usage allowed... yes
checking if freeaddrinfo might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/xattr.h... no
checking if fsetxattr can be linked... no
checking if fsetxattr might be used... no
checking if ftruncate can be linked... yes
checking if ftruncate is prototyped... yes
checking if ftruncate is compilable... yes
checking if ftruncate usage allowed... yes
checking if ftruncate might be used... yes
checking for sys/types.h... (cached) yes
checking for stdlib.h... (cached) yes
checking if getaddrinfo can be linked... yes
checking if getaddrinfo is prototyped... yes
checking if getaddrinfo is compilable... yes
checking if getaddrinfo usage allowed... yes
checking if getaddrinfo might be used... yes
checking if getaddrinfo is threadsafe... yes
checking if gethostbyname can be linked... yes
checking if gethostbyname is prototyped... yes
checking if gethostbyname is compilable... yes
checking if gethostbyname usage allowed... yes
checking if gethostbyname might be used... yes
checking if gethostbyname_r can be linked... no
checking if gethostbyname_r might be used... no
checking if gethostname can be linked... yes
checking if gethostname is prototyped... yes
checking if gethostname is compilable... yes
checking for gethostname arg 2 data type... int
checking if gethostname usage allowed... yes
checking if gethostname might be used... yes
checking if getpeername can be linked... yes
checking if getpeername is prototyped... yes
checking if getpeername is compilable... yes
checking if getpeername usage allowed... yes
checking if getpeername might be used... yes
checking if getsockname can be linked... yes
checking if getsockname is prototyped... yes
checking if getsockname is compilable... yes
checking if getsockname usage allowed... yes
checking if getsockname might be used... yes
checking for net/if.h... (cached) no
checking if if_nametoindex can be linked... no
checking if if_nametoindex might be used... no
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for netinet/in.h... (cached) no
checking for ifaddrs.h... no
checking if getifaddrs can be linked... no
checking if getifaddrs might be used... no
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking if gmtime_r can be linked... no
checking if gmtime_r might be used... no
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for netinet/in.h... (cached) no
checking for arpa/inet.h... (cached) no
checking if inet_ntop can be linked... yes
checking if inet_ntop is prototyped... yes
checking if inet_ntop is compilable... yes
checking if inet_ntop usage allowed... yes
checking if inet_ntop might be used... yes
checking if inet_pton can be linked... yes
checking if inet_pton is prototyped... yes
checking if inet_pton is compilable... yes
checking if inet_pton usage allowed... yes
checking if inet_pton might be used... yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/socket.h... (cached) no
checking for sys/ioctl.h... (cached) no
checking for stropts.h... no
checking if ioctl can be linked... no
checking if ioctl might be used... no
checking if ioctlsocket can be linked... yes
checking if ioctlsocket is prototyped... yes
checking if ioctlsocket is compilable... yes
checking if ioctlsocket usage allowed... yes
checking if ioctlsocket might be used... yes
checking if ioctlsocket FIONBIO is compilable... yes
checking if ioctlsocket FIONBIO usage allowed... yes
checking if ioctlsocket FIONBIO might be used... yes
checking if IoctlSocket can be linked... no
checking if IoctlSocket might be used... no
checking if localtime_r can be linked... no
checking if localtime_r might be used... no
checking if memrchr can be linked... no
checking if memrchr seems a macro... no
checking if memrchr might be used... no
checking if poll can be linked... no
checking if poll might be used... no
checking if setsockopt can be linked... yes
checking if setsockopt is prototyped... yes
checking if setsockopt is compilable... yes
checking if setsockopt usage allowed... yes
checking if setsockopt might be used... yes
checking if setsockopt SO_NONBLOCK is compilable... no
checking if setsockopt SO_NONBLOCK might be used... no
checking for sys/types.h... (cached) yes
checking for signal.h... yes
checking if sigaction can be linked... no
checking if sigaction might be used... no
checking if siginterrupt can be linked... no
checking if siginterrupt might be used... no
checking if signal can be linked... yes
checking if signal is prototyped... yes
checking if signal is compilable... yes
checking if signal usage allowed... yes
checking if signal might be used... yes
checking for sys/types.h... (cached) yes
checking for setjmp.h... (cached) yes
checking if sigsetjmp can be linked... no
checking if sigsetjmp seems a macro... no
checking if sigsetjmp might be used... no
checking if socket can be linked... yes
checking if socket is prototyped... yes
checking if socket is compilable... yes
checking if socket usage allowed... yes
checking if socket might be used... yes
checking if socketpair can be linked... no
checking if socketpair might be used... no
checking if strcasecmp can be linked... yes
checking if strcasecmp is prototyped... yes
checking if strcasecmp is compilable... yes
checking if strcasecmp usage allowed... yes
checking if strcasecmp might be used... yes
checking if strcmpi can be linked... yes
checking if strcmpi is prototyped... yes
checking if strcmpi is compilable... yes
checking if strcmpi usage allowed... yes
checking if strcmpi might be used... yes
checking if strdup can be linked... yes
checking if strdup is prototyped... yes
checking if strdup is compilable... yes
checking if strdup usage allowed... yes
checking if strdup might be used... yes
checking if strerror_r can be linked... no
checking if strerror_r might be used... no
checking if stricmp can be linked... yes
checking if stricmp is prototyped... yes
checking if stricmp is compilable... yes
checking if stricmp usage allowed... yes
checking if stricmp might be used... yes
checking if strncmpi can be linked... no
checking if strncmpi might be used... no
checking if strnicmp can be linked... yes
checking if strnicmp is prototyped... yes
checking if strnicmp is compilable... no
checking if strnicmp might be used... no
checking if strstr can be linked... yes
checking if strstr is prototyped... yes
checking if strstr is compilable... yes
checking if strstr usage allowed... yes
checking if strstr might be used... yes
checking if strtok_r can be linked... yes
checking if strtok_r is prototyped... yes
checking if strtok_r is compilable... yes
checking if strtok_r usage allowed... yes
checking if strtok_r might be used... yes
checking if strtoll can be linked... yes
checking if strtoll is prototyped... yes
checking if strtoll is compilable... yes
checking if strtoll usage allowed... yes
checking if strtoll might be used... yes
checking for sys/types.h... (cached) yes
checking for sys/uio.h... (cached) no
checking if writev can be linked... no
checking if writev might be used... no
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc options needed to detect all undeclared functions... none needed
checking whether getpwuid_r is declared... no
checking for fnmatch... no
checking deeper for fnmatch... but still no
checking for geteuid... no
checking deeper for geteuid... but still no
checking for getpass_r... no
checking deeper for getpass_r... but still no
checking for getppid... no
checking deeper for getppid... but still no
checking for getpwuid... no
checking deeper for getpwuid... but still no
checking for getpwuid_r... no
checking deeper for getpwuid_r... but still no
checking for getrlimit... no
checking deeper for getrlimit... but still no
checking for gettimeofday... yes
checking for if_nametoindex... no
checking deeper for if_nametoindex... but still no
checking for mach_absolute_time... no
checking deeper for mach_absolute_time... but still no
checking for pipe... no
checking deeper for pipe... but still no
checking for setlocale... yes
checking for setmode... yes
checking for setrlimit... no
checking deeper for setrlimit... but still no
checking for usleep... yes
checking for utime... yes
checking for utimes... no
checking deeper for utimes... but still no
checking how to set a socket into non-blocking mode... ioctlsocket FIONBIO
checking for perl... /usr/bin/perl
checking for gnroff... no
checking for nroff... /usr/bin/nroff
checking how to use *nroff to get plain text from man pages... -man
checking whether to enable the threaded resolver... yes
checking whether to use POSIX threads for threaded resolver... auto
checking for pthread.h... yes
checking for pthread_create... yes
checking convert -I options to -isystem... yes
checking whether to enable verbose strings... yes
checking whether to enable SSPI support (Windows native builds only)... no
checking whether to enable cryptographic authentication methods... yes
checking whether to support NTLM... yes
checking whether to enable NTLM delegation to winbind's helper... no
checking whether to enable TLS-SRP authentication... yes
checking whether to enable Unix domain sockets... no
checking whether to support cookies... yes
checking whether to support socketpair... yes
checking whether to support HTTP authentication... yes
checking whether to support DoH... yes
checking whether to support the MIME API... yes
checking whether to support date parsing... yes
checking whether to support netrc parsing... yes
checking whether to support progress-meter... yes
checking whether to support DNS shuffling... yes
checking whether to support curl_easy_option*... yes
checking whether to support alt-svc... no
checking whether to support HSTS... yes
checking whether hiding of library internal symbols will actually happen... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/examples/Makefile
config.status: creating docs/libcurl/Makefile
config.status: creating docs/libcurl/opts/Makefile
config.status: creating docs/cmdline-opts/Makefile
config.status: creating include/Makefile
config.status: creating include/curl/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating scripts/Makefile
config.status: creating lib/libcurl.vers
config.status: creating tests/Makefile
config.status: creating tests/certs/Makefile
config.status: creating tests/certs/scripts/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating tests/unit/Makefile
config.status: creating packages/Makefile
config.status: creating packages/vms/Makefile
config.status: creating curl-config
config.status: creating libcurl.pc
config.status: creating lib/curl_config.h
config.status: lib/curl_config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
configure: amending lib/Makefile
configure: amending src/Makefile
configure: amending tests/unit/Makefile
configure: amending tests/server/Makefile
configure: amending tests/libtest/Makefile
configure: amending docs/examples/Makefile
configure: Configured to build curl/libcurl:

  Host setup:       x86_64-w64-mingw32
  Install prefix:   /
  Compiler:         /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc
   CFLAGS:          -std=gnu11 -O0 -ggdb -Wall -Werror-implicit-function-declaration -Wno-system-headers -Wenum-conversion
   CPPFLAGS:        -isystem /home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/include -isystem /home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e/include -isystem /home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e/include/openssl
   LDFLAGS:         -L/home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14/lib -L/home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e/lib
   LIBS:            -ladvapi32 -lcrypt32 -lssl -lcrypto -lgdi32 -lz -lws2_32

  curl version:     7.80.0
  SSL:              enabled (OpenSSL)
  SSH:              no      (--with-{libssh,libssh2})
  zlib:             enabled
  brotli:           no      (--with-brotli)
  zstd:             no      (--with-zstd)
  GSS-API:          no      (--with-gssapi)
  GSASL:            no      (libgsasl not found)
  TLS-SRP:          enabled
  resolver:         POSIX threaded
  IPv6:             enabled
  Unix sockets:     no      (--enable-unix-sockets)
  IDN:              no      (--with-{libidn2,winidn})
  Build libcurl:    Shared=no, Static=yes
  Built-in manual:  no      (--enable-manual)
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  Code coverage:    disabled
  SSPI:             no      (--enable-sspi)
  ca cert bundle:   no
  ca cert path:     no
  ca fallback:      no
  LDAP:             no      (--enable-ldap / --with-ldap-lib / --with-lber-lib)
  LDAPS:            no      (--enable-ldaps)
  RTSP:             enabled
  RTMP:             no      (--with-librtmp)
  PSL:              no      (--with-libpsl)
  Alt-svc:          enabled (--disable-alt-svc)
  HSTS:             enabled (--disable-hsts)
  HTTP1:            enabled (internal)
  HTTP2:            no      (--with-nghttp2, --with-hyper)
  HTTP3:            no      (--with-ngtcp2, --with-quiche)
  ECH:              no      (--enable-ech)
  Protocols:        DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP
  Features:         AsynchDNS HSTS HTTPS-proxy IPv6 Largefile NTLM SSL TLS-SRP alt-svc libz

configure output from bad conan run:

libcurl/7.80.0: Applying build-requirement: x86_64-w64-mingw32/0.0.2@sics/stable
libcurl/7.80.0: Applying build-requirement: libtool/2.4.6
libcurl/7.80.0: Applying build-requirement: pkgconf/1.7.4
libcurl/7.80.0: Applying build-requirement: automake/1.16.5
libcurl/7.80.0: Applying build-requirement: autoconf/2.71
libcurl/7.80.0: Applying build-requirement: m4/1.4.19
Downloading conan_sources.tgz
libcurl/7.80.0: Configuring sources in /home/khj/.conan/data/libcurl/7.80.0/_/_/source/src
libcurl/7.80.0:
libcurl/7.80.0:
libcurl/7.80.0: Copying sources to build folder
libcurl/7.80.0: Building your package in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119
libcurl/7.80.0: Generator txt created conanbuildinfo.txt
libcurl/7.80.0: Calling generate()
libcurl/7.80.0: Aggregating env generators
libcurl/7.80.0: Calling build()
libcurl/7.80.0: apply_conandata_patches(): No patches defined in conandata
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanautotoolstoolchain.sh
Configuring environment variables
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanautotoolsdeps.sh
Configuring environment variables
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanbuildenv-release-x86_64.sh
Configuring environment variables
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Remember to add 'LT_INIT' to configure.ac.
configure.ac:120: installing './compile'
configure.ac:125: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
libcurl/7.80.0: Calling:
 > "/home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--with-libidn2=no' '--with-librtmp=no' '--with-libpsl=no' '--with-schannel=no' '--with-secure-transport=no' '--with-brotli=no' '--enable-shared=no' '--enable-static=yes' '--enable-dict=yes' '--enable-file=yes' '--enable-ftp=yes' '--enable-gopher=yes' '--enable-http=yes' '--enable-imap=yes' '--enable-ldap=no' '--enable-mqtt=yes' '--enable-pop3=yes' '--enable-rtsp=yes' '--enable-smb=yes' '--enable-smtp=yes' '--enable-telnet=yes' '--enable-tftp=yes' '--enable-debug=no' '--enable-ares=no' '--enable-threaded-resolver=yes' '--enable-cookies=yes' '--enable-ipv6=yes' '--enable-manual=no' '--enable-verbose=yes' '--enable-symbol-hiding=no' '--enable-unix-sockets=no' '--with-ssl=/home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e' '--without-wolfssl' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14' '--with-zstd=no' '--host=x86_64-w64-mingw32' '--build=x86_64-linux-gnu'
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanautotoolstoolchain.sh
Configuring environment variables
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanautotoolsdeps.sh
Configuring environment variables
Capturing current environment in /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release/conan/deactivate_conanbuildenv-release-x86_64.sh
Configuring environment variables
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... no
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable ECH support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a BSD-compatible install... /usr/bin/install -c
checking for x86_64-w64-mingw32-gcc... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc accepts -g... yes
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc option to enable C11 features... none needed
checking whether /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc understands -c and -o together... yes
checking how to run the C preprocessor... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc -E
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-strip
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc... gcc3
checking curl version... 7.80.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... yes
checking if _REENTRANT is onwards defined... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld
checking if the linker (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm
checking the name lister (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-w64-mingw32 format... func_convert_file_nix_to_w32
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld option to reload object files... -r
checking for x86_64-w64-mingw32-objdump... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-objdump
checking how to recognize dependent libraries... pass_all
checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for x86_64-w64-mingw32-ar... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ar
checking for archiver @FILE support... @
checking for x86_64-w64-mingw32-strip... (cached) /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-strip
checking for x86_64-w64-mingw32-ranlib... /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ranlib
checking command to parse /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-nm output from /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for x86_64-w64-mingw32-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for x86_64-w64-mingw32-as... x86_64-w64-mingw32-as
checking for x86_64-w64-mingw32-dlltool... (cached) x86_64-w64-mingw32-dlltool
checking for x86_64-w64-mingw32-objdump... (cached) /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-objdump
checking for objdir... .libs
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no
checking for /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc static flag -static works... no
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... yes
checking if /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes
checking whether the /home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-gcc linker (/home/khj/.conan/data/x86_64-w64-mingw32/0.0.2/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/x86_64-w64-mingw32/bin/x86_64-w64-mingw32-ld) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... yes
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... no
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for inline... inline
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking if compiler is LCC... no
checking if compiler is SGI MIPSpro C... no
checking if compiler is SGI MIPS C... no
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking if compiler is Watcom C... no
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration
checking if compiler optimizer assumed setting might be used... no
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers -Wenum-conversion
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking if MinGW minimum supported OS should be set to XP... no
checking for windows.h... yes
checking whether build target is a native Windows one... yes
checking for winsock2.h... yes
checking for ws2tcpip.h... yes
checking for wincrypt.h... yes
checking for winldap.h... yes
checking for winber.h... yes
checking whether build target supports WIN32 file API... yes (large file enabled)
checking whether build target supports WIN32 crypto API... yes
checking for good-to-use Darwin CFLAGS... no
checking whether to link macOS CoreFoundation and SystemConfiguration framework... no
checking to see if the compiler supports __builtin_available()... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... no
checking whether to support ldaps... no
checking whether to support rtsp... yes
checking whether to support proxies... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to support pop3... yes
checking whether to support imap... yes
checking whether to support smb... yes
checking whether to support smtp... yes
checking whether to support gopher... yes
checking whether to support mqtt... yes
checking whether to provide built-in manual... no
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... yes
checking for windows.h... (cached) yes
checking for winsock2.h... (cached) yes
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking for zlib.h... yes
checking for
                                      HAVE_LIBZ="1"
                   LIBS="-lz -lz -lssl -lcrypto -lcrypt32 -lws2_32 -ladvapi32 -luser32 -lbcrypt"
                    in -lz gzread... /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/src/configure: line 22781: ${ac_cv_lib_z_gzread_ ______________________________________HAVE_LIBZ_1 ___________________LIBS__lz _lz _lssl _lcrypto _lcrypt32 _lws2_32 _ladvapi32 _luser32 _lbcrypt ___________________+y}: bad substitution
libcurl/7.80.0:
libcurl/7.80.0: ERROR: Package '547ffbe7e14ed535b76e2a9c28a3ce86866a7119' build failed
libcurl/7.80.0: WARN: Build folder /home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/build-release
ERROR: libcurl/7.80.0: Error in build() method, line 260
        autotools.configure()
        ConanException: Error 1 while executing "/home/khj/.conan/data/libcurl/7.80.0/_/_/build/547ffbe7e14ed535b76e2a9c28a3ce86866a7119/src/configure" '--disable-shared' '--enable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--with-libidn2=no' '--with-librtmp=no' '--with-libpsl=no' '--with-schannel=no' '--with-secure-transport=no' '--with-brotli=no' '--enable-shared=no' '--enable-static=yes' '--enable-dict=yes' '--enable-file=yes' '--enable-ftp=yes' '--enable-gopher=yes' '--enable-http=yes' '--enable-imap=yes' '--enable-ldap=no' '--enable-mqtt=yes' '--enable-pop3=yes' '--enable-rtsp=yes' '--enable-smb=yes' '--enable-smtp=yes' '--enable-telnet=yes' '--enable-tftp=yes' '--enable-debug=no' '--enable-ares=no' '--enable-threaded-resolver=yes' '--enable-cookies=yes' '--enable-ipv6=yes' '--enable-manual=no' '--enable-verbose=yes' '--enable-symbol-hiding=no' '--enable-unix-sockets=no' '--with-ssl=/home/khj/.conan/data/openssl/1.1.1q/_/_/package/4f55a49af85755fb6ab063f1e3e2e851f3cedf0e' '--without-wolfssl' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/khj/.conan/data/zlib/1.2.13/_/_/package/d846067d59c3b90a9880f5caaf4b040d4f30bf14' '--with-zstd=no' '--host=x86_64-w64-mingw32' '--build=x86_64-linux-gnu'
CMake Error at Build/BuildSystem/conan.cmake:655 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  Build/BuildSystem/build-system.cmake:17 (conan_cmake_install)
  CMakeLists.txt:4 (include)
@klausholstjacobsen klausholstjacobsen added the bug Something isn't working label Oct 27, 2022
@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 27, 2022

It might be a regression coming from a typo in #12956. Could you try to replace f"AC_CHECK_LIB({zlib_name}" by f"AC_CHECK_LIB({zlib_name}," and f"-l{zlib_name}" by f"-l{zlib_name} "?

@SpaceIm SpaceIm mentioned this issue Oct 27, 2022
4 tasks
@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 27, 2022

Could you try #13813 please?

@klausholstjacobsen
Copy link
Contributor Author

I'd love to, but how to I address that particular commit of the recipe from my consumer recipe?

@klausholstjacobsen
Copy link
Contributor Author

I've tried changing configure.ac manually. It works!

@klausholstjacobsen
Copy link
Contributor Author

klausholstjacobsen commented Oct 28, 2022

It doesn't quite work.
x86_64-w64-mingw32 works. Tried with i686-w64-mingw32, it does not work.

Downloaded the new recipe from your branch and used it locally with i686-w64-mingw32.
It fails to find gethostbyname.

configure.log from failed attempt with conan:

checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lsocket... no
checking for gethostbyname in -lwatt... no
checking for gethostbyname with both nsl and socket libs... no
checking for gethostbyname for Minix 3... no
checking for gethostbyname for eCos... no
checking for gethostbyname for AmigaOS bsdsocket.library... no
checking for gethostbyname in -lnetwork... no
checking for gethostbyname in -lnet... no
configure: error: couldn't find libraries for gethostbyname()
libcurl/7.80.0@sics/stable:
libcurl/7.80.0@sics/stable: ERROR: Package 'e69f78580fad22042032373514d2a8a591753112' build failed
libcurl/7.80.0@sics/stable: WARN: Build folder /home/khj/.conan/data/libcurl/7.80.0/sics/stable/build/e69f78580fad22042032373514d2a8a591753112/build-release
ERROR: libcurl/7.80.0@sics/stable: Error in build() method, line 251
        autotools.configure()
        ConanException: Error 1 while executing "/home/khj/.conan/data/libcurl/7.80.0/sics/stable/build/e69f78580fad22042032373514d2a8a591753112/src/configure" '--enable-shared' '--disable-static' '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--with-libidn2=no' '--with-librtmp=no' '--with-libpsl=no' '--with-schannel=no' '--with-secure-transport=no' '--with-brotli=no' '--enable-shared=yes' '--enable-static=no' '--enable-dict=yes' '--enable-file=yes' '--enable-ftp=yes' '--enable-gopher=yes' '--enable-http=yes' '--enable-imap=yes' '--enable-ldap=no' '--enable-mqtt=yes' '--enable-pop3=yes' '--enable-rtsp=yes' '--enable-smb=yes' '--enable-smtp=yes' '--enable-telnet=yes' '--enable-tftp=yes' '--enable-debug=no' '--enable-ares=no' '--enable-threaded-resolver=yes' '--enable-cookies=yes' '--enable-ipv6=yes' '--enable-manual=no' '--enable-verbose=yes' '--enable-symbol-hiding=no' '--enable-unix-sockets=no' '--with-ssl=/home/khj/.conan/data/openssl/1.1.1q/_/_/package/a597a098e5bb2a816a10c90ca15d47770a70f150' '--without-wolfssl' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/khj/.conan/data/zlib/1.2.13/_/_/package/29a77a972611865abc1975ab7f78af3bf56ad770' '--with-zstd=no' '--without-ca-bundle' '--without-ca-path' '--host=i686-w64-mingw32' '--build=x86_64-linux-gnu'

successful attempt with manually running configure:

checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lsocket... no
checking for gethostbyname in -lwatt... no
checking for gethostbyname with both nsl and socket libs... no
checking for gethostbyname in -lws2_32... yes

It appears that the regular configure script searches, and finds, gethostbyname in ws2_32. In the failed conan attempt is see no checking for gethostbyname in -lws2_32..., any ideas?

In the attempt to find gethostbyname the conan configure script does indeed try to link with ws2_32, but still fails to find the symbol:

configure:21793: checking for gethostbyname
configure:21793: /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/i686-w64-mingw32-gcc -o conftest.exe -std=gnu11 -s -Os -Wall --sysroot=/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/i686-w64-mingw32/sysroot -m32 -O3 -s -Werror-implicit-function-declaration -Wno-system-headers -Wenum-conversion -DNDEBUG -D_AMD64_ -I/home/khj/.conan/data/zlib/1.2.13/_/_/package/29a77a972611865abc1975ab7f78af3bf56ad770/include -I/home/khj/.conan/data/openssl/1.1.1q/_/_/package/a597a098e5bb2a816a10c90ca15d47770a70f150/include  -m32 -L/home/khj/.conan/data/zlib/1.2.13/_/_/package/29a77a972611865abc1975ab7f78af3bf56ad770/lib -L/home/khj/.conan/data/openssl/1.1.1q/_/_/package/a597a098e5bb2a816a10c90ca15d47770a70f150/lib conftest.c -lz -lssl -lcrypto -lcrypt32 -lws2_32 -ladvapi32 -luser32 -lbcrypt >&5
/tmp/ccLwACkw.o:conftest.c:(.text.startup+0xc): undefined reference to `gethostbyname'
collect2: error: ld returned 1 exit status

Here's the same gcc command from config.log for the successful manual attempt:

configure:21873: checking for gethostbyname in -lws2_32
configure:21899: /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/i686-w64-mingw32-gcc -o conftest.exe -std=gnu11 -O0 -ggdb -Wall -Werror-implicit-function-declaration -Wno-system-headers -Wenum-conversion   conftest.c -lws2_32  >&5
configure:21899: $? = 0
configure:21902: result: yes

@klausholstjacobsen
Copy link
Contributor Author

klausholstjacobsen commented Oct 28, 2022

Additional info:

the configure script will only check for gethostbyname specifically in ws2_32 if it finds windows.h.

The failed conan attempt says checking for windows.h... no, while the usccessful manual attempt says checking for windows.h... yes

Here's the failing check:

configure:20218: result: no
configure:20229: checking for windows.h
configure:20260: /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/i686-w64-mingw32-gcc -c -std=gnu11 -s -Os -Wall -m32 -O3 -s -Werror-implicit-function-declaration -Wno-system-headers -Wenum-conversion -DNDEBUG -D_AMD64_ -I/home/khj/.conan/data/zlib/1.2.12/_/_/package/29a77a972611865abc1975ab7f78af3bf56ad770/include -I/home/khj/.conan/data/openssl/1.1.1q/_/_/package/a597a098e5bb2a816a10c90ca15d47770a70f150/include conftest.c >&5
In file included from /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/minwindef.h:163,
                 from /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/windef.h:9,
                 from /home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/windows.h:69,
                 from conftest.c:34:
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:2382:20: error: redefinition of 'struct _CONTEXT'
 2382 |     typedef struct _CONTEXT {
      |                    ^~~~~~~~
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:1700:37: note: originally defined here
 1700 |   typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
      |                                     ^~~~~~~~
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:2409:7: error: conflicting types for 'CONTEXT'; have 'struct _CONTEXT'
 2409 |     } CONTEXT;
      |       ^~~~~~~
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:1770:5: note: previous declaration of 'CONTEXT' with type 'CONTEXT'
 1770 |   } CONTEXT,*PCONTEXT;
      |     ^~~~~~~
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:2411:22: error: conflicting types for 'PCONTEXT'; have 'CONTEXT *'
 2411 |     typedef CONTEXT *PCONTEXT;
      |                      ^~~~~~~~
/home/khj/.conan/data/i686-w64-mingw32/0.0.1/sics/stable/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/i686-w64-mingw32/bin/../i686-w64-mingw32/sysroot/mingw/include/winnt.h:1770:14: note: previous declaration of 'PCONTEXT' with type 'PCONTEXT' {aka 'struct _CONTEXT *'}
 1770 |   } CONTEXT,*PCONTEXT;
      |              ^~~~~~~~

My suspicion falls on -D_AMD64_, why would we define AMD64 in a 32 bit context?

@klausholstjacobsen
Copy link
Contributor Author

klausholstjacobsen commented Oct 28, 2022

Yup that was it.

In the recipe

        # tweaks for mingw
        if self._is_mingw:
            rcflags = "-O COFF"
            if self.settings.arch == "x86":
                rcflags += " --target=pe-i386"
            else:
                rcflags += " --target=pe-x86-64"
            env = tc.environment()
            env.define("RCFLAGS", rcflags)

            tc.extra_defines.append("_AMD64_")

should be....

        # tweaks for mingw
        if self._is_mingw:
            rcflags = "-O COFF"
            if self.settings.arch == "x86":
                rcflags += " --target=pe-i386"
            else:
                rcflags += " --target=pe-x86-64"
                tc.extra_defines.append("_AMD64_")
            
            env = tc.environment()
            env.define("RCFLAGS", rcflags)

moving tc.extra_defines.append("_AMD64_") to only be defined in 64bit context

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 28, 2022

I'll update PR with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants