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. Building Qt 6.9.3 from sources with default options using configure.bat
Qt 6.11 is out! See what's new in the release blog

Building Qt 6.9.3 from sources with default options using configure.bat

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 254 Views 1 Watching
  • 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.
  • O Offline
    O Offline
    ODUHO4KA
    wrote on last edited by
    #1

    Hi all,

    I need to build Qt 6.9.3 (community license) from sources to apply the patch for the issue Windows Server 2016 is no longer working.
    What I did:

    1. installed Qt 6.9.3 for MSVC 2022 using the Qt Installer. I also installed several additional libraries: Qt 5 Compatibility module, Qt Image Formats, Qt Multimedia, Qt Serial Port and Qt Shader Tools;
    2. downloaled sources for it via Qt Installer;
    3. followed the manual for building Qt for Windows.

    I used the following command to configure Qt

    configure.bat -opensource -confirm-license -debug-and-release -shared -prefix C:\Patched_Qt6.9.3 -D QT_WIN_SERVER_2016_COMPAT
    

    The fix QT_WIN_SERVER_2016_COMPAT seems to be applied, but there are some dlls, which are presented in the Qt 6.9.3 from the installer, but they are missed in my built Qt. For example, qopensslbackend.dll, qsqlpsql.dll, d3dcompiler_47.dll and opengl32sw.dll are missed.

    So, I would like to know what configure.bat options I should use to build Qt in the same way as Qt installer does?

    P.S. There is also a strange issue about Qt 6.9.3 on the Windows 10 2016, when square symbols are displayed instead of all characters. There was no problem with Qt 5.6 on Windows 10 2016. Can it be related to the ICU option in configure.bat?

    jsulmJ JKSHJ 2 Replies Last reply
    0
    • O ODUHO4KA

      Hi all,

      I need to build Qt 6.9.3 (community license) from sources to apply the patch for the issue Windows Server 2016 is no longer working.
      What I did:

      1. installed Qt 6.9.3 for MSVC 2022 using the Qt Installer. I also installed several additional libraries: Qt 5 Compatibility module, Qt Image Formats, Qt Multimedia, Qt Serial Port and Qt Shader Tools;
      2. downloaled sources for it via Qt Installer;
      3. followed the manual for building Qt for Windows.

      I used the following command to configure Qt

      configure.bat -opensource -confirm-license -debug-and-release -shared -prefix C:\Patched_Qt6.9.3 -D QT_WIN_SERVER_2016_COMPAT
      

      The fix QT_WIN_SERVER_2016_COMPAT seems to be applied, but there are some dlls, which are presented in the Qt 6.9.3 from the installer, but they are missed in my built Qt. For example, qopensslbackend.dll, qsqlpsql.dll, d3dcompiler_47.dll and opengl32sw.dll are missed.

      So, I would like to know what configure.bat options I should use to build Qt in the same way as Qt installer does?

      P.S. There is also a strange issue about Qt 6.9.3 on the Windows 10 2016, when square symbols are displayed instead of all characters. There was no problem with Qt 5.6 on Windows 10 2016. Can it be related to the ICU option in configure.bat?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ODUHO4KA You don't need to build everything to apply a patch. Build Qt module which was changed by that patch.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • O ODUHO4KA

        Hi all,

        I need to build Qt 6.9.3 (community license) from sources to apply the patch for the issue Windows Server 2016 is no longer working.
        What I did:

        1. installed Qt 6.9.3 for MSVC 2022 using the Qt Installer. I also installed several additional libraries: Qt 5 Compatibility module, Qt Image Formats, Qt Multimedia, Qt Serial Port and Qt Shader Tools;
        2. downloaled sources for it via Qt Installer;
        3. followed the manual for building Qt for Windows.

        I used the following command to configure Qt

        configure.bat -opensource -confirm-license -debug-and-release -shared -prefix C:\Patched_Qt6.9.3 -D QT_WIN_SERVER_2016_COMPAT
        

        The fix QT_WIN_SERVER_2016_COMPAT seems to be applied, but there are some dlls, which are presented in the Qt 6.9.3 from the installer, but they are missed in my built Qt. For example, qopensslbackend.dll, qsqlpsql.dll, d3dcompiler_47.dll and opengl32sw.dll are missed.

        So, I would like to know what configure.bat options I should use to build Qt in the same way as Qt installer does?

        P.S. There is also a strange issue about Qt 6.9.3 on the Windows 10 2016, when square symbols are displayed instead of all characters. There was no problem with Qt 5.6 on Windows 10 2016. Can it be related to the ICU option in configure.bat?

        JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by JKSH
        #3

        @ODUHO4KA said in Building Qt 6.9.3 from sources with default options using configure.bat:

        I need to build Qt 6.9.3 (community license) from sources to apply the patch for the issue Windows Server 2016 is no longer working.

        But that patch is already part of Qt 6.9.1 (and 6.9.3)...?

        See the list of tags at https://github.com/qt/qtbase/commit/5ed1dcd1cc3adf26c591eefc161495a4c313d15d

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        O 1 Reply Last reply
        1
        • JKSHJ JKSH

          @ODUHO4KA said in Building Qt 6.9.3 from sources with default options using configure.bat:

          I need to build Qt 6.9.3 (community license) from sources to apply the patch for the issue Windows Server 2016 is no longer working.

          But that patch is already part of Qt 6.9.1 (and 6.9.3)...?

          See the list of tags at https://github.com/qt/qtbase/commit/5ed1dcd1cc3adf26c591eefc161495a4c313d15d

          O Offline
          O Offline
          ODUHO4KA
          wrote on last edited by
          #4

          @JKSH , yes, it merged. But QT_WIN_SERVER_2016_COMPAT must be defined, when Qt is compiled. As I understand, to activate this patch I need to compile Qt providing -D QT_WIN_SERVER_2016_COMPAT to configure.bat. Am I right?

          JKSHJ 1 Reply Last reply
          0
          • O ODUHO4KA

            @JKSH , yes, it merged. But QT_WIN_SERVER_2016_COMPAT must be defined, when Qt is compiled. As I understand, to activate this patch I need to compile Qt providing -D QT_WIN_SERVER_2016_COMPAT to configure.bat. Am I right?

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            Ohhh, yes, you're right. Sorry for the noise!

            @ODUHO4KA said in Building Qt 6.9.3 from sources with default options using configure.bat:

            there are some dlls, which are presented in the Qt 6.9.3 from the installer, but they are missed in my built Qt.

            First, do you need them? If not, then it's fine to omit them.

            • qopensslbackend.dll: Only needed if you use OpenSSL. Windows uses SChannel by default. See https://doc.qt.io/qt-6/ssl.html#enabling-and-disabling-ssl-support-when-building-qt-from-source
            • qsqlpsql.dll: Only needed if you use PostgreSQL. See https://doc.qt.io/qt-6/sql-driver.html#how-to-build-the-qpsql-plugin-on-windows
            • d3dcompiler_47.dll: This is not part of Qt. It comes from the Windows SDK. See https://learn.microsoft.com/en-us/windows/win32/directx-sdk--august-2009-
            • opengl32sw.dll: Only if you need to support software OpenGL. This is not part of Qt. Download from https://download.qt.io/development_releases/prebuilt/llvmpipe/windows/

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            O 1 Reply Last reply
            1
            • JKSHJ JKSH

              Ohhh, yes, you're right. Sorry for the noise!

              @ODUHO4KA said in Building Qt 6.9.3 from sources with default options using configure.bat:

              there are some dlls, which are presented in the Qt 6.9.3 from the installer, but they are missed in my built Qt.

              First, do you need them? If not, then it's fine to omit them.

              • qopensslbackend.dll: Only needed if you use OpenSSL. Windows uses SChannel by default. See https://doc.qt.io/qt-6/ssl.html#enabling-and-disabling-ssl-support-when-building-qt-from-source
              • qsqlpsql.dll: Only needed if you use PostgreSQL. See https://doc.qt.io/qt-6/sql-driver.html#how-to-build-the-qpsql-plugin-on-windows
              • d3dcompiler_47.dll: This is not part of Qt. It comes from the Windows SDK. See https://learn.microsoft.com/en-us/windows/win32/directx-sdk--august-2009-
              • opengl32sw.dll: Only if you need to support software OpenGL. This is not part of Qt. Download from https://download.qt.io/development_releases/prebuilt/llvmpipe/windows/
              O Offline
              O Offline
              ODUHO4KA
              wrote on last edited by
              #6

              @JKSH , I checked my several Qt installations (from the official installer) and they contain d3dcompiler_47.dll and opengl32sw.dll. So, they were added by the Qt installer.
              I need PostgreSQL and OpenSSL. In the folder of the installed Qt 6.9.3 I found the file 6.9.3/msvc2022_64/config_qtbase.opt. It has the following content:

              -debug-and-release
              -force-debug-info
              -headersclean
              -nomake
              examples
              -qt-zlib
              --
              -DFEATURE_msvc_obj_debug_info=ON
              -DOPENSSL_ROOT_DIR=C:\openssl\include\..
              -DPostgreSQL_ROOT=C:\Utils\postgresql\pgsql\lib\..
              -DCMAKE_C_COMPILER=cl.exe
              -DCMAKE_CXX_COMPILER=cl.exe
              -DQT_INSTALL_CONFIG_INFO_FILES=ON
              -DQT_GENERATE_SBOM=ON
              -DQT_GENERATE_SOURCE_SBOM=ON
              -DQT_SBOM_PYTHON_INTERP=C:\Python38_64
              -DQT_SBOM_PYTHON_APPS_PATH=C:\Python310_64\Scripts
              -DQT_LINT_SOURCE_SBOM=ON
              -DQT_INTERNAL_SBOM_DEFAULT_CHECKS=ON
              -DQT_INTERNAL_SBOM_AUDIT=ON
              -DQT_INTERNAL_SBOM_AUDIT_NO_ERROR=ON
              -DQT_BUILD_TESTS=OFF
              -DCMAKE_AUTOGEN_VERBOSE=ON
              -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
              -DCMAKE_C_COMPILER_LAUNCHER=sccache
              -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
              -DCMAKE_INSTALL_PREFIX:PATH=/Users/qt/work/install
              

              As I understand, this file contains options, which were used for building an official qtbase in Qt 6.9.3.
              So, I'm going to use the following command to build only qtbase:

              C:\Users\Y\Qt6.9.3_Patched\Src\configure.bat -opensource -confirm-license
              -debug-and-release -force-debug-info -headersclean -nomake examples
              -qt-zlib -shared -submodules qtbase -prefix C:\Patched_Qt6.9.3_qtbase
              -D QT_WIN_SERVER_2016_COMPAT -- -DFEATURE_msvc_obj_debug_info=ON -DQT_INSTALL_CONFIG_INFO_FILES=ON -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON
              -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
              -DCMAKE_C_COMPILER_LAUNCHER=sccache
              -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
              -DOPENSSL_ROOT_DIR=C:\openssl\include\..
              -DPostgreSQL_ROOT=C:\Utils\postgresql\pgsql\lib\..
              

              However, I'm not sure about paths provided in OPENSSL_ROOT_DIR and PostgreSQL_ROOT. What should be there? What exact versions of OpenSSL and PostgreSQL should be there?

              Thank you in advance for your help!

              JKSHJ 1 Reply Last reply
              0
              • O ODUHO4KA

                @JKSH , I checked my several Qt installations (from the official installer) and they contain d3dcompiler_47.dll and opengl32sw.dll. So, they were added by the Qt installer.
                I need PostgreSQL and OpenSSL. In the folder of the installed Qt 6.9.3 I found the file 6.9.3/msvc2022_64/config_qtbase.opt. It has the following content:

                -debug-and-release
                -force-debug-info
                -headersclean
                -nomake
                examples
                -qt-zlib
                --
                -DFEATURE_msvc_obj_debug_info=ON
                -DOPENSSL_ROOT_DIR=C:\openssl\include\..
                -DPostgreSQL_ROOT=C:\Utils\postgresql\pgsql\lib\..
                -DCMAKE_C_COMPILER=cl.exe
                -DCMAKE_CXX_COMPILER=cl.exe
                -DQT_INSTALL_CONFIG_INFO_FILES=ON
                -DQT_GENERATE_SBOM=ON
                -DQT_GENERATE_SOURCE_SBOM=ON
                -DQT_SBOM_PYTHON_INTERP=C:\Python38_64
                -DQT_SBOM_PYTHON_APPS_PATH=C:\Python310_64\Scripts
                -DQT_LINT_SOURCE_SBOM=ON
                -DQT_INTERNAL_SBOM_DEFAULT_CHECKS=ON
                -DQT_INTERNAL_SBOM_AUDIT=ON
                -DQT_INTERNAL_SBOM_AUDIT_NO_ERROR=ON
                -DQT_BUILD_TESTS=OFF
                -DCMAKE_AUTOGEN_VERBOSE=ON
                -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
                -DCMAKE_C_COMPILER_LAUNCHER=sccache
                -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
                -DCMAKE_INSTALL_PREFIX:PATH=/Users/qt/work/install
                

                As I understand, this file contains options, which were used for building an official qtbase in Qt 6.9.3.
                So, I'm going to use the following command to build only qtbase:

                C:\Users\Y\Qt6.9.3_Patched\Src\configure.bat -opensource -confirm-license
                -debug-and-release -force-debug-info -headersclean -nomake examples
                -qt-zlib -shared -submodules qtbase -prefix C:\Patched_Qt6.9.3_qtbase
                -D QT_WIN_SERVER_2016_COMPAT -- -DFEATURE_msvc_obj_debug_info=ON -DQT_INSTALL_CONFIG_INFO_FILES=ON -DQT_BUILD_TESTS=OFF -DCMAKE_AUTOGEN_VERBOSE=ON
                -DCMAKE_MESSAGE_LOG_LEVEL=STATUS
                -DCMAKE_C_COMPILER_LAUNCHER=sccache
                -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
                -DOPENSSL_ROOT_DIR=C:\openssl\include\..
                -DPostgreSQL_ROOT=C:\Utils\postgresql\pgsql\lib\..
                

                However, I'm not sure about paths provided in OPENSSL_ROOT_DIR and PostgreSQL_ROOT. What should be there? What exact versions of OpenSSL and PostgreSQL should be there?

                Thank you in advance for your help!

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote on last edited by
                #7

                @ODUHO4KA said in Building Qt 6.9.3 from sources with default options using configure.bat:

                I checked my several Qt installations (from the official installer) and they contain d3dcompiler_47.dll and opengl32sw.dll. So, they were added by the Qt installer.

                Yes, they were added by the Qt installer, but the installer copied them from external sources. You cannot build them from Qt source code.

                So, just copy those DLLs from an existing installation.

                I'm not sure about paths provided in OPENSSL_ROOT_DIR and PostgreSQL_ROOT. What should be there? What exact versions of OpenSSL and PostgreSQL should be there?

                You need development headers + libraries for OpenSSL and PosgreSQL. Please see the links in my previous post for version numbers.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                2

                • Login

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