Qt 6 source folder too big after build
-
wrote on 26 Nov 2024, 16:48 last edited by
Hello everybody.
I have beeing building Qt6 in static version on my PC following the instructions in this video: https://www.youtube.com/watch?v=2qsR8Dw8uzA
I am working on windows and my procedure is
- Reach the C:\Qt\6.7.2\Src folder (after copying it for backup)
- Configure the Qt build with the command
.\configure.bat -release -static -opensource -confirm-license -prefix C:\Qt\6.7.2\Build-Static -qt-libpng -skip qtandroidextras -skip qtcoap -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtlottie -skip qtmqtt -skip qtmacextras -skip qtnetworkauth -skip qtopcua -skip qtpurchasing -skip qtquick3dphysics -skip qtquicktimeline -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtscript -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebglplugin -make libs -nomake tools -nomake examples -nomake tests
- Run
cmake --build .
The next step should be to run the command
cmake --install .
,but ath this point the Src folder has already become huge. Here is a screenshot of the Treesize softwareThe folder Src - Copia is the Src folder copied prior the .\configure command. As yuo can see the source folder has grown from 4.5GB to 47GB.
Is that normal? Am I doing something wrong? -
Hi,
Well, you are doing a static build so yes this is expected. You have all the build artifacts as well as all the Qt frameworks statically linked. Statically linked application and libraries are way bigger since they contain all the symbols they are using.
By the way, you should do out of sources builds, this allows to better manage and cleanup the builds.
-
wrote on 27 Nov 2024, 08:38 last edited by
Hi and thank you for the reply.
What do you mean with "out of source builds"? -
Literally: builds that happen out of the source tree.
1/4