Build Qt5 with MinGW64 On windows10X64 failed
-
Hi,
- Windows 10X64, Qt 5.15.5, mingwX64_86_12.1.0.
- Strawberry Perl(5.32.1.1) and MSYS64 ruby(2.6.10), python(3.8.10) and openssl(1.1.1q).
Qt Build configuration:
OPENSSL_LIBS='-L/mingw64/lib -lssl -lcrypto -lws2_32 -ladvapi32 -luser32' ./configure -static -prefix "/d/Qt/5.15.5/mingw64_1210s" -opensource -confirm-license -debug-and-release -platform win32-g++ -nomake examples -nomake tests -plugin-sql-sqlite -plugin-sql-odbc -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-pcre -qt-harfbuzz -opengl desktop -skip qtwebengine -openssl-linked -I /mingw64/include
The compiler returned error message "mingw32-make: *** [Makefile] Error 2":
... mingw32-make[4]: Entering directory 'D:/qt-everywhere-src-5.15.5/qtbase/src/gui' /D/qt-everywhere-src-5.15.5/qtbase/src/gui/qvkgen_wrapper.sh vulkan/vk.xml D:/qt-everywhere-src-5.15.5/qtbase/header.LGPL vulkan/qvulkanfunctions 'D:\qt-everywhere-src-5.15.5\qtbase\bin\moc.exe' -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS --include D:/qt-everywhere-src-5.15.5/qtbase/src/network/.moc/debug/moc_predefs.h -ID:/qt-everywhere-src-5.15.5/qtbase/mkspecs/win32-g++ -ID:/qt-everywhere-src-5.15.5/qtbase/src/network -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/zlib/src -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/kernel -ID:/qt-everywhere-src-5.15.5/qtbase/include -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/tmp -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5/QtCore -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++ -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/x86_64-w64-mingw32 -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/backward -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include-fixed -IC:/mingw64/x86_64-w64-mingw32/include socket/qnativesocketengine_p.h -o .moc/debug/moc_qnativesocketengine_p.cpp 'D:\qt-everywhere-src-5.15.5\qtbase\bin\moc.exe' -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS --include D:/qt-everywhere-src-5.15.5/qtbase/src/network/.moc/release/moc_predefs.h -ID:/qt-everywhere-src-5.15.5/qtbase/mkspecs/win32-g++ -ID:/qt-everywhere-src-5.15.5/qtbase/src/network -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/zlib/src -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/kernel -ID:/qt-everywhere-src-5.15.5/qtbase/include -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/tmp -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5/QtCore -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++ -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/x86_64-w64-mingw32 -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/backward -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include-fixed -IC:/mingw64/x86_64-w64-mingw32/include socket/qhttpsocketengine_p.h -o .moc/release/moc_qhttpsocketengine_p.cpp g++ -c -fno-keep-inline-dllexport -g -Og -std=c++1z -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -ffunction-sections -fdata-sections -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DDBUS_API_SUBJECT_TO_CHANGE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_DBUS_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -DQT_CORE_LIB -I. -I../../include -I../../include/QtDBus -I../../include/QtDBus/5.15.5 -I../../include/QtDBus/5.15.5/QtDBus -Itmp -I../../include/QtCore/5.15.5 -I../../include/QtCore/5.15.5/QtCore -I../../include/QtCore -I.moc/debug -IC:/msys64/mingw64/include -I../../mkspecs/win32-g++ -o .obj/debug/moc_qdbusconnection_p.o .moc/debug/moc_qdbusconnection_p.cpp 'D:\qt-everywhere-src-5.15.5\qtbase\bin\moc.exe' -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DMD4C_USE_UTF8 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS --include D:/qt-everywhere-src-5.15.5/qtbase/src/gui/.moc/release/moc_predefs.h -ID:/qt-everywhere-src-5.15.5/qtbase/mkspecs/win32-g++ -ID:/qt-everywhere-src-5.15.5/qtbase/src/gui -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/md4c -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/zlib/src -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/VulkanMemoryAllocator -ID:/qt-everywhere-src-5.15.5/qtbase/include -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtGui -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtGui/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtGui/5.15.5/QtGui -ID:/qt-everywhere-src-5.15.5/qtbase/src/gui/tmp -ID:/qt-everywhere-src-5.15.5/qtbase/src/gui/.tracegen/release -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5/QtCore -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++ -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/x86_64-w64-mingw32 -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/backward -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include-fixed -IC:/mingw64/x86_64-w64-mingw32/include --output-json accessible/qaccessible.h -o .moc/release/moc_qaccessible.cpp 'D:\qt-everywhere-src-5.15.5\qtbase\bin\moc.exe' -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS --include D:/qt-everywhere-src-5.15.5/qtbase/src/network/.moc/release/moc_predefs.h -ID:/qt-everywhere-src-5.15.5/qtbase/mkspecs/win32-g++ -ID:/qt-everywhere-src-5.15.5/qtbase/src/network -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/zlib/src -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/kernel -ID:/qt-everywhere-src-5.15.5/qtbase/include -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/tmp -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5/QtCore -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++ -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/x86_64-w64-mingw32 -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/backward -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include-fixed -IC:/mingw64/x86_64-w64-mingw32/include socket/qnativesocketengine_p.h -o .moc/release/moc_qnativesocketengine_p.cpp 'D:\qt-everywhere-src-5.15.5\qtbase\bin\moc.exe' -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS --include D:/qt-everywhere-src-5.15.5/qtbase/src/network/.moc/debug/moc_predefs.h -ID:/qt-everywhere-src-5.15.5/qtbase/mkspecs/win32-g++ -ID:/qt-everywhere-src-5.15.5/qtbase/src/network -ID:/qt-everywhere-src-5.15.5/qtbase/src/3rdparty/zlib/src -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/kernel -ID:/qt-everywhere-src-5.15.5/qtbase/include -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtNetwork/5.15.5/QtNetwork -ID:/qt-everywhere-src-5.15.5/qtbase/src/network/tmp -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5 -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore/5.15.5/QtCore -ID:/qt-everywhere-src-5.15.5/qtbase/include/QtCore -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++ -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/x86_64-w64-mingw32 -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include/c++/backward -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include -IC:/mingw64/lib/gcc/x86_64-w64-mingw32/12.1.0/include-fixed -IC:/mingw64/x86_64-w64-mingw32/include ssl/qsslerror.h -o .moc/debug/moc_qsslerror.cpp mingw32-make[4]: *** [Makefile.Release:1364: vulkan/qvulkanfunctions.h] Error 127 mingw32-make[4]: *** Waiting for unfinished jobs.... mingw32-make[4]: *** [Makefile.Debug:1363: vulkan/qvulkanfunctions.h] Error 127 ... g++ -c -include .pch/release/qt_pch.h -fno-keep-inline-dllexport -DOPENSSL_API_COMPAT=0x10100000L -O2 -std=c++1z -ffunction-sections -fdata-sections -fno-exceptions -Wall -Wextra -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API=1 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_USE_SYSTEM_PROXIES -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_CORE_LIB -DQT_NO_EXCEPTIONS -I. -I../3rdparty/zlib/src -Ikernel -I../../include -I../../include/QtNetwork -I../../include/QtNetwork/5.15.5 -I../../include/QtNetwork/5.15.5/QtNetwork -Itmp -I../../include/QtCore/5.15.5 -I../../include/QtCore/5.15.5/QtCore -I../../include/QtCore -I.moc/release -IC:/msys64/mingw64/include -I../../mkspecs/win32-g++ -o .obj/release/qftp.o access/qftp.cpp rm -f ../../lib/libQt5Networkd.a 2>/dev/null ar -rc ../../lib/libQt5Networkd.a @object_script.libQt5Networkd.Debug rm -f ../../lib/libQt5Network.a 2>/dev/null mingw32-make[4]: Leaving directory 'D:/qt-everywhere-src-5.15.5/qtbase/src/network' ar -rc ../../lib/libQt5Network.a @object_script.libQt5Network.Release mingw32-make[4]: Leaving directory 'D:/qt-everywhere-src-5.15.5/qtbase/src/network' mingw32-make[3]: Leaving directory 'D:/qt-everywhere-src-5.15.5/qtbase/src/network' mingw32-make[2]: Leaving directory 'D:/qt-everywhere-src-5.15.5/qtbase/src' mingw32-make[1]: *** [Makefile:54: sub-src-make_first] Error 2 mingw32-make[1]: Leaving directory 'D:/qt-everywhere-src-5.15.5/qtbase' mingw32-make: *** [Makefile:90: module-qtbase-make_first] Error 2
So please Help me to resolve this
thanks... -
MSYS2 is not a supported platform for Qt.
You can get a MinGW 12.1.0 compiler from niXman (which is the MinGW "distro" that Qt uses) and compile Qt with it.
But compiling Qt 5.15.5 with MinGW 12.1.0 is also something that Qt doesn't support officially, but it should not give errors like the ones you are having with MSYS2.
-
MSYS2 is not a supported platform for Qt.
You can get a MinGW 12.1.0 compiler from niXman (which is the MinGW "distro" that Qt uses) and compile Qt with it.
But compiling Qt 5.15.5 with MinGW 12.1.0 is also something that Qt doesn't support officially, but it should not give errors like the ones you are having with MSYS2.
@cristian-adam Good to know this. Indeed me too I use the niXman's MinGW-W64 builds (The only one keeping it up to date with all the variants SJLJ, DWARF, SEH, WIN32 and POSIX).
My only problem is that I was trying to build Qt v5.15.5 last night with niXman's latest Release 12.2.0-rt_v10-rev0, it took more than 3 hours to end up with some errors at the very end.So, am I supposed to downgrade to Qt v5.12 in this case ?, or I may be should exclude some modules from the build (which ones if so !?).
And, Could you please share the official configure command line for Windows x64 so I could use it direcly saving me all the troubles.
TIA.