Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.12
-
None
-
* Windows 10 x64,
* ICC 2018 Update 3,
* MSVC 2017 15.7.3,
* mingw-w64 x86_64 8.1.0,
* Windows SDK 10.0.17134.12,
* Qt5-dev-[de191df84fbdf0f7ddaa2e5d5cb10d4a475a639f|https://code.qt.io/cgit/qt/qt5.git/commit/?h=dev&id=de191df84fbdf0f7ddaa2e5d5cb10d4a475a639f].
Description
Hello, everyone,
For builds using mingw-w64 got error:
g++ -c -fno-keep-inline-dllexport -O2 -std=c++1y -ffunction-sections -fdata-sections -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Werror -Wno-error=cpp -Wno-error=deprecated-declarations -Wno-error=strict-overflow -Wno-error=implicit-fallthrough -DUNICODE -D_UNICODE -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_VERSION_STR="\"5.12.0\"" -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINOR=12 -DQT_VERSION_PATCH=0 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -DQT_NO_FOREACH -DQT_NO_CAST_FROM_ASCII -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_BOOTSTRAP_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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -I. -I..\..\..\include -I..\..\..\include\QtCore -I..\..\..\include\QtCore\5.12.0 -I..\..\..\include\QtCore\5.12.0\QtCore -I..\..\..\include\QtXml -I..\..\..\include\QtXml\5.12.0 -I..\..\..\include\QtXml\5.12.0\QtXml -Itmp -I..\..\..\mkspecs\win32-g++ -o .obj\release\qoperatingsystemversion_win.o ..\..\corelib\global\qoperatingsystemversion_win.cpp ..\..\corelib\global\qoperatingsystemversion_win.cpp: In function 'OSVERSIONINFOEX determineWinOsVersion()': ..\..\corelib\global\qoperatingsystemversion_win.cpp:100:48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type] GetProcAddressA(ntdll, "RtlGetVersion")); ^ cc1plus.exe: all warnings being treated as errors mingw32-make[1]: Leaving directory 'c:/libQT-5.12-dev/build/qtbase' mingw32-make: *** [Makefile:81: module-qtbase-make_first] Error 2
which is a known issue for builds using GCC 8.x (see ----).QTBUG-68330
If '-Wno-error=cast-function-type' flag added to mingw-w64 mkspecs to bypass this issue, next blocker appear:
mingw32-make[3]: Entering directory 'c:/libQT-5.12-dev/build/qtbase/src/network' mingw32-make -f Makefile.Release mingw32-make[4]: Entering directory 'c:/libQT-5.12-dev/build/qtbase/src/network' g++ -c -fno-keep-inline-dllexport -Wno-error=cast-function-type -DOPENSSL_API_COMPAT=0x10100000L -O2 -std=c++1y -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Werror -Wno-error=cpp -Wno-error=deprecated-declarations -Wno-error=strict-overflow -Wno-error=implicit-fallthrough -DUNICODE -D_UNICODE -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DQT_CORE_LIB -I. -Ikernel -I..\..\include -I..\..\include\QtNetwork -I..\..\include\QtNetwork\5.12.0 -I..\..\include\QtNetwork\5.12.0\QtNetwork -Itmp -I..\..\include\QtCore\5.12.0 -I..\..\include\QtCore\5.12.0\QtCore -I..\..\include\QtCore -I.moc\release -Ic:\libOPENSSL-1.1.1-dev\GCC64RH\include -I..\..\mkspecs\win32-g++ -o .obj\release\qnetworkaccessdebugpipebackend.o access\qnetworkaccessdebugpipebackend.cpp In file included from ..\..\include/QtCore/qdatastream.h:1, from access\qnetworkaccessdebugpipebackend.cpp:41: ..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:349:21: error: 'QDataStream& QDataStream::operator>>(quint32&)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror] inline QDataStream &QDataStream::operator>>(quint32 &i) ^~~~~~~~~~~ ..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:361:21: error: 'QDataStream& QDataStream::operator<<(quint32)' redeclared without dllimport attribute after being referenced with dll linkage [-Werror] inline QDataStream &QDataStream::operator<<(quint32 i) ^~~~~~~~~~~ cc1plus.exe: all warnings being treated as errors mingw32-make: *** [Makefile:81: module-qtbase-make_first] Error 2
UPDATE: A none developer builds also proved to be broken:
mingw32-make[4]: Entering directory 'c:/libQT-5.12-dev/build/qtbase/src/gui' g++ -c -fno-keep-inline-dllexport -O3 -std=c++1y -fno-exceptions -Wall -W -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -DUNICODE -D_UNICODE -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -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_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_FORCE_ASSERTS -DQT_CORE_LIB -I. -I..\..\include -I..\..\include\QtGui -I..\..\include\QtANGLE -I..\..\include\QtGui\5.12.0 -I..\..\include\QtGui\5.12.0\QtGui -Itmp -I.tracegen\release -I..\..\include\QtCore\5.12.0 -I..\..\include\QtCore\5.12.0\QtCore -I..\..\include\QtCore -I.moc\release -I"C:\Program Files (x86)\VulkanSDK\include" -I..\3rdparty\libpng -I..\3rdparty\harfbuzz-ng\include -I..\..\mkspecs\win32-g++ -o .obj\release\qpnghandler.o image\qpnghandler.cpp In file included from ..\..\include/QtCore/qdatastream.h:1, from ..\..\include/QtGui/../../src/gui/painting/qregion.h:49, from ..\..\include/QtGui/qregion.h:1, from ..\..\include/QtGui/../../src/gui/painting/qmatrix.h:45, from ..\..\include/QtGui/qmatrix.h:1, from ..\..\include/QtGui/../../src/gui/painting/qtransform.h:43, from ..\..\include/QtGui/qtransform.h:1, from ..\..\include\QtGui/../../src/gui/image/qimage.h:48, from ..\..\include\QtGui/qimage.h:1, from image\qpnghandler.cpp:46: ..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:349:21: warning: 'QDataStream& QDataStream::operator>>(quint32&)' redeclared without dllimport attribute after being referenced with dll linkage inline QDataStream &QDataStream::operator>>(quint32 &i) ^~~~~~~~~~~ ..\..\include/QtCore/../../src/corelib/serialization/qdatastream.h:361:21: warning: 'QDataStream& QDataStream::operator<<(quint32)' redeclared without dllimport attribute after being referenced with dll linkage inline QDataStream &QDataStream::operator<<(quint32 i) ^~~~~~~~~~~ mingw32-make: *** [Makefile:81: module-qtbase-make_first] Error 2
Reproduced for:
- builds using mingw-w64 8.1.0,
not reproduced for:
- builds using mingw-w64 7.3.0,
- builds using MSVC.
CC: villevoutilainen_qt.
Best,
Alexander
Attachments
Issue Links
- relates to
-
QTQAINFRA-1289 Build Qt with MinGW 7.3.0 in CI
-
- Closed
-
- resulted in
-
QTQAINFRA-3303 Build Qt with MinGW 8.1.0 in CI
-
- Closed
-
For Gerrit Dashboard: QTBUG-68742 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
232961,9 | QtCore/QtNetwork/QTestlib: Fix build with MinGW/g++ 8.1 x64 | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
232963,3 | QDataStream: Fix inlining of operator<<,>>() for quint32 | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
232985,3 | QWindowsFontDatabase/QWindowsXPStyle: Fix compilation with g++ 8.1/MinGW | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
233055,2 | QtNetwork/SSL: Fix build with MinGW/g++ 8.1 x64 | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
233057,2 | Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64 | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |