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. Build QT5.15.2 module from split source

Build QT5.15.2 module from split source

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 2 Posters 1.9k 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.
  • F Offline
    F Offline
    FrancoisD
    wrote on last edited by
    #1

    Hi everyone,
    I am interested in building only specific modules from the "split source" packages available from here: http://download.qt.io/official_releases/qt/5.15/5.15.2/submodules/ . More specifically, I am interested in building qtbase and qtsvg. For the record, I am building on Windows using Visual Studio 2019 and jom.

    I am successful in building the qtbase module, out of source, using the split source package. For doing so, I unpack the qtbase package in qt-5.15.2/src/qtbase . Then I create an out-of-source build directory ( qt-5.15.2/build ), and I call configure / jom / jom install from there.

    (in qt-5.15.2 dir)
    mkdir build
    cd build
    ..\src\qtbase\configure.bat -confirm-license -opensource -opengl desktop -mp -nomake tests -nomake examples -prefix ..\inst
    jom
    jom install
    

    According to this thread ( https://stackoverflow.com/questions/55276709/how-to-build-a-selection-of-qt5-submodules-from-source ), I should be able to build qtsvg "in addition to" qtbase. More specifically, that thread suggest to do the following:

    (in qt-5.15.2/build dir)
    mkdir qtsvg
    cd qtsvg
    ..\..\inst\bin\qmake.exe ..\..\src\qtsvg
    

    However when doing so, the build quickly fails with the following error message:

    [path]/src/qtsvg/.qmake.conf:1: Cannot find feature qt_build_config
    Could not find qmake spec 'win32-msvc'.
    Error processing project file: ..\..\src\qtsvg\qtsvg.pro
    

    So, can anyone help me understand how to build specific modules from the "split source" packages available from the above link? In particular, how can I build qtsvg in addition to qtbase with the same configuration options.

    Thank you very much.

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

      Hi and welcome to devnet,

      I do not affirm it's the source of your issue but I would use a full path for the prefix parameter.

      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
      0
      • F Offline
        F Offline
        FrancoisD
        wrote on last edited by
        #3

        Thank you for your help, unfortunately it produces the exact same error message. Actually, the compilation/installation of qtbase works, it is only the qtsvg part that does not.

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

          Can you test an other module like qtserialport ?

          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
          0
          • F Offline
            F Offline
            FrancoisD
            wrote on last edited by
            #5

            Thanks again for your help. Unfortunately, it results in similar message. I execute the following:

            (in qt-5.15.2/build dir)
            mkdir qtserialport
            cd qtserialport
            ..\..\inst\bin\qmake.exe ..\..\src\qtserialport
            

            and obtain the following messages:

            [path]/src/qtserialport/.qmake.conf:1: Cannot find feature qt_build_config
            Could not find qmake spec 'win32-msvc'.
            Error processing project file: ..\..\src\qtserialport\qtserialport.pro
            

            I feel I am missing a step or something. I feel that similarly to qtbase, I would need to "configure" the qtsvg build, or at the very least to make it "know" about the qtbase configuration. However, by directly invoking qmake with a project path, I feel like qmake is not taking my configure options into account.

            Thanks again for your help!

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

              That's strange.

              Note that I am used to build only parts of Qt but from the full sources. If that would be an option, you should test that.

              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
              0
              • F Offline
                F Offline
                FrancoisD
                wrote on last edited by
                #7

                I would prefer not having to download and unpack the whole source if possible. I would assume that if the split source packages are distributed it would be possible to build related libs from them, but I may be the only one trying to do that, since I wasn't able to find the build instruction for those...?

                Anyway, as a plan B, that could be an option to only build required modules from the whole source (qt-everywhere-src-5.15.2.zip I assume?). Could you point me to or explain how to do this only for qtbase and qtsvg?

                Thanks!

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

                  Exactly the same as you did with the split sources.

                  What I usually do is have a build dir that follows the same layout as Qt's sources.

                  Then you build qtbase as you just did followed by qtsvg.

                  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
                  0
                  • F Offline
                    F Offline
                    FrancoisD
                    wrote on last edited by FrancoisD
                    #9

                    Hi again,

                    So I think it was a "dirty build dir" problem... I restarted by unpacking the source again and retried the procedure from the start, and it worked. Thank you very much for your help, really appreciated!

                    Now for the record, in case someone else try to do the same build as I did, here are the steps to build modules from the "split source" packages.

                    1. Unpack each split source package in its own directory (e.g. tmp\src\qtbase, tmp\src\qtsvg, etc.)
                    2. Create an out-of-source build directory (e.g. tmp\build)
                    3. Go to that build directory and run configure with your preferred options (e.g. ..\src\qtbase\configure.bat [options])
                    4. Build qtbase (e.g. jom)
                    5. Install qtbase (e.g. jom install)
                    6. Now for each additional module, create a subdirectory for that module under the build directory (e.g. tmp\build\qtsvg)
                    7. Go to that subdirectory and call qmake on your submodule (e.g. ..\..\prefix\bin\qmake.exe ..\..\src\qtsvg)
                    8. Build the submodule (e.g. jom)
                    9. Install the submodule (e.g. jom install)

                    Thanks again for your help and have a great day!

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

                      Thanks for the feedback !

                      Happy coding :-)

                      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
                      0

                      • Login

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