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 configure modules when building Qt from git

How to configure modules when building Qt from git

Scheduled Pinned Locked Moved Installation and Deployment
qt5gitsourcebuildmodules
11 Posts 3 Posters 15.0k 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.
  • ArasA Offline
    ArasA Offline
    Aras
    wrote on last edited by
    #1

    I am following this guide to build Qt from source and hoping to build Qt creator with it once I am done. According to the guide for building Qt Creator, it requires these modules: qtscript, qttools and qtdeclarative. How can I ./configure my qt5 build so that it properly includes and builds those modules?

    I also like to use several other add-on modules. I am assuming these do not get built by default. How can I configure my qt build to include some of these modules? For example: Qt Positioning, Qt Location, Qt 3D, Qt Chart, Qt Webengine, etc.

    Do I understand this correctly, that I need to pass a parameter to ./configure script in order to build Qt from git with all the modules I need? Can someone please provide an example. All the examples I see show how to exclude a module, I cant find any examples about including modules.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Most modules are built by default.

      For additional modules, it the same technique as when building a project:

      qmake 
      make
      make install
      

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

      1 Reply Last reply
      2
      • V Offline
        V Offline
        Vicky Sharma
        wrote on last edited by
        #3

        @Aras
        Exactly right by default all necessary packages/modules add auto during run './configure'.

        If still need to add specific package so you may type like below.
        For example If need to add 'webkit' module than may type '../configure -webkit '

        1 Reply Last reply
        1
        • ArasA Offline
          ArasA Offline
          Aras
          wrote on last edited by
          #4

          @SGaist I am doing an out of source directory build. I have cloned the Qt source into a folder called qt5. Parallel to that folder I have my Qt5.8Nov28Build. I ran ../qt5/configure -developer-build -opensource -nomake examples -nomake tests -debug from inside the build folder. Now there are these folders created:

          Qt5.8_build_Nov28$ ls
          config.cache  config.status  qtactiveqt       qtcanvas3d      qtdocgallery  qtimageformats  qtmultimedia  qtqa       qtserialbus   qtwayland    qtxmlpatterns
          config.log    Makefile       qtandroidextras  qtconnectivity  qtenginio     qtlocation      qtpim         qtscxml    qtserialport  qtwebengine
          config.opt    qt3d           qtbase           qtdeclarative   qtgamepad     qtmacextras     qtpurchasing  qtsensors  qtsvg         qtx11extras
          

          Do I need to go into each folder, if I want that module, and run qmake & make. Also do I still need to do make install even if I am doing an out of source build?

          @Vicky-Sharma I tried but the -webkit flag is not recognized. I tried many other flags such as -script -scripttools -declarative -declarative-debug and none of those are recognized by the configure script.

          I am using 64bit Ubuntu 16.04.

          1 Reply Last reply
          0
          • ArasA Offline
            ArasA Offline
            Aras
            wrote on last edited by
            #5

            Another update on this. I was able to build Qt from source. In order to build Qt Creator from source, I had to run make -j5 module-qtscript from the qt build directory. After that I was able to configure and build Qt Creator. So now I have Qt Creator version 4.2.82 built from source using qmake version 5.8.0 also built from source.

            However, when I try to open my project using the new qt build and the new creator I just build, I get this warning about missing modules in the "General Messages" tab:

            Project MESSAGE: Warning: unknown QT: 3dcore
            Project MESSAGE: Warning: unknown QT: 3drender
            Project MESSAGE: Warning: unknown QT: 3dinput
            Project MESSAGE: Warning: unknown QT: 3dlogic
            Project MESSAGE: Warning: unknown QT: 3dquick
            Project MESSAGE: Warning: unknown QT: 3dextras
            Project MESSAGE: Warning: unknown QT: qml
            Project MESSAGE: Warning: unknown QT: quick
            Project MESSAGE: Warning: unknown QT: 3dquickextras
            Project MESSAGE: Warning: unknown QT: positioning
            Project MESSAGE: Warning: unknown QT: serialbus
            Project MESSAGE: Running CAN pro file
            Project MESSAGE: Target path is:  + plugins/can
            Project MESSAGE: Warning: unknown QT: qml
            Project MESSAGE: Warning: unknown QT: quick
            Project MESSAGE: Warning: unknown QT: serialbus
            Project MESSAGE: Warning: unknown QT: qml
            Project MESSAGE: Warning: unknown QT: quick
            Project MESSAGE: Warning: unknown QT: qml
            Project MESSAGE: Warning: unknown QT: quick
            

            And if I try to build the project I get lots of errors about functions being private or not getting recognized. I know that the code is correct, because it builds and runs on another machine. So thse errors must be caused by missing modules.

            That is exactly what I was worried about. How do I install those missing modules?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              If you configure Qt at the root, it will build all the current modules.

              You only have to go "by hand" with qtscript.

              QtWebkit it not an option anymore since 5.6

              Unless you plan to hack on Qt don't use a developer build.

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

              ArasA 1 Reply Last reply
              1
              • SGaistS SGaist

                If you configure Qt at the root, it will build all the current modules.

                You only have to go "by hand" with qtscript.

                QtWebkit it not an option anymore since 5.6

                Unless you plan to hack on Qt don't use a developer build.

                ArasA Offline
                ArasA Offline
                Aras
                wrote on last edited by
                #7

                @SGaist said in How to configure modules when building Qt from git:

                configure Qt at the root

                can you clarify what you mean by that? Do you mean run configure as root? with sudo?

                Thanks for your help so far.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Sorry, I meant the root directory of the source.

                  Basically:

                  mkdir build_Qt5
                  cd build_Qt5
                  /path/to/Qt_sources/configure
                  

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

                  1 Reply Last reply
                  1
                  • ArasA Offline
                    ArasA Offline
                    Aras
                    wrote on last edited by
                    #9

                    @SGaist that is exactly what I did: an out of source directory build. I am focused on this error now:

                    ControlView.qml:2 module "QtQuick.Controls" version 2.0 is not installed

                    To me that means qtquickcontrols2 did not get installed when I built qt. Is there a way to just build this module and install it?

                    Sorry, I dont know why I am always having such a hard time with qt modules. It can't be just me, right?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      That should boil down to:

                      cd build_Qt5
                      mkdir qtquickcontrols2
                      ../qtbase/bin/qmake /path/to/Qt_sources/qtquickcontrols2
                      make
                      make install
                      

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

                      ArasA 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        That should boil down to:

                        cd build_Qt5
                        mkdir qtquickcontrols2
                        ../qtbase/bin/qmake /path/to/Qt_sources/qtquickcontrols2
                        make
                        make install
                        
                        ArasA Offline
                        ArasA Offline
                        Aras
                        wrote on last edited by
                        #11

                        @SGaist thank you for that! That took care of the qtquickcontrols2. Now I just have a hand full of other modules I need to build and install, according to these errors:

                        /Live3DWidget.qml:4 module "QtQuick.Scene3D" is not installed
                        /Live3DWidget.qml:9 module "Qt3D.Extras" is not installed
                        /Live3DWidget.qml:7 module "Qt3D.Render" is not installed
                        /Live3DWidget.qml:6 module "Qt3D.Core" is not installed
                        /Live3DWidget.qml:8 module "Qt3D.Input" is not installed
                        /Live3DWidget.qml:4 module "QtQuick.Scene3D" is not installed
                        /Live3DWidget.qml:9 module "Qt3D.Extras" is not installed
                        /Live3DWidget.qml:7 module "Qt3D.Render" is not installed
                        /Live3DWidget.qml:6 module "Qt3D.Core" is not installed
                        /Live3DWidget.qml:8 module "Qt3D.Input" is not installed
                        /Live3DWidget.qml:4 module "QtQuick.Scene3D" is not installed
                        /Live3DWidget.qml:9 module "Qt3D.Extras" is not installed
                        /Live3DWidget.qml:7 module "Qt3D.Render" is not installed
                        /Live3DWidget.qml:6 module "Qt3D.Core" is not installed
                        /Live3DWidget.qml:8 module "Qt3D.Input" is not installed
                        /Live3DWidget.qml:4 module "QtQuick.Scene3D" is not installed
                        /Live3DWidget.qml:9 module "Qt3D.Extras" is not installed
                        /Live3DWidget.qml:7 module "Qt3D.Render" is not installed
                        /Live3DWidget.qml:6 module "Qt3D.Core" is not installed
                        /Live3DWidget.qml:8 module "Qt3D.Input" is not installed
                        /Live3DWidget.qml:4 module "QtQuick.Scene3D" is not installed
                        /Live3DWidget.qml:9 module "Qt3D.Extras" is not installed
                        /Live3DWidget.qml:7 module "Qt3D.Render" is not installed
                        /Live3DWidget.qml:6 module "Qt3D.Core" is not installed
                        /Live3DWidget.qml:8 module "Qt3D.Input" is not installed
                        

                        I will try to install relevant modules and try again. Will report back.

                        1 Reply Last reply
                        0

                        • Login

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