conan icon indicating copy to clipboard operation
conan copied to clipboard

Cannot install qt 6.7.0 prebuilt binary on Windows

Open ABBAPOH opened this issue 9 months ago • 5 comments

What is your question?

Hello, I am trying to install Qt prebuilt binariy on Windows. Here's my profile:

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

conan install --requires=qt/6.7.0

ERROR: Missing prebuilt package for 'qt/6.7.0'. You can try:
    - List all available packages using 'conan list qt/6.7.0:* -r=remote'
    - Explain missing binaries: replace 'conan install ...' with 'conan graph explain ...'
    - Try to build locally from sources using the '--build=qt/6.7.0' argument

More Info at 'https://docs.conan.io/2/knowledge/faq.html#error-missing-prebuilt-package'

conan graph explain --requires=qt/6.7.0

======== Closest binaries ========
qt/6.7.0
  qt/6.7.0#0d41d85b2ab456f5751faa25c1554581%1712318691.56 (2024-04-05 12:04:51 UTC)
    qt/6.7.0#0d41d85b2ab456f5751faa25c1554581:024d8d75a587ccc6ec19a5f6e7082c608ea3527b
      remote: conancenter
      settings: Windows, x86_64, Release, msvc, 17, dynamic, Release, 193
      options(diff):
      requires: brotli/1.1.Z, bzip2/1.0.Z, double-conversion/3.3.Z, freetype/2.13.Z, glib/2.78.Z, harfbuzz/8.3.Z, libffi/3.4.Z, libgettext/0.22.Z, libiconv/1.17.Z, libpng/1.6.Z, libpq/15.4.Z, md4c/0.4.Z, openssl/3.2.Z, pcre2/10.42.Z, sqlite3/3.45.Z, zlib/1.3.Z
      diff
        options
          expected: qtdeclarative=True, qtdoc=True, qttools=True, qttranslations=True
          existing: qtdeclarative=False, qtdoc=False, qttools=False, qttranslations=False
        explanation: This binary was built with the same settings, but different options

conan graph explain --requires=qt/6.7.0 -o:h qt/*:qttools=False

======== Computing dependency graph ========
ERROR: qt/6.7.0: Error in configure() method, line 229
        _enablemodule(module_name)
while calling '_enablemodule', line 217
        setattr(self.options, mod, True)
        ConanException: Incorrect attempt to modify option 'qttools' from 'False' to 'True'

Tried setting options in the conanfile.py:

    def config_options(self):
        self.options["qt"].qtdeclarative = False
        self.options["qt"].qtdoc = False
        self.options["qt"].qttools = False
        self.options["qt"].qttranslations = False

Same error. I have run out of ideas, any help appreciated.

Have you read the CONTRIBUTING guide?

  • [ ] I've read the CONTRIBUTING guide

ABBAPOH avatar May 07 '24 12:05 ABBAPOH

Hi @ABBAPOH

Thanks for your report.

I have been able to reproduce, first I also got the same "Missing binary" error, and then:

(conan2_310) λ conan graph explain --requires=qt/6.7.0 -s compiler.cppstd=17 -o qt*:qtdeclarative=False -o qt*:qtdoc=False -o qt*:qttools=False -o qt*:qttranslation=False

======== Computing dependency graph ========
ERROR: qt/6.7.0: Error in configure() method, line 229
        _enablemodule(module_name)
while calling '_enablemodule', line 217
        setattr(self.options, mod, True)
        ConanException: Incorrect attempt to modify option 'qtdeclarative' from 'False' to 'True'

This looks like a bug in the recipe in ConanCenter, not in Conan itself, I'll try to have a look.

memsharded avatar May 07 '24 12:05 memsharded

From this comment https://github.com/conan-io/conan/issues/10104#issuecomment-982450067 it seems that one cannot modify props here https://github.com/conan-io/conan-center-index/blob/master/recipes/qt/6.x.x/conanfile.py#L215

ABBAPOH avatar May 07 '24 12:05 ABBAPOH

Hi @ABBAPOH , thank you for reporting this. We have located the issue in the Conan Center recipe. Apologies for this - we will be more careful in the future.

jcar87 avatar May 07 '24 14:05 jcar87

I get the same issues with Linux. All the dependency options affect the package ID.

glennaycock avatar May 08 '24 13:05 glennaycock

Hi @glennaycock - thanks for reporting this.

Looking to sort this out - however it's not ideal. We can set essential_modules=False for everyone, but that probably means reduced functionality Or we can set essential_modules=True, but we maintain too many qt versions and this has a severe impact on our CI.

While we address this, in the meantime:

  • if you pass -o "qt/*:essential_modules=False" and are using a configuration that matches our CI, you should get the same binaries that we currently have published
  • pass -o "qt/*:essential_modules=True" and --build=missing

It really does depend on what your needs are with regards to the components that qt should have been built with

jcar87 avatar Jun 10 '24 14:06 jcar87

@ABBAPOH , @glennaycock - this is being fixed in https://github.com/conan-io/conan-center-index/pull/24876

jcar87 avatar Aug 08 '24 18:08 jcar87

Should be fixed with the most recent recipe revision (might take ~20 minutes to be published).

jcar87 avatar Aug 12 '24 09:08 jcar87

I'll try take a look tonight, thanks!

ABBAPOH avatar Aug 12 '24 10:08 ABBAPOH

Works for me now, thanks!

ABBAPOH avatar Aug 13 '24 08:08 ABBAPOH