cmake-conan: [question] Invalid: 'settings.compiler.runtime' value not defined
What is your question?
Hello everyone, I am trying to build a Qt application using Qt 6.6.1 and msvc on Windows. I note the lack of ‘compiler.runtime=dynamic’ in Profile host, how can I fix it?
Version: VS 2022 QtCreator 12.0.0 conan 2.0.16 cmake 3.27.7 conanfile.txt:
[requires]
[requires]
spdlog/1.12.0
[generators]
CMakeDeps
CMakeToolchain
The first error is:
[cmake] ======== Computing necessary packages ========
[cmake] Requirements
[cmake] fmt/10.2.0#43aafa5364c2359fc45be77d2587ab15:d113baa9ee16b64f89f83676d4b5bbc0d4854ea7 - Invalid
[cmake] spdlog/1.12.0#489e3fd4b4cb3b8ca63b89f3c97349ed:875f5d4390427fa71dffa662bcab006fdf9e775b - Invalid
[cmake]
[cmake] ======== Installing packages ========
[cmake] ERROR: There are invalid packages:
[cmake] fmt/10.2.0: Invalid: 'settings.compiler.runtime' value not defined
[cmake] spdlog/1.12.0: Invalid: 'settings.compiler.runtime' value not defined
[cmake] CMake Error at C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/conan_provider.cmake:408 (message):
[cmake] Conan install failed='6'
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:13 (conan_install)
looking for help to resolve this issue . Thanks in advance.
full output at QtCreator General Messages when run cmake:
[cmake] Running C:\Qt\Tools\CMake_64\bin\cmake.exe -S C:/UserName/UsingSpdlog -B C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug in C:\UserName\build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug.
[cmake] CMake start
[cmake] directory name: UsingSpdlog
[cmake] -- CMAKE_MSVC_RUNTIME_LIBRARY
[cmake] -- Qt Creator: conan package manager auto-setup. Skip this step by setting QT_CREATOR_SKIP_CONAN_SETUP to ON.
[cmake] loading initial cache file C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/qtcsettings.cmake
[cmake] -- CMake-Conan: Checking if a default profile exists
[cmake] C:\Users\QtDev\.conan2\profiles\default
[cmake] -- CMake-Conan: cmake_system_name=Windows
[cmake] -- CMake-Conan: cmake_system_processor=x86_64
[cmake] -- CMake-Conan: CMake compiler=MSVC
[cmake] -- CMake-Conan: CMake compiler version=19.38.33130.0
[cmake] -- CMake-Conan: [settings] compiler=msvc
[cmake] -- CMake-Conan: [settings] compiler.version=193
[cmake] -- CMake-Conan: Creating profile C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies/conan_host_profile
[cmake] -- CMake-Conan: Profile:
[cmake] [settings]
[cmake] arch=x86_64
[cmake] os=Windows
[cmake] compiler=msvc
[cmake] compiler.version=193
[cmake] build_type=Debug
[cmake] [conf]
[cmake] tools.cmake.cmaketoolchain:generator=Ninja
[cmake] tools.build:compiler_executables={"c":"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe","cpp":"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe"}
[cmake]
[cmake] -- CMake-Conan: conan install C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies -of=C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies/build/conan -pr;C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies/conan_host_profile;--build=missing;-s;build_type=Debug;-g;CMakeDeps
[cmake]
[cmake] ======== Input profiles ========
[cmake] Profile host:
[cmake] [settings]
[cmake] arch=x86_64
[cmake] build_type=Debug
[cmake] compiler=msvc
[cmake] compiler.version=193
[cmake] os=Windows
[cmake] [conf]
[cmake] tools.cmake.cmaketoolchain:generator=Ninja
[cmake] tools.build:compiler_executables={'c': 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe', 'cpp': 'C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/HostX64/x64/cl.exe'}
[cmake]
[cmake] Profile build:
[cmake] [settings]
[cmake] arch=x86_64
[cmake] build_type=Release
[cmake] compiler=msvc
[cmake] compiler.cppstd=14
[cmake] compiler.runtime=dynamic
[cmake] compiler.runtime_type=Release
[cmake] compiler.version=193
[cmake] os=Windows
[cmake]
[cmake]
[cmake] ======== Computing dependency graph ========
[cmake] Graph root
[cmake] conanfile.txt: C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/conan-dependencies\conanfile.txt
[cmake] Requirements
[cmake] fmt/10.2.0#43aafa5364c2359fc45be77d2587ab15 - Cache
[cmake] spdlog/1.12.0#489e3fd4b4cb3b8ca63b89f3c97349ed - Cache
[cmake]
[cmake] ======== Computing necessary packages ========
[cmake] Requirements
[cmake] fmt/10.2.0#43aafa5364c2359fc45be77d2587ab15:d113baa9ee16b64f89f83676d4b5bbc0d4854ea7 - Invalid
[cmake] spdlog/1.12.0#489e3fd4b4cb3b8ca63b89f3c97349ed:875f5d4390427fa71dffa662bcab006fdf9e775b - Invalid
[cmake]
[cmake] ======== Installing packages ========
[cmake] ERROR: There are invalid packages:
[cmake] fmt/10.2.0: Invalid: 'settings.compiler.runtime' value not defined
[cmake] spdlog/1.12.0: Invalid: 'settings.compiler.runtime' value not defined
[cmake] CMake Error at C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/conan_provider.cmake:408 (message):
[cmake] Conan install failed='6'
[cmake] Call Stack (most recent call first):
[cmake] CMakeLists.txt:13 (conan_install)
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] CMake Warning at C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake:159 (message):
[cmake] Qt Creator's conan package manager auto-setup failed. Consider setting
[cmake] QT_CREATOR_SKIP_CONAN_SETUP to ON and reconfigure to skip this step.
[cmake] Call Stack (most recent call first):
[cmake] C:/UserName/build-UsingSpdlog-Desktop_Qt_6_6_1_MSVC2019_64bit-Debug/.qtc/package-manager/auto-setup.cmake:169 (qtc_auto_setup_conan)
[cmake] CMakeLists.txt:28 (project)
[cmake]
[cmake]
[cmake] CMake Error at CMakeLists.txt:40 (find_package):
[cmake] By not providing "Findspdlog.cmake" in CMAKE_MODULE_PATH this project has
[cmake] asked CMake to find a package configuration file provided by "spdlog", but
[cmake] CMake did not find one.
[cmake]
[cmake] Could not find a package configuration file provided by "spdlog" with any
[cmake] of the following names:
[cmake]
[cmake] spdlogConfig.cmake
[cmake] spdlog-config.cmake
[cmake]
[cmake] Add the installation prefix of "spdlog" to CMAKE_PREFIX_PATH or set
[cmake] "spdlog_DIR" to a directory containing one of the above files. If "spdlog"
[cmake] provides a separate development package or SDK, be sure it has been
[cmake] installed.
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake]
[cmake] CMake process exited with exit code 1.
[cmake]
[cmake] Elapsed time: 00:02.
Have you read the CONTRIBUTING guide?
- I’ve read the CONTRIBUTING guide
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 21 (10 by maintainers)
Thank you so much @memsharded @cristianadam , it is you who make Conan more excellent!
We have added default
compiler.runtime
toconan_provider.cmake
in https://github.com/conan-io/cmake-conan/pull/609.It would be necessary:
conan_provider.cmake
I am closing this ticket as solved, but please do not hesitate to create a new ticket for any further issue or question. Many thanks!