Building Qt 6.9.3 from sources with default options using configure.bat
-
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:- 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;
- downloaled sources for it via Qt Installer;
- 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_COMPATThe 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?
-
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:- 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;
- downloaled sources for it via Qt Installer;
- 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_COMPATThe 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?
-
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:- 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;
- downloaled sources for it via Qt Installer;
- 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_COMPATThe 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?
@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
-
@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
-
@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?
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/
-
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/
@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/installAs 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!
-
@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/installAs 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!
@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.