Build & install multiple qt versions efficiently out of sources
-
Hi guys,
I'd like to build multiple qt versions from sources as efficiently as possible on a windows machine.
Here's the typical workflow for a single build out of a clean checkout of qtbase
cd D:\sources\lib\qtbase\build D:\sources\lib\qtbase\src\configure.bat -prefix "D:\sources\lib\qtbase\dist\6.0.0-beta5-13543-gbc88bb34ca\msvc2022_x64" -opensource -confirm-license -nomake examples -nomake tests -opengl dynamic cmake --build . --parallel ninja install cd D:\sources\lib\qtbase\src git checkout -- . && git clean -fdx
My question is, if now I was going to checkout a different version of the source repo and reconfigure again with a different prefix in the same build dir and building again, would that lead to inconsistencies?
Said otherwise, what's the more robust&safe way to build & install multiple versions of qt out of sources? Of course the premise here is to avoid making cold builds on each checkout.
-
Hi guys,
I'd like to build multiple qt versions from sources as efficiently as possible on a windows machine.
Here's the typical workflow for a single build out of a clean checkout of qtbase
cd D:\sources\lib\qtbase\build D:\sources\lib\qtbase\src\configure.bat -prefix "D:\sources\lib\qtbase\dist\6.0.0-beta5-13543-gbc88bb34ca\msvc2022_x64" -opensource -confirm-license -nomake examples -nomake tests -opengl dynamic cmake --build . --parallel ninja install cd D:\sources\lib\qtbase\src git checkout -- . && git clean -fdx
My question is, if now I was going to checkout a different version of the source repo and reconfigure again with a different prefix in the same build dir and building again, would that lead to inconsistencies?
Said otherwise, what's the more robust&safe way to build & install multiple versions of qt out of sources? Of course the premise here is to avoid making cold builds on each checkout.
Simply install the different qt versions into different directories as it's done by the Qt online installer.
Use out-of-source builds for every own qt version you check out. -
Simply install the different qt versions into different directories as it's done by the Qt online installer.
Use out-of-source builds for every own qt version you check out.@Christian-Ehrlicher When you say out-of-source builds for every own qt version you check out.... what do you mean? I'd like to know how to avoid cold builds as much as possible as this is a really expensive operation.
For instance, let's say i'd like to build a set of versions {6.5, 6.5.0, 6.5.1, 6.5.2} , in this case, can't i reuse the same out-of-source build directory? Do I need to create an specific build directory from scratch for each one of them?
I mean, I know if i was going to create from scratch build_65, build_650, build_651, build_652 where each of them would use a different prefix that'd give me artifacts with no problems. The problem of this approach is each cold build will be really expensive so I'd like to know
how to avoid those as much as possible.In fact, let me ask it differently... if you're git bisecting, what's the typical workflow to do it effectively?
-
@Christian-Ehrlicher When you say out-of-source builds for every own qt version you check out.... what do you mean? I'd like to know how to avoid cold builds as much as possible as this is a really expensive operation.
For instance, let's say i'd like to build a set of versions {6.5, 6.5.0, 6.5.1, 6.5.2} , in this case, can't i reuse the same out-of-source build directory? Do I need to create an specific build directory from scratch for each one of them?
I mean, I know if i was going to create from scratch build_65, build_650, build_651, build_652 where each of them would use a different prefix that'd give me artifacts with no problems. The problem of this approach is each cold build will be really expensive so I'd like to know
how to avoid those as much as possible.In fact, let me ask it differently... if you're git bisecting, what's the typical workflow to do it effectively?
@_BPL_ said in Build & install multiple qt versions efficiently out of sources:
n fact, let me ask it differently... if you're git bisecting, what's the typical workflow to do it effectively?
If you just want to build different versions start with the lowest but you will Mostly rebuild everything due to the different version number in qglobal.h
For bisecting I only build the Qt module of interest and then also only the interesting targets. But that's not what you asked in the first place.
-
There is one major problem why a build might be slow on Windows. If you execute the build command inside a console window it will build much faster if you minimize the window. As long as all output is visible on the screen your build will be slow. With a minimized console window on Windows I wouldn't complain too much about the build time of Qt.
-
There is one major problem why a build might be slow on Windows. If you execute the build command inside a console window it will build much faster if you minimize the window. As long as all output is visible on the screen your build will be slow. With a minimized console window on Windows I wouldn't complain too much about the build time of Qt.
@SimonSchroeder
I am surprised! If the issue is the speed at which output is produced, and has to be scrolled in a console window, I would have thought no matter how voluminous the time would be miniscule in comparison to the time required to compile Qt! Not doubting your finding, but inexplicable to me :)