conan-center-index: [qt] qt/6.5.0: broken recipe

Description

I’m trying to use Qt in a project but get this error when I run conan install:

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows

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


======== Computing dependency graph ========
Graph root
    conanfile.py (mud/0.1.0): c:\Users\ethin\source\mudserver\conanfile.py
Requirements
    boost/1.81.0#9bd7ae86a881631b6cc76590621e470b - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Cache
    zlib/1.2.13#e377bee636333ae348d51ca90874e353 - Cache
Build requirements
    b2/4.9.6#2e02945ad41739b8051247d14fe8297d - Cache
Resolved version ranges
    boost/[>=1.81.0]: boost/1.81.0
*********************************************************
Recipe 'qt/6.4.2' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: Package 'qt/6.4.2' not resolved: qt/6.4.2: Cannot load recipe.
Error loading conanfile at 'C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py': Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'
.

Moving to an older version doesn’t solve the problem.

Package and Environment Details

  • Package Name/Version: qt/6.5.0
  • Operating System+version: Windows 11 21H2 (AMD64) build 22000.1817
  • Compiler+version: MSVC 19.34.31944
  • Docker image: none
  • Conan version: conan 2.0.4
  • Python version: Python 3.10.9

Conan profile

Host profile: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

Build profile: [settings] arch=x86_64 build_type=Release compiler=msvc compiler.cppstd=20 compiler.runtime=dynamic compiler.runtime_type=Release compiler.version=193 os=Windows

Steps to reproduce

conan install . --output-folder=build --build=missing

Logs

Click to expand log

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=193
os=Windows

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


======== Computing dependency graph ========
Graph root
    conanfile.py (mud/0.1.0): c:\Users\ethin\source\mudserver\conanfile.py
Requirements
    boost/1.81.0#9bd7ae86a881631b6cc76590621e470b - Cache
    bzip2/1.0.8#411fc05e80d47a89045edc1ee6f23c1d - Cache
    zlib/1.2.13#e377bee636333ae348d51ca90874e353 - Cache
Build requirements
    b2/4.9.6#2e02945ad41739b8051247d14fe8297d - Cache
Resolved version ranges
    boost/[>=1.81.0]: boost/1.81.0
Traceback (most recent call last):
  File "conans\client\loader.py", line 314, in load_python_file
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "conans\client\loader.py", line 55, in load_basic_module
  File "conans\client\loader.py", line 288, in parse_conanfile
  File "conans\client\loader.py", line 352, in load_python_file
conans.errors.ConanException: Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "conans\client\loader.py", line 184, in load_conanfile
  File "conans\client\loader.py", line 79, in load_basic_module
conans.errors.ConanException: Error loading conanfile at 'C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py': Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "conans\client\graph\graph_builder.py", line 246, in _create_new_node
  File "conans\client\graph\graph_builder.py", line 213, in _resolve_recipe
  File "conans\client\loader.py", line 186, in load_conanfile
conans.errors.ConanException: qt/6.4.2: Cannot load recipe.
Error loading conanfile at 'C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py': Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "conan\cli\cli.py", line 171, in run
  File "conan\cli\command.py", line 157, in run
  File "conan\cli\commands\install.py", line 76, in install
  File "conans\client\graph\graph.py", line 300, in report_graph_error
  File "conans\client\graph\graph_builder.py", line 51, in load_graph
  File "conans\client\graph\graph_builder.py", line 89, in _expand_require
  File "conans\client\graph\graph_builder.py", line 248, in _create_new_node
conans.client.graph.graph_error.GraphMissingError: Package 'qt/6.4.2' not resolved: qt/6.4.2: Cannot load recipe.
Error loading conanfile at 'C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py': Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'
.

*********************************************************
Recipe 'qt/6.4.2' seems broken.
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: Package 'qt/6.4.2' not resolved: qt/6.4.2: Cannot load recipe.
Error loading conanfile at 'C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py': Unable to load conanfile in C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\ethin\.conan2\p\qt77d2605fccfa8\e\conanfile.py", line 18, in <module>
    from conans import RunEnvironment, tools
ImportError: cannot import name 'RunEnvironment'
.

(This happens with 6.5.0 too, me moving to 6.4.2 was an attempt to solve it.)

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 36 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Review would help this PR to be merged!

  • The workflows for v2 are not passing.

The current failure is in the test package, on macos when qt is shared, because double-conversion dynamic library cannot be found (because of SIP). see https://c3i.jfrog.io/c3i/misc-v2/logs/pr/18697/8-macos-clang/qt/6.5.1//041266c9d3ce1fdb080c1c13b2dbff65d8f3e425-test.txt. Don’t hesitate to work on this. In the mean-time, I’ll disable the shared version of qt on macos, to unblock CI.

  • It is not in the v2 ready list

Yes it is : https://github.com/conan-io/conan-center-index/blob/master/.c3i/conan_v2_ready_references.yml#L699 . But it should not, because CI did not pass.

  • I couldn’t get qt quick to work. Some plugins are not beeing built.

Please report a separate issue with all the details about your profile, options, command line invoked, and all the console log.

using latest master, I get the following error:

qt/6.4.2: Error in source() method, line 598
        if self.settings.os == "Windows":
        ConanException: 'self.settings' access in 'source()' method is forbidden