How to create a smaller development build of Qt 6.4?
-
im building Qt 6.4 from source with the following commands
using this howto: https://wiki.qt.io/Building_Qt_6_from_Git
mkdir qt6_dev cd qt6_dev git clone git://code.qt.io/qt/qt5.git qt6 cd qt6 git checkout v6.4.0 perl init-repository mkdir qt6-build cd qt6-build ../qt6/configure -developer-build -opensource -nomake examples -nomake tests cmake --build . --parallel
builds an works but it takes a while (much longer then 5.15.7) and the qt6-build folder is 53GB in size at the end
i just need boring QWidgets not QtQuick/QML, QtQuick 3D and all the other stuff like Qt Charts, QtPdf etc.
is there any way to reduce my build?
-
im building Qt 6.4 from source with the following commands
using this howto: https://wiki.qt.io/Building_Qt_6_from_Git
mkdir qt6_dev cd qt6_dev git clone git://code.qt.io/qt/qt5.git qt6 cd qt6 git checkout v6.4.0 perl init-repository mkdir qt6-build cd qt6-build ../qt6/configure -developer-build -opensource -nomake examples -nomake tests cmake --build . --parallel
builds an works but it takes a while (much longer then 5.15.7) and the qt6-build folder is 53GB in size at the end
i just need boring QWidgets not QtQuick/QML, QtQuick 3D and all the other stuff like Qt Charts, QtPdf etc.
is there any way to reduce my build?
@LowLevelM said in How to create a smaller development build of Qt 6.4?:
i just need boring QWidgets
Then just compoile qtbase subdir
-
@LowLevelM said in How to create a smaller development build of Qt 6.4?:
i just need boring QWidgets
Then just compoile qtbase subdir
cd qt6-build ../qt6/configure -developer-build -opensource -nomake examples -nomake tests cd qtbase cmake --build . --parallel
seems to work, thanks
-
cd qt6-build ../qt6/configure -developer-build -opensource -nomake examples -nomake tests cd qtbase cmake --build . --parallel
seems to work, thanks
@LowLevelM said in How to create a smaller development build of Qt 6.4?:
-developer-build
Why do you need this?
-
longterm goal:
Im porting a nearly 1Mio lines of code project from Windows to Linux (which is very much organic grown, containing many small bugs...) - thats why i want more debug information in it using -developer-build
i've alreay checked the code with ASAN but i also want to check the code with TSAN (many threads are in use, and there are hard to find race conditions in it) - which needs a from source build of Qt with TSAN
according to the docs
-DFEATURE_sanitize_thread=ON
should activate a TSAN build but sadly all my resulting Qt libs do not have any dependencies to libtsan (checked with ldd) which i think is needed
so im testing around to get it to compile with TSAN - but first i want to reduce the build time, to ease the playaround a little
this is my confgure output: https://pastebin.com/YtHmvLg2
the output contains this line - so tsan seems to be not activated
Sanitizers: Addresses ............................ no Threads .............................. no Memory ............................... no Fuzzer (instrumentation only) ........ no Undefined ............................ no
new problem: i saw a warning that ninja is missing and Qt is falling back to unsupported make build in the configure output
after installing ninja-build the warning was gone but now i can't build locally in the qtbase folder
giving me a error - how to build folder local when ninja is in use?linux@linux-virtual-machine:~/dev/3rdparty-linux-gcc/qt6_dev/qt6-build/qtbase$ make make: *** No targets specified and no makefile found. Stop. linux@linux-virtual-machine:~/dev/3rdparty-linux-gcc/qt6_dev/qt6-build/qtbase$ ninja ninja: error: loading 'build.ninja': No such file or directory linux@linux-virtual-machine:~/dev/3rdparty-linux-gcc/qt6_dev/qt6-build/qtbase$ cmake --build . --parallel 2 ninja: error: loading 'build.ninja': No such file or directory linux@linux-virtual-machine:~/dev/3rdparty-linux-gcc/qt6_dev/qt6-build/qtbase$
the cmake --build . worked before installing ninja-build
-
Ninja generates one big Makefile with all dependencies. If you only need QtBase then also configure only QtBase.
-
Ninja generates one big Makefile with all dependencies. If you only need QtBase then also configure only QtBase.
@Christian-Ehrlicher said in How to create a smaller development build of Qt 6.4?:
If you only need QtBase then also configure only QtBase.
like this? seems to work
qt6_dev/qt6-build$ ../qt6/qtbase/configure -developer-build -opensource -nomake examples -nomake tests -sanitize thread qt6_dev/qt6-build$ cmake --build . --parallel
the -sanitize thread also activates TSAN :)
-
Hi,
Just one note, the developer-build is for hacking on Qt. If you need a debug build, just set that at configuration time.
-
Hi,
Just one note, the developer-build is for hacking on Qt. If you need a debug build, just set that at configuration time.
im now building also with -debug
i'just added the -develper-build because i though it could be of additional help when porting this organic grown project (with many small, hard to find bugs...)
The -developer-build option is not meant for shipping applications, but can be used for developing Qt. Such a build contains more exported symbols than a standard build and compiles with a higher warning level.
but yes according to the text there should be no impact for my bug hunting session