conan-io / conan-center-index

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

[package] qt6/6.5.2: Cannot build with "compiler.runtime=static" #20383

Closed matheusgomes28 closed 12 months ago

matheusgomes28 commented 1 year ago

Description

When attempting to build my Qt6 application on my Windows machine, it fails on the Qt6 checks for the static runtime build. See the logs for the exact details.

Note that, building with the MSVC_RUNTIME_LIBRARY set to MultiThreaded{Debug}DLL (i.e. compiler.runtime=dynamic) then it builds just fine.

As far as I can tell, Qt6 does provide support for building with a static runtime as outlined in their docs, so this is something that should also be supported in the conan recipe.

Package and Environment Details

Conan profile

[settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=17 compiler.runtime=dynamic compiler.version=193 os=Windows

Steps to reproduce

conan install . -sbuild_type=Debug -of=conan --build=missing

Logs

Click to expand logs
> conan install . -sbuild_type=Debug -of=conan --build=missing

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Debug
compiler=msvc
compiler.cppstd=17
compiler.runtime=static
compiler.runtime_type=Debug
compiler.version=193
os=Windows

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=static
compiler.runtime_type=Release
compiler.version=193
os=Windows

======== Computing dependency graph ========
Graph root
    conanfile.py: C:\Users\mathe\development\discotec\conanfile.py
Requirements
    brotli/1.1.0#d56d7bb9ca722942aba17369cb5c0519 - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Cache
    double-conversion/3.3.0#33321c201741cc32b51169c6d2d05e60 - Cache
    fmt/10.1.1#cd63809a79574a2f9eb73ca35f16a243 - Cache
    freetype/2.13.0#28bb2425d43c8bf7dbcfb024d847f5fb - Cache
    glib/2.77.0#9616df60560ec0c4548263d838a2c834 - Cache
    harfbuzz/8.0.1#01bb2e3a026008b6ca68a63adc7f121e - Cache
    libffi/3.4.4#35eb63842b505824b70aedc1baefc916 - Cache
    libgettext/0.22#2c87563d7a69544dd9379f038aca3b0b - Cache
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335 - Cache
    libpng/1.6.40#0337b7b87ac125307ed70fd064c31eea - Cache
    libpq/15.3#b917aaccede0cf286be0a20cb08243e5 - Cache
    md4c/0.4.8#84b2885aa93a27653f5067a77044b0e3 - Cache
    openssl/3.1.3#35e30a39a89ee3ae98929377ebe78913 - Cache
    pcre2/10.42#74a354d74d291503aadffe6453d976f5 - Cache
    qt/6.5.2#4ce11dd8506c9e62c36bc41c55dcfa72 - Cache
    sqlite3/3.42.0#a731fc3f0c93706bb5ced39cdee508d5 - Cache
    zlib/1.2.13#97d5730b529b4224045fe7090592d4c1 - Cache
Build requirements
    autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f - Cache
    automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50 - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Cache
    cmake/3.27.6#b64daf95eba624db2dbdf9b69501667a - Cache
    glib/2.77.0#9616df60560ec0c4548263d838a2c834 - Cache
    libffi/3.4.4#35eb63842b505824b70aedc1baefc916 - Cache
    libgettext/0.22#2c87563d7a69544dd9379f038aca3b0b - Cache
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335 - Cache
    m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c - Cache
    meson/1.0.0#15586c0ac6f682805875ef903dbe7ee2 - Cache
    meson/1.1.0#6176e4f21370f5820c27da02836c32c9 - Cache
    meson/1.2.1#8b99e6cc4f6908b594c33d1b85cfa5bd - Cache
    msys2/cci.latest#567331f1604f3c584f04feade960f06e - Cache
    nasm/2.15.05#ca1c14c2060af0ec151048b54ced9262 - Cache
    ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21 - Cache
    pcre2/10.42#74a354d74d291503aadffe6453d976f5 - Cache
    pkgconf/1.9.3#5da3944c3226f5764374e4b8b4e1d055 - Cache
    pkgconf/1.9.5#743ca0d41d35a84b1f89af337ddaa1a0 - Cache
    pkgconf/2.0.3#e1a6e243ef4f1d63f94f8e5bc438ea53 - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache
    zlib/1.2.13#97d5730b529b4224045fe7090592d4c1 - Cache
Resolved version ranges
    cmake/[>=3.21.1 <4]: cmake/3.27.6
    cmake/[>=3.25]: cmake/3.27.6
    openssl/[>=1.1 <4]: openssl/3.1.3
    zlib/[>=1.2.11 <2]: zlib/1.2.13
Overrides
    brotli/1.0.9: ['brotli/1.1.0#d56d7bb9ca722942aba17369cb5c0519']
    brotli/1.1.0: ['brotli/1.1.0']

======== Computing necessary packages ========
qt/6.5.2: WARN: C++17 support required. Your compiler is unknown. Assuming it supports C++17.
qt/6.5.2: WARN: C++17 support required. Your compiler is unknown. Assuming it supports C++17.
qt/6.5.2: WARN: C++17 support required. Your compiler is unknown. Assuming it supports C++17.
qt/6.5.2: Checking 2 compatible configurations
qt/6.5.2: Compatible configurations not found in cache, checking servers
qt/6.5.2: '6dc80deb9297fdf980bc38a7c2729532b6c9d7e4': compiler.cppstd=20
qt/6.5.2: 'd3ce1f1b52c65678673eb9e81663a127edf0bf34': compiler.cppstd=23
Requirements
    brotli/1.1.0#d56d7bb9ca722942aba17369cb5c0519:c9e3fcdf92c04490b9f03897288cbf2479063109#6f787e05e7110c664334042cd6032270 - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d:6ab4fdc3404e115db597c18b3f8984390f899537#85d6491e0cd32adc5003f7a7a4c6f3ec - Cache
    double-conversion/3.3.0#33321c201741cc32b51169c6d2d05e60:bd0257cae3196dab7a1cebf9230ea7fbeafce7fc#f4eb4d9d90a7032a955a0d84dacadbdf - Cache
    fmt/10.1.1#cd63809a79574a2f9eb73ca35f16a243:43e5ce0fb8f319675dd3bb9253553a2b2bb8eb56#91e1ad1bc77678c83887cd5f3f4c21b9 - Cache
    freetype/2.13.0#28bb2425d43c8bf7dbcfb024d847f5fb:c97ab3e1dd733f15a85b0d3f8462e17ff0aa5ee8#4dd1c3a5a85f70e7be12b3b2b4c2bf85 - Cache
    glib/2.77.0#9616df60560ec0c4548263d838a2c834:b7f44e5c6a25c9182977a8db1458cdfa227c6496#9776e7cadbe4f223325977888eac65d1 - Cache
    harfbuzz/8.0.1#01bb2e3a026008b6ca68a63adc7f121e:fd8d841db4baaf7cc31c0acddf0eb1ca3e366d59#d5bf7ebed0f13da0acce6857cce9fe29 - Cache
    libffi/3.4.4#35eb63842b505824b70aedc1baefc916:92575f6a32b6028feef3228e83ae01692c8fbeef#0a6d834d0c5d345fbc87d0752f14ba03 - Cache
    libgettext/0.22#2c87563d7a69544dd9379f038aca3b0b:786b3800a6bb59517733addaefab7a571557e190#97d12e2c02c9c52af81cb393505923d4 - Cache
    libiconv/1.17#fa54397801cd96911a8294bc5fc76335:92575f6a32b6028feef3228e83ae01692c8fbeef#edcda4758537d58683c73f96dea3e0f1 - Cache
    libpng/1.6.40#0337b7b87ac125307ed70fd064c31eea:bae3ae1f85c3e7d2c8367eec95f06f4d6c5bde7e#a9bb4710df1734fecf1b705c9b8308a0 - Cache
    libpq/15.3#b917aaccede0cf286be0a20cb08243e5:88e1878ec0bad4e5d799156e2069d02c4afeb7d1#22501f248af10caa8ac41757c74cd066 - Cache
    md4c/0.4.8#84b2885aa93a27653f5067a77044b0e3:16e32c5a8107ad180256f115ea8071bdd3ef2814#80b688a547f83320b054f415df003ee8 - Cache
    openssl/3.1.3#35e30a39a89ee3ae98929377ebe78913:10f9fd8114a75ea709958532df81b19979489866#ae663abe804ea0d737ecaf5d10930cb0 - Cache
    pcre2/10.42#74a354d74d291503aadffe6453d976f5:df2101e735845ac634ac3b983472a9f843dc4347#d319a451bda99ccef73ab205728455d6 - Cache
    qt/6.5.2#4ce11dd8506c9e62c36bc41c55dcfa72:986318e32ea1b17548922314739d04a9c75e62e6 - Build
    sqlite3/3.42.0#a731fc3f0c93706bb5ced39cdee508d5:15d557ac660f25fc4016d3933829b5217c8985de#6554bf4c0ee9ef4e13dadf19adbc8807 - Cache
    zlib/1.2.13#97d5730b529b4224045fe7090592d4c1:92575f6a32b6028feef3228e83ae01692c8fbeef#876e2e1b09d6e4ca032a4eaf93cb4f7d - Cache
Build requirements
    cmake/3.27.6#b64daf95eba624db2dbdf9b69501667a:522dcea5982a3f8a5b624c16477e47195da2f84f#8dbd7e590b5d55465460cad3957b8c5b - Cache
    ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21:723257509aee8a72faf021920c2874abc738e029#74ebd8f35f54015dcbf2b18a6adbd023 - Cache
    pkgconf/1.9.5#743ca0d41d35a84b1f89af337ddaa1a0:43771b8671ac44479c188dd72670e2eb2d7918a6#fff20261a3dd6f04396676350124386b - Cache
    strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47:522dcea5982a3f8a5b624c16477e47195da2f84f#a365b3810f698e2f0a00fbeece022903 - Cache
Skipped binaries
    autoconf/2.71, automake/1.16.5, bzip2/1.0.8, glib/2.77.0, libffi/3.4.4, libgettext/0.22, libiconv/1.17, m4/1.4.19, meson/1.0.0, meson/1.1.0, meson/1.2.1, msys2/cci.latest, nasm/2.15.05, pcre2/10.42, pkgconf/1.9.3, pkgconf/2.0.3, zlib/1.2.13

======== Installing packages ========
brotli/1.1.0: Already installed! (1 of 22)
bzip2/1.0.8: Already installed! (2 of 22)
cmake/3.27.6: Already installed! (3 of 22)
cmake/3.27.6: Appending PATH environment variable: C:\Users\mathe\.conan2\p\cmakebddb439c30143\p\bin
cmake/3.27.6: Appending PATH environment variable: C:\Users\mathe\.conan2\p\cmakebddb439c30143\p\bin
double-conversion/3.3.0: Already installed! (4 of 22)
fmt/10.1.1: Already installed! (5 of 22)
md4c/0.4.8: Already installed! (6 of 22)
ninja/1.11.1: Already installed! (7 of 22)
sqlite3/3.42.0: Already installed! (8 of 22)
strawberryperl/5.32.1.1: Already installed! (9 of 22)
zlib/1.2.13: Already installed! (10 of 22)
libiconv/1.17: Already installed! (11 of 22)
libpq/15.3: Already installed! (12 of 22)
pkgconf/1.9.5: Already installed! (13 of 22)
pkgconf/1.9.5: Appending PATH env var: C:\Users\mathe\.conan2\p\pkgco75aff3ee20fb9\p\bin
pkgconf/1.9.5: Setting PKG_CONFIG env var: C:/Users/mathe/.conan2/p/pkgco75aff3ee20fb9/p/bin/pkgconf.exe
pkgconf/1.9.5: WARN: The use of 'unix_path_legacy_compat' is deprecated in Conan 2.0 and does not perform path conversions. This is retained for compatibility with Conan 1.x and will be removed in a future version.
pkgconf/1.9.5: Appending AUTOMAKE_CONAN_INCLUDES env var: C:/Users/mathe/.conan2/p/pkgco75aff3ee20fb9/p/bin/aclocal
libffi/3.4.4: Already installed! (14 of 22)
libpng/1.6.40: Already installed! (15 of 22)
pcre2/10.42: Already installed! (16 of 22)
pcre2/10.42: Appending PATH environment variable: C:\Users\mathe\.conan2\p\b\pcre262bd12ca7bc73\p\bin
openssl/3.1.3: Already installed! (17 of 22)
libgettext/0.22: Already installed! (18 of 22)
freetype/2.13.0: Already installed! (19 of 22)
glib/2.77.0: Already installed! (20 of 22)
harfbuzz/8.0.1: Already installed! (21 of 22)

-------- Installing package qt/6.5.2 (22 of 22) --------
qt/6.5.2: Building from source
qt/6.5.2: Package qt/6.5.2:986318e32ea1b17548922314739d04a9c75e62e6
qt/6.5.2: Building your package in C:\Users\mathe\.conan2\p\b\qt8737e7f9a6c34\b
qt/6.5.2: Calling generate()
qt/6.5.2: Generators folder: C:\Users\mathe\.conan2\p\b\qt8737e7f9a6c34\b\build\generators
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'brotli-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'brotli-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'brotli-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'BZip2-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'BZip2Config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'BZip2ConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'double-conversion-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'double-conversion-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'double-conversion-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindBZip2.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindFreetype.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindIconv.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindIntl.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindOpenSSL.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindPNG.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindPostgreSQL.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindSQLite3.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'FindZLIB.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'freetype-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'freetype-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'freetype-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'glib-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'glib-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'glib-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'harfbuzz-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'harfbuzz-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'harfbuzz-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'Iconv-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'IconvConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'IconvConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'Intl-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'IntlConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'IntlConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'libffi-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'libffi-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'libffi-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'md4c-config-version.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'md4c-config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'md4c-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-BZip2-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-Freetype-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-Iconv-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-Intl-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-OpenSSL-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-PNG-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-PostgreSQL-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-SQLite3-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'module-ZLIB-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'OpenSSL-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'OpenSSLConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'OpenSSLConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PCRE2-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PCRE2Config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PCRE2ConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PNG-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PNGConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PNGConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PostgreSQL-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PostgreSQLConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'PostgreSQLConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'SQLite3-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'SQLite3Config.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'SQLite3ConfigVersion.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'ZLIB-debug-x86_64-data.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'ZLIBConfig.cmake' file.
qt/6.5.2: WARN: replace_in_file didn't find pattern ' IMPORTED)
' in 'ZLIBConfigVersion.cmake' file.
qt/6.5.2: CMakeToolchain generated: conan_toolchain.cmake
qt/6.5.2: CMakeToolchain generated: CMakePresets.json
qt/6.5.2: CMakeToolchain generated: ..\..\..\..\..\qt4fe1f4137dc91\s\src\CMakeUserPresets.json
qt/6.5.2: Generating aggregated env files
qt/6.5.2: Generated aggregated env files: ['conanbuild.bat']
qt/6.5.2: Calling build()
qt/6.5.2: Running CMake.configure()
qt/6.5.2: RUN: cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:/Users/mathe/.conan2/p/b/qt8737e7f9a6c34/b/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/mathe/.conan2/p/b/qt8737e7f9a6c34/p" -DCMAKE_TRY_COMPILE_CONFIGURATION="Debug" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "C:\Users\mathe\.conan2\p\qt4fe1f4137dc91\s\src"
conanvcvars.bat: Activating environment Visual Studio 17 - amd64 - vcvars_ver=14.3
[vcvarsall.bat] Environment initialized for: 'x64'
-- Using Conan toolchain: C:/Users/mathe/.conan2/p/b/qt8737e7f9a6c34/b/build/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- Conan toolchain: Setting BUILD_SHARED_LIBS = ON
-- The CXX compiler identification is MSVC 19.36.32532.0
-- The C compiler identification is MSVC 19.36.32532.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking dependencies of submodule 'qtbase'
-- Configuring submodule 'qtbase'
            -DCMAKE_C_FLAGS=/DWIN32 /D_WINDOWS
            -DCMAKE_C_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
            -DCMAKE_C_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
            -DCMAKE_C_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
            -DCMAKE_CXX_FLAGS=/DWIN32 /D_WINDOWS /EHsc
            -DCMAKE_CXX_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
            -DCMAKE_CXX_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
            -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
            -DCMAKE_EXE_LINKER_FLAGS=/machine:x64
            -DCMAKE_TOOLCHAIN_FILE=C:/Users/mathe/.conan2/p/b/qt8737e7f9a6c34/b/build/generators/conan_toolchain.cmake
            -DCMAKE_C_STANDARD=11
            -DCMAKE_C_STANDARD_REQUIRED=ON
            -DCMAKE_CXX_STANDARD=17
            -DCMAKE_CXX_STANDARD_REQUIRED=ON
            -DCMAKE_MODULE_PATH:STRING=C:/Users/mathe/.conan2/p/qt4fe1f4137dc91/s/src/qtbase/cmake/platforms
CMake Error at qtbase/cmake/QtBuildInformation.cmake:508 (message):
  Feature "static_runtime": Forcing to "ON" breaks its condition:

      NOT QT_FEATURE_shared

  Condition values dump:

      QT_FEATURE_shared = "ON"

Call Stack (most recent call first):
  qtbase/cmake/QtFeature.cmake:288 (qt_configure_add_report_error)
  qtbase/cmake/QtFeature.cmake:410 (qt_feature_check_and_save_internal_value)
  qtbase/cmake/QtFeature.cmake:625 (qt_evaluate_feature)
  qtbase/cmake/QtBaseGlobalTargets.cmake:113 (qt_feature_module_end)
  qtbase/CMakeLists.txt:145 (include)

-- Configuring submodule 'qtimageformats'
-- Configuring submodule 'qtlanguageserver'
-- Configuring submodule 'qtshadertools'
-- Configuring submodule 'qtsvg'
-- Configuring submodule 'qtdeclarative'
-- Configuring submodule 'qtquicktimeline'
-- Configuring submodule 'qtquick3d'
-- Configuring submodule 'qtmultimedia'
-- Configuring submodule 'qt3d'
-- Configuring submodule 'qt5compat'
-- Configuring submodule 'qtactiveqt'
-- Configuring submodule 'qtcharts'
-- Configuring submodule 'qtcoap'
-- Configuring submodule 'qtconnectivity'
-- Configuring submodule 'qtdatavis3d'
-- Configuring submodule 'qtwebsockets'
-- Configuring submodule 'qthttpserver'
-- Configuring submodule 'qttools'
-- Configuring submodule 'qtserialport'
-- Configuring submodule 'qtpositioning'
-- Configuring submodule 'qtwebchannel'
-- Configuring submodule 'qtwebengine'
-- Configuring submodule 'qtdoc'
-- Configuring submodule 'qtgrpc'
-- Configuring submodule 'qtlocation'
-- Configuring submodule 'qtlottie'
-- Configuring submodule 'qtmqtt'
-- Configuring submodule 'qtnetworkauth'
-- Configuring submodule 'qtopcua'
-- Configuring submodule 'qtquick3dphysics'
-- Configuring submodule 'qtquickeffectmaker'
-- Configuring submodule 'qtremoteobjects'
-- Configuring submodule 'qtscxml'
-- Configuring submodule 'qtsensors'
-- Configuring submodule 'qtserialbus'
-- Configuring submodule 'qtspeech'
-- Configuring submodule 'qttranslations'
-- Configuring submodule 'qtvirtualkeyboard'
-- Configuring submodule 'qtwayland'
-- Configuring submodule 'qtwebview'

-- Configuration summary shown below. It has also been written to C:/Users/mathe/.conan2/p/b/qt8737e7f9a6c34/b/build/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.

-- Configure summary:

Building for: win32-msvc (x86_64, CPU features: sse sse2)
Compiler: msvc 19.36.32532.0
Build options:
  Mode ................................... debug
  Fully optimize release builds (-O3) .... no
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Unity Build ............................ no
  Relocatable ............................ yes
  Using precompiled headers .............. yes
  Using Link Time Optimization (LTCG) .... no
  Using Intel CET ........................ no
  Target compiler supports:
    x86 Intrinsics ....................... Basic VAES AVX512VBMI2
  Sanitizers:
    Addresses ............................ no
    Threads .............................. no
    Memory ............................... no
    Fuzzer (instrumentation only) ........ no
    Undefined ............................ no
  Build parts ............................ libs tools
  App store compliance ................... no
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... no
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt PrintSupport ........................ yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  udev ................................... no
  OpenSSL ................................ yes
  openssl_linked ......................... yes
  OpenSSL 1.1 ............................ no
  OpenSSL 3.0 ............................ yes
  Using system zlib ...................... yes
  Zstandard support ...................... no
  Thread support ......................... yes
Common build options:
  Linker can resolve circular dependencies  yes
Qt Core:
  backtrace .............................. no
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... no
  ICU .................................... no
  Using system libb2 ..................... no
  Built-in copy of the MIME database ..... yes
  cpp/winrt base ......................... yes
  Tracing backend ........................ 
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... yes
  Application permissions ................ no
Qt Sql:
  SQL item models ........................ yes
Qt Network:
  getifaddrs() ........................... no
  IPv6 ifname ............................ no
  libproxy ............................... no
  Schannel ............................... yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
  Brotli Decompression Support ........... yes
  qIsEffectiveTLD() ...................... yes
    Built-in publicsuffix database ....... yes
    System publicsuffix database ......... no
Core tools:
  Android deployment tool ................ yes
  macOS deployment tool .................. no
  Windows deployment tool ................ yes
  qmake .................................. yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. no
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ yes
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... yes
    MarkdownWriter ....................... yes
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    Dynamic OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  HiRes wheel support in libinput ........ no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
    xcb-sm ............................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
  LinuxFB ................................ no
  VNC .................................... no
  VK_KHR_display ......................... no
  QNX:
    lgmon ................................ no
    IMF .................................. no
  XCB:
    Using system-provided xcb-xinput ..... no
    GL integrations:
      GLX Plugin ......................... no
        XCB GLX .......................... no
      EGL-X11 Plugin ..................... no
  Windows:
    Direct 2D ............................ yes
    Direct 2D 1.1 ........................ yes
    DirectWrite .......................... yes
    DirectWrite 3 ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows WindowsVista
Qt Testlib:
  Tester for item models ................. yes
  Batch tests ............................ no
Qt PrintSupport:
  CUPS ................................... no
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. yes
  SQLite ................................. yes
    Using system provided SQLite ......... yes

ERROR: Feature "static_runtime": Forcing to "ON" breaks its condition:
    NOT QT_FEATURE_shared
Condition values dump:
    QT_FEATURE_shared = "ON"

CMake Error at qtbase/cmake/QtBuildInformation.cmake:194 (message):
  Check the configuration messages for an error that has occurred.
Call Stack (most recent call first):
  qtbase/cmake/QtBuildInformation.cmake:24 (qt_configure_print_summary)
  CMakeLists.txt:124 (qt_print_feature_summary)

-- Configuring incomplete, errors occurred!

qt/6.5.2: ERROR:
Package '986318e32ea1b17548922314739d04a9c75e62e6' build failed
qt/6.5.2: WARN: Build folder C:\Users\mathe\.conan2\p\b\qt8737e7f9a6c34\b\build
*********************************************************
Recipe 'qt/6.5.2' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: qt/6.5.2: Error in build() method, line 739
        cmake.configure()
        ConanException: Error 1 while executing
ericLemanissier commented 1 year ago

The error message says that you need to build qt as a static library if the runtime is static. Can you please try with option qt/*:shared=False ?

matheusgomes28 commented 1 year ago

To update: @ericLemanissier's suggestion indeed worked. I accidentally had qt/*:shared=True in my recipe, and that would cause the build to fail.

It would be nice if the recipe detected this mismatch in configuration (MSVC_RUNTIME_LIBRARY=Mt and qt/*:shared=True and failed to configure).

matheusgomes28 commented 1 year ago

Forgot to update: After building (which was fine), I have not yet managed to actually compile any targets linked to the Qt6::* libraries. The following linker error is what I get

[build]      Creating library C:/Users/mathe/development/discotec/build/vs2022-deb/src/audio_visualizer/Debug/visualizer.lib and object C:/Users/mathe/development/discotec/build/vs2022-deb/src/audio_visualizer/Debug/visualizer.exp
[build] Qt6Guid.lib(qrhid3d11.cpp.obj) : error LNK2019: unresolved external symbol DCompositionCreateDevice referenced in function "public: bool __cdecl QRhiD3D11::ensureDirectCompositionDevice(void)" (?ensureDirectCompositionDevice@QRhiD3D11@@QEAA_NXZ) [C:\Users\mathe\development\discotec\build\vs2022-deb\src\audio_visualizer\visualizer.vcxproj]
[build] C:\Users\mathe\development\discotec\build\vs2022-deb\src\audio_visualizer\Debug\visualizer.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\mathe\development\discotec\build\vs2022-deb\src\audio_visualizer\visualizer.vcxproj]
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build C:/Users/mathe/development/discotec/build/vs2022-deb --config Debug exited with code: 1
[driver] Build completed: 00:00:17.239
[build] Build finished with exit code 1

For those running into this error, refer to this Qt6 forum post for a possible fix. It seems like the library isn't linking to Dcomp.lib

Yet another edit: You will need to include something like this if you're compiling statically for Windows, as the recipe somehow doesn't cascade these dependencies on Windows builds:

if (WIN32)
  target_link_libraries(my_qt_application
   PRIVATE
    Qt6::QWindowsIntegrationPlugin
    Dcomp.lib
    shcore.lib
    d3d9.lib
    SetupApi.lib)
endif()

As well as something like this in your linkeable targets in Windows:

#ifdef WINDOWS
#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin)
#endif // WINDOWS

I have not yet been able to compile Qt statically with certain extra modules (such as the Multimedia module by enabling self.options["qt/*"].qtmultimedia = True in my conanfile.py). It seems to have conflicting settings in the recipe:

======== Computing dependency graph ========
ERROR: qt/6.5.2: Error in configure() method, line 221
        _enablemodule(module)
while calling '_enablemodule', line 217
        _enablemodule(req)
while calling '_enablemodule', line 215
        setattr(self.options, mod, True)
        ConanException: Incorrect attempt to modify option 'qtshadertools' from 'False' to 'True'
ericLemanissier commented 1 year ago

the dcomp problem should be gone with qt 6.5.3, cf https://github.com/qt/qtbase/commit/63402812ced3d715eb298900f8efa7aef85dd271 Could you please try and confirm @matheusgomes28 ?