Failed to build Qt 5.15.16 Visual Studio 2019
-
wrote on 30 May 2025, 19:42 last edited by
I tried to build Qt 5.15.16 with Visual Studio 2019.
I cloned the source using gitgit clone https://code.qt.io/qt/qt5.git
Then I initialized the repository
perl init-repository --module-subset=default,-qtwebengine
My prompt has Perl version 5.40.2, git 2.49.0 and cmake 3.30.3 and I called
call "\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
Then I run from a folder besides the source
..\qt5\configure.bat ^ -prefix c:\Qt\5.15.16\msvc2019_64 ^ -opensource -confirm-license ^ -recheck-all -debug-and-release -mp -nomake examples -nomake tests ^ -sql-oci -skip qtwebengine -skip qtspeech -platform win32-msvc ^ -opengl dynamic -force-debug-info -optimize-size ^ -ssl -make libs ^ -I "C:\Qt\Tools\OpenSSL\Win_x64\include" ^ -I "%OCI_INC_DIR%" ^ -L "C:\Qt\Tools\OpenSSL\Win_x64\lib" ^ -L "%OCI_LIB_DIR%"
where the OCI_INC_DIR and OCI_LIB_DIR were set to oracle instant client 19.12. The error came after nmake
cmd /c C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\mime\generate.bat C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\mime\packages\freedesktop.org.xml > .rcc\debug\qmimeprovider_database.cpp LPX-00202: could not open "sel" (error 200) Failed to run xml sel -D -B -t -c / C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\mime\packages\freedesktop.org.xml at C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\mime\generate.pl line 86. NMAKE : fatal error U1077: 'cmd' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
If I run nmake a second time the error changes to
cl -c -FIglobal\qt_pch.h -Yuglobal\qt_pch.h -Fp.pch\debug\Qt5Cored_pch.pch -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -std:c++17 -utf-8 -EHsc -MP -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\debug\Qt5Cored.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DPCRE2_CODE_UNIT_WIDTH=16 -DPCRE2_STATIC -D_WINDLL -IC:\Qt-Source\qt5\qtbase\src\corelib -I. -IC:\Qt-Source\qt5\qtbase\src\3rdparty\zlib\src -Iglobal -IC:\Qt-Source\qt5\qtbase\src\3rdparty\md5 -IC:\Qt-Source\qt5\qtbase\src\3rdparty\md4 -IC:\Qt-Source\qt5\qtbase\src\3rdparty\sha3 -IC:\Qt-Source\qt5\qtbase\src\3rdparty -IC:\Qt-Source\qt5\qtbase\src\3rdparty\double-conversion\include -IC:\Qt-Source\qt5\qtbase\src\3rdparty\harfbuzz\src -IC:\Qt-Source\qt5\qtbase\src\3rdparty\tinycbor\src -I.rcc/debug -I..\..\include -I..\..\include\QtCore -I..\..\include\QtCore\5.15.16 -I..\..\include\QtCore\5.15.16\QtCore -Itmp -I.moc\debug -I.tracegen\debug -IC:\Qt-Source\qt5\qtbase\src\3rdparty\pcre2\src -IC:\Qt\Tools\OpenSSL\Win_x64\include -IC:\oracle-dev\instantclient_19_12\sdk\include -IC:\Qt-Source\qt5\qtbase\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\fabio\AppData\Local\Temp\nmAE2E.tmp qmimedatabase.cpp qmimetype.cpp qmimemagicrulematcher.cpp qmimetypeparser.cpp qmimemagicrule.cpp qmimeglobpattern.cpp qmimeprovider.cpp C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(88): error C2479: 'QMimeProviderBase::{ctor}': 'allocate( )' is only valid for data items of static extent C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(88): error C2024: 'alignas' attribute applies to variables, data members and tag types only C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(637): error C2065: 'mimetype_database': undeclared identifier C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(638): error C2065: 'mimetype_database': undeclared identifier C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(638): error C2065: 'MimeTypeDatabaseOriginalSize': undeclared identifier C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(638): error C2338: Compressed MIME database is larger than the original size C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(640): error C2065: 'MimeTypeDatabaseOriginalSize': undeclared identifier C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(640): error C2338: Bundled MIME database is too big C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(642): error C2065: 'mimetype_database': undeclared identifier C:\Qt-Source\qt5\qtbase\src\corelib\mimetypes\qmimeprovider.cpp(643): error C2065: 'MimeTypeDatabaseOriginalSize': undeclared identifier NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
-
wrote on 30 May 2025, 21:44 last edited by
Maybe you have an old version of xml.exe that does not support the sel command, start it and check the version, the latest (from August 2014) shows
C> xml --version
1.6.1
compiled against libxml2 2.9.1, linked with 20901
compiled against libxslt 1.1.28, linked with 10128 -
Maybe you have an old version of xml.exe that does not support the sel command, start it and check the version, the latest (from August 2014) shows
C> xml --version
1.6.1
compiled against libxml2 2.9.1, linked with 20901
compiled against libxslt 1.1.28, linked with 10128wrote on 31 May 2025, 01:50 last edited by@hskoglund Here is the result
xml -v Oracle XML Developers Kit 21.0.0.0.0 - Production
the option --version was not allowed.
How can I update this command?
Thanks -
wrote on 31 May 2025, 01:56 last edited by
-
wrote on 31 May 2025, 02:01 last edited by
@hskoglund I will try. However I noted that my path has a xml that comes from the Oracle database. I think it is possible that I have already a newer version but the path is taking a wrong one.
echo %PATH% C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\;C:\Program Files\Common Files\Oracle\Java\javapath;C:\oracle\21c\dbhomeXE\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\CMake\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Users\fabio\AppData\Local\Microsoft\WindowsApps;C:\Users\fabio\AppData\Local\Programs\MiKTeX\miktex\bin\x64\;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
-
wrote on 31 May 2025, 02:32 last edited by fpaolini
@hskoglund After I have removed the Oracle from the PATH there was no other path to some xml executable. Then I added the path to the binary you indicated. The nmake is building already for 10 minutes and yet building. Before the crash came just after 2 minutes. So I think it was solved. Maybe to finish the build it will take some hours and then I will post the result.
Thanks again, it helped me a lot.
-
wrote on 31 May 2025, 06:41 last edited by
After I have added to the path the xml.exe that supports the 'sel' argument the Qt 5.15.16 was built correctly
-
1/7