Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to create a smaller development build of Qt 6.4?
QtWS25 Last Chance

How to create a smaller development build of Qt 6.4?

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LowLevelM
    wrote on 5 Nov 2022, 07:28 last edited by
    #1

    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?

    C 1 Reply Last reply 5 Nov 2022, 07:53
    0
    • L LowLevelM
      5 Nov 2022, 07:28

      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?

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 5 Nov 2022, 07:53 last edited by
      #2

      @LowLevelM said in How to create a smaller development build of Qt 6.4?:

      i just need boring QWidgets

      Then just compoile qtbase subdir

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      L 1 Reply Last reply 5 Nov 2022, 08:24
      0
      • C Christian Ehrlicher
        5 Nov 2022, 07:53

        @LowLevelM said in How to create a smaller development build of Qt 6.4?:

        i just need boring QWidgets

        Then just compoile qtbase subdir

        L Offline
        L Offline
        LowLevelM
        wrote on 5 Nov 2022, 08:24 last edited by
        #3

        @Christian-Ehrlicher

        cd qt6-build
        ../qt6/configure -developer-build -opensource -nomake examples -nomake tests
        cd qtbase
        cmake --build . --parallel
        

        seems to work, thanks

        C 1 Reply Last reply 5 Nov 2022, 08:27
        0
        • L LowLevelM
          5 Nov 2022, 08:24

          @Christian-Ehrlicher

          cd qt6-build
          ../qt6/configure -developer-build -opensource -nomake examples -nomake tests
          cd qtbase
          cmake --build . --parallel
          

          seems to work, thanks

          C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 5 Nov 2022, 08:27 last edited by
          #4

          @LowLevelM said in How to create a smaller development build of Qt 6.4?:

          -developer-build

          Why do you need this?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • L Offline
            L Offline
            LowLevelM
            wrote on 5 Nov 2022, 08:34 last edited by LowLevelM 11 May 2022, 08:58
            #5

            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

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on 5 Nov 2022, 10:17 last edited by
              #6

              Ninja generates one big Makefile with all dependencies. If you only need QtBase then also configure only QtBase.

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              L 1 Reply Last reply 5 Nov 2022, 10:34
              0
              • C Christian Ehrlicher
                5 Nov 2022, 10:17

                Ninja generates one big Makefile with all dependencies. If you only need QtBase then also configure only QtBase.

                L Offline
                L Offline
                LowLevelM
                wrote on 5 Nov 2022, 10:34 last edited by LowLevelM 11 May 2022, 10:41
                #7

                @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 :)

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 5 Nov 2022, 19:56 last edited by
                  #8

                  Hi,

                  Just one note, the developer-build is for hacking on Qt. If you need a debug build, just set that at configuration time.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  L 1 Reply Last reply 6 Nov 2022, 08:22
                  0
                  • SGaistS SGaist
                    5 Nov 2022, 19:56

                    Hi,

                    Just one note, the developer-build is for hacking on Qt. If you need a debug build, just set that at configuration time.

                    L Offline
                    L Offline
                    LowLevelM
                    wrote on 6 Nov 2022, 08:22 last edited by LowLevelM 11 Jun 2022, 08:49
                    #9

                    @SGaist

                    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

                    1 Reply Last reply
                    0

                    1/9

                    5 Nov 2022, 07:28

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved