conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
965 stars 1.77k forks source link

[package] <libcurl/7.69.1: Does not find openssl when building with mingw #1246

Closed KingKili closed 4 years ago

KingKili commented 4 years ago

Package and Environment Details (include every applicable attribute)

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

Configuration for profile default:

[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=9
os=Windows
os_build=Linux
[options]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

Download the CMakeLists.txt mkdir build && cd build mingw64-cmake ..

Logs (Include/Attach if Applicable)

Click to expand log ``` -- The C compiler identification is GNU 9.2.1 -- The CXX compiler identification is GNU 9.2.1 -- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- No build type specified, using Release -- Downloading conan.cmake from https://github.com/conan-io/cmake-conan -- Conan: Automatic detection of conan settings from cmake -- Conan: Settings= -s;build_type=Release;-s;compiler=gcc;-s;compiler.version=9;-s;compiler.libcxx=libstdc++11;-s;compiler.cppstd=20;-s;os=Windows -- Conan: checking conan executable -- Conan: Found program /home/kilian/.local/bin/conan -- Conan: Version found Conan version 1.23.0 -- Conan executing: /home/kilian/.local/bin/conan install . -s build_type=Release -s compiler=gcc -s compiler.version=9 -s compiler.libcxx=libstdc++11 -s compiler.cppstd=20 -s os=Windows -g=cmake --build=missing Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=9 os=Windows os_build=Linux [options] [build_requires] [env] conanfile.txt: Installing package Requirements libcurl/7.69.1 from 'conan-center' - Cache openssl/1.1.1e from 'conan-center' - Cache zlib/1.2.11 from 'conan-center' - Cache Packages libcurl/7.69.1:4131f7f8098d12c800fe7f2db2d7d5fd8d518585 - Build openssl/1.1.1e:8db833b4e0050c50e72e59c69d46aba173658ffa - Cache zlib/1.2.11:bd8676182f1db70e6be16a57c45604fb7a6b0978 - Cache Cross-build from 'Linux:x86_64' to 'Windows:x86_64' Installing (downloading, building) binaries... zlib/1.2.11: Already installed! openssl/1.1.1e: Already installed! libcurl/7.69.1: Copying sources to build folder libcurl/7.69.1: Building your package in /home/kilian/.conan/data/libcurl/7.69.1/_/_/build/4131f7f8098d12c800fe7f2db2d7d5fd8d518585 libcurl/7.69.1: Generator cmake created conanbuildinfo.cmake libcurl/7.69.1: Generator pkg_config created openssl.pc libcurl/7.69.1: Generator pkg_config created zlib.pc libcurl/7.69.1: Calling build() libcurl/7.69.1: Run vars: {'DYLD_LIBRARY_PATH': ['/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa/lib', '/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/lib'], 'LD_LIBRARY_PATH': ['/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa/lib', '/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/lib'], 'PATH': ['/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa/bin']} libcurl/7.69.1: Autotools env vars: {'CPPFLAGS': '-I/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa/include -I/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/include -DNDEBUG', 'CXXFLAGS': '-m64 -O3 -s', 'CFLAGS': '-m64 -O3 -s', 'LDFLAGS': '-m64 -L/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa/lib -L/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/lib', 'RCFLAGS': '-O COFF --target=pe-x86-64'} libcurl/7.69.1: Calling: > ./configure '--without-libidn2' '--without-librtmp' '--without-libmetalink' '--without-libpsl' '--without-brotli' '--with-ssl=/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/lib' '--disable-shared' '--enable-static' '--disable-ldap' '--prefix=/home/kilian/.conan/data/libcurl/7.69.1/_/_/package/4131f7f8098d12c800fe7f2db2d7d5fd8d518585' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --build=x86_64-linux-gnu --host=x86_64-w64-mingw32 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... yes checking whether to enable c-ares for DNS lookups... no checking whether to disable dependency on -lrt... (assumed no) checking whether to enable ESNI 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... /usr/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 we are using the GNU C compiler... yes checking whether /usr/bin/x86_64-w64-mingw32-gcc accepts -g... yes checking for /usr/bin/x86_64-w64-mingw32-gcc option to accept ISO C89... none needed checking whether /usr/bin/x86_64-w64-mingw32-gcc understands -c and -o together... yes checking how to run the C preprocessor... /usr/bin/x86_64-w64-mingw32-cpp 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... /usr/bin/x86_64-w64-mingw32-strip checking for a thread-safe 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 /usr/bin/x86_64-w64-mingw32-gcc... gcc3 checking curl version... 7.69.1 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 /usr/bin/x86_64-w64-mingw32-gcc... /usr/bin/x86_64-w64-mingw32-ld checking if the linker (/usr/bin/x86_64-w64-mingw32-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/x86_64-w64-mingw32-nm checking the name lister (/usr/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 /usr/bin/x86_64-w64-mingw32-ld option to reload object files... -r checking for x86_64-w64-mingw32-objdump... /usr/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... /usr/bin/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... /usr/bin/x86_64-w64-mingw32-ar checking for archiver @FILE support... @ checking for x86_64-w64-mingw32-strip... (cached) /usr/bin/x86_64-w64-mingw32-strip checking for x86_64-w64-mingw32-ranlib... /usr/bin/x86_64-w64-mingw32-ranlib checking command to parse /usr/bin/x86_64-w64-mingw32-nm output from /usr/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... no checking if : is a manifest tool... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... no checking for x86_64-w64-mingw32-as... /usr/bin/x86_64-w64-mingw32-as checking for x86_64-w64-mingw32-dlltool... (cached) /usr/bin/x86_64-w64-mingw32-dlltool checking for x86_64-w64-mingw32-objdump... (cached) /usr/bin/x86_64-w64-mingw32-objdump checking for objdir... .libs checking if /usr/bin/x86_64-w64-mingw32-gcc supports -fno-rtti -fno-exceptions... no checking for /usr/bin/x86_64-w64-mingw32-gcc option to produce PIC... -DDLL_EXPORT -DPIC checking if /usr/bin/x86_64-w64-mingw32-gcc PIC flag -DDLL_EXPORT -DPIC works... yes checking if /usr/bin/x86_64-w64-mingw32-gcc static flag -static works... no checking if /usr/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... yes checking if /usr/bin/x86_64-w64-mingw32-gcc supports -c -o file.o... (cached) yes checking whether the /usr/bin/x86_64-w64-mingw32-gcc linker (/usr/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 accepts debug disabling options... yes configure: compiler options added: 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 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 for windows.h... yes checking whether build target is a native Windows one... yes checking for winsock.h... yes checking for winsock2.h... yes checking for ws2tcpip.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 for good-to-use Mac CFLAGS... 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 provide built-in manual... yes 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 winsock.h... (cached) yes checking for winsock2.h... (cached) yes checking for proto/bsdsocket.h... no checking for connect in libraries... yes checking whether time.h and sys/time.h may both be included... yes checking for sys/types.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking time.h usability... yes checking time.h presence... yes checking for time.h... yes checking for monotonic clock_gettime... yes checking for clock_gettime in libraries... no additional lib required checking zlib.h usability... yes checking zlib.h presence... yes 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 (Windows native builds only)... 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... no checking for HMAC_Init_ex in -lcrypto... no checking OpenSSL linking with -ldl... no checking OpenSSL linking with -ldl and -lpthread... no configure: OPT_SSL: /home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa configure: OPENSSL_ENABLED: configure: error: --with-ssl was given but OpenSSL could not be detected libcurl/7.69.1: libcurl/7.69.1: WARN: Package is corrupted, removing folder: /home/kilian/.conan/data/libcurl/7.69.1/_/_/package/4131f7f8098d12c800fe7f2db2d7d5fd8d518585 libcurl/7.69.1: WARN: Build folder is dirty, removing it: /home/kilian/.conan/data/libcurl/7.69.1/_/_/build/4131f7f8098d12c800fe7f2db2d7d5fd8d518585 libcurl/7.69.1: ERROR: Package '4131f7f8098d12c800fe7f2db2d7d5fd8d518585' build failed libcurl/7.69.1: WARN: Build folder /home/kilian/.conan/data/libcurl/7.69.1/_/_/build/4131f7f8098d12c800fe7f2db2d7d5fd8d518585 ERROR: libcurl/7.69.1: Error in build() method, line 131 self._build_with_autotools() while calling '_build_with_autotools', line 263 autotools, autotools_vars = self._configure_autotools() while calling '_configure_autotools', line 308 self._autotools.configure(vars=autotools_vars, args=configure_args) ConanException: Error 1 while executing ./configure '--without-libidn2' '--without-librtmp' '--without-libmetalink' '--without-libpsl' '--without-brotli' '--with-ssl=/home/kilian/.conan/data/openssl/1.1.1e/_/_/package/8db833b4e0050c50e72e59c69d46aba173658ffa' '--without-libssh2' '--without-nghttp2' '--with-zlib=/home/kilian/.conan/data/zlib/1.2.11/_/_/package/bd8676182f1db70e6be16a57c45604fb7a6b0978/lib' '--disable-shared' '--enable-static' '--disable-ldap' '--prefix=/home/kilian/.conan/data/libcurl/7.69.1/_/_/package/4131f7f8098d12c800fe7f2db2d7d5fd8d518585' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libexecdir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' '--datarootdir=${prefix}/share' --build=x86_64-linux-gnu --host=x86_64-w64-mingw32 CMake Error at build/conan.cmake:402 (message): Conan install failed='1' Call Stack (most recent call first): build/conan.cmake:497 (conan_cmake_install) CMakeLists.txt:23 (conan_cmake_run) -- Configuring incomplete, errors occurred! See also "/home/kilian/temp/test/build/CMakeFiles/CMakeOutput.log". ```
uilianries commented 4 years ago

Interesting, the error is the same for Windows -> Linux. I'll take a look, thanks for reporting.

uilianries commented 4 years ago

Related issue: https://github.com/bincrafters/community/issues/959