Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-32099

Some conan packages don't install with Qt Creator

    XMLWordPrintable

Details

    Description

      User reported:
      "
      When I create a Qt-Application that depends on "sentry/0.7.15"(https://conan.io/center/recipes/sentry-native?version=0.7.15), CMake step fails in Qt Creator during processing of the conan install part as follows:

      [cmake] ======== Computing necessary packages ========
      [cmake] Requirements
      [cmake] sentry-native/0.7.15#fa839e8362a9095abe09d1e197df06c4:ebf10988fef6f309765b1f30c521697c905d0d90 - Invalid
      [cmake] zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:8b7e35f91e516e42ed736c6dd52a9263da3a5dad#3cfbcf609cfa6e016b58565e4da4a036 - Cache
      [cmake] Build requirements
      [cmake] Skipped binaries
      [cmake] cmake/3.31.0
      [cmake] ERROR: There are invalid packages:
      [cmake] sentry-native/0.7.15: Invalid: The compiler.cppstd is not defined for this configuration
      [cmake] CMake Error at C:/dev/git/Qt/sentry-demo/build/Desktop_Qt_6_5_5_MSVC2019_64bit-Debug/.qtc/package-manager/conan_provider.cmake:461 (message):
      [cmake] Conan install failed='6'
      [cmake] Call Stack (most recent call first):
      [cmake] CMakeLists.txt:19 (conan_install)

      It seems as though the "conan install"-command that is executed from within QtCreator/CMake is supplied with a modified conan profile. My actual conan profile is as follows:

      [settings]
      arch=x86_64
      build_type=Debug
      compiler=msvc
      compiler.cppstd=23
      compiler.runtime=dynamic
      compiler.version=194
      os=Windows

      but it seems that when the profile is used from within QtCreator it looks like this (note the value for compiler.cppstd is set to none.)

      [settings]
      arch=x86_64
      build_type=Debug
      compiler=msvc
      compiler.cppstd=
      compiler.runtime=dynamic
      compiler.version=194
      os=Windows

      When I run a minimal project from the command line, the install process succeeds.

       

      Steps to reproduce:

      1. Create new Qt Application
      2. add "conanfile.py" with the following content

      from conan import ConanFile
      from conan.tools.cmake import cmake_layout

      class SentryDemo(ConanFile):
      settings = "os", "compiler", "build_type", "arch"
      generators = "CMakeDeps", "CMakeToolchain"

      def requirements(self):
      self.requires("sentry-native/0.7.15")

      def layout(self):
      cmake_layout(self)

      3. ensure that Preferences>>CMake>>Package Manager Auto Setup is enabled
      4. run CMake for the project

      CMake should start running and while invoking conan install .... it will fail with the aforementioned error message.

      "

      Attachments

        For Gerrit Dashboard: QTCREATORBUG-32099
        # Subject Branch Project Status CR V

        Activity

          People

            cadam Cristian Adam
            tero.pelkonen Tero Pelkonen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes