bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
218 stars 36 forks source link

[qt] Provide binaries for more modules in addition to the qtbase ones #649

Closed alcroito closed 3 years ago

alcroito commented 5 years ago

Package and Environment Details (include every applicable attribute)

Hi, is there any reason why only qtbase binaries are generated for the binary packages available on bincrafters?

I was hoping that it would be possible to add qtdeclarative and qtquickcontrols 1/2 ones as well.

If qtbase succeeds to build on Travis / AppVeyor / Azure, then probably most modules would succeed except for qtwebengine.

ericLemanissier commented 5 years ago

The main problem is actually build time, because travis-ci and appveyor limit jobs to 60 minutes. I'll see which modules we can add without going beyond this limit.

alcroito commented 5 years ago

Oh right. I forgot about the 50-60 minute limit. I wonder if it would be plausible to move to Azure Pipelines because they have 360 minute job limits, and 10 parallel jobs.

ericLemanissier commented 5 years ago

We already have an azure pipelines in place for Qt, and it's working quite well, except that upload of artificacts to bintray fails most of the time https://developercommunity.visualstudio.com/content/problem/388538/https-request-read-time-out-error.html I guess I'll have to give it a shot again at some point

alcroito commented 5 years ago

Ah, that's really cool. Hopefully they can help and fix the issue.

ericLemanissier commented 5 years ago

I just retested adding qtdeclarative alone, it takes the build time (especially windows builds) out of bounds. We would need to find new tricks to reduce the global build time

alcroito commented 5 years ago

Well, qt itself, without conan, can be built module by module, instead of doing a super build. So you can configure && make && make install qtbase, and then using the installed qtbase you can build and install qtdeclarative into the qtbase install prefix. Presumably it would be possible to split that as separate jobs in travis & appveyor.

The problem would then be to move the artifacts from one job to another if possible. And I'm not sure how that would that work from conan's build recipe perspective.

ericLemanissier commented 5 years ago

I'm on the same page. It's possible to share files between jobs, but it does not integrate well with the monolithic conanfile.build() method. Our best hope to solve this issue would be to have a conan recipe for each module of qt. we already tried it but hit several walls. That said you gave me some new ideas. Do you know were we could find some documentations/blogs about how to build qt module by module ? does it boil down to the following ?

  1. calling configure (from qt5 or qtbase?) without skipping any module
  2. choosing wisely a submodule(respecting dependencies) and go in its directory
  3. calling qmake+make+make install
  4. going back to step 2.
alcroito commented 5 years ago

Honestly I can't find any official documentation for module builds, only forum posts. But it's pretty simple, the steps are mostly as you described:

  1. create a qtbase build dir, to do an out-of-source dir (I think it's safer), and cd into it.
  2. call the configure script in qtbase (not qt5), while being in the aforementioned build dir. Make sure to pass only flags that qtbase understands (so no -proprietary-codecs for example, which would only be understood at webengine build time). Also make sure to pass a prefix where to install the libs and co.
  3. make -j10 && make install

Then for each chosen submodule:

  1. create out-of-source build dir
  2. call installed qmake with /path/to/module (for example qtdeclarative). you can specify either the path to the folder, or to the .pro file. Pass any flags as needed (like -proprietary-codecs).
  3. make -j10 && make install
  4. Note that the installed files will be installed into the same prefix where qtbase libs / bin were installed.

I can't find an explicit dependency list for each module. But they are encoded in the qt5 repo .gitmodules file. Each submodule (qtbase, qtsvg, qtdeclarative) has a "depends" and "recommends" section. They don't list the whole list of dependencies, only the transitive ones. So you'd have to expand the list on your own.

ericLemanissier commented 3 years ago

This recipe is now in the Conan Center Index, so I started a discussion about modularized package on https://github.com/conan-io/conan-center-index/issues/4416

Please migrate to the recipe version there. Thanks!

https://conan.io/center/qt