osechet / conan-qt

Conan package for Qt
MIT License
11 stars 18 forks source link

Download Qt sources from archive instead of git repo #34

Open osechet opened 7 years ago

osechet commented 7 years ago

At the origin, the idea of using the git repo was to make the download faster by only downloading the modules that will be built. However, the result is not positive. Cloning the git repo takes a lot of time and often fails due to network errors. The package should be updated to download the sources from the archive instead.

ericLemanissier commented 7 years ago

May I suggest downloading only the selected module, for example using github : https://github.com/qt/qt5/archive/v5.8.0.zip https://github.com/qt/qtbase/archive/v5.8.0.zip etc.

Qt itself also proposes split modules src packages ( http://download.qt.io/official_releases/qt/5.8/5.8.0/ ) but I cannot find the root qt5 src archive with top level configure

kenfred commented 6 years ago

The architecture of Conan implies that the source step should not depend on options:

Note that there is only one source folder for all the binary packages. If some source code is to be generated that will be different for different configurations, it cannot be generated in the source() method, it has to be done in the build() method.

Therefore, I believe it is inappropriate to conditionally sync submodules in the source step based on options. I need to be able to build a new configuration without rerunning the source step.

Downloading the archive would fix this issue, since it has everything. Or we could indiscriminately sync all submodules during source.

If we want to optimize the size of the fetch by only pulling what we need, we'd need unique conan recipes for each module. (Or do the submodule syncing in the build step. However that feels wrong - I should be able to build without a network connection)

ericLemanissier commented 6 years ago

Cloning the git submodules is still the longest solution. The fastest is to download all the module archives from qt.io, as I did in the pull request #35 . Unfortunately it seems @osechet does not have much time for maintaining this repository during the last weeks.

kenfred commented 6 years ago

Yes, the archive download seems appropriate in this case.

FYI. In recent discussions with the conan maintainers, they favor splitting up monoliths like Qt into individual conan recipes. Although that sounds good in theory, Qt has a single configure/build entry point for the collection of modules. In order to modularize the recipes the build system needs to be modularized as well, much like Boost's more recent cmake modularization.

osechet commented 6 years ago

Thanks for all these ideas. I agree with @kenfred, using separate modules is not possible. I tried it with another previous package (conan-qtbase) and it couldn't work. My idea when I created this issue was to directly download the official source archive from Qt's website (from http://download.qt.io/archive/qt/). The archive contains everything and it would make it possible to rebuild later with others options.