Failed to build qt5.5 on windows7 using mingw64
-
Hello everyone,
I built qt5.5 on windows7 using mingw64 in windows cmd-shell.
Configuration is OK, the configure code is :cd c:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0
set INCLUDE=C:\msys64\home\lim\icu\dist\include
set LIB=C:\msys64\home\lim\icu\dist\lib
set QMAKESPEC=
set QTDIR=
set PATH=C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\qtbase\bin;C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\gnuwin32\bin;c:\msys64\mingw64\bin;c:\Strawberry\perl\bin;c:\Python27;c:\Ruby22-x64\bin;c:\msys64\home\lim\icu\dist\lib;c:\Program Files (x86)\Git\cmd;%SystemRoot%\System32
set MAKE_COMMAND=
configure.bat -debug-and-release -opensource -confirm-license -platform win32-g++ -developer-build -c++11 -icu -nomake tests -prefix "c:\msys64\home\lim\qt_dist" -I C:\msys64\home\lim\icu\dist\include -L C:\msys64\home\lim\icu\dist\libThe configuration output is:
Environment:
INCLUDE=
C:\msys64\home\lim\icu\dist\include
LIB=
C:\msys64\home\lim\icu\dist\lib
PATH=
C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\qtbase\bin
C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\gnuwin32\bin
c:\msys64\mingw64\bin
c:\Strawberry\perl\bin
c:\Python27
c:\Ruby22-x64\bin
c:\msys64\home\lim\icu\dist\lib
c:\Program Files (x86)\Git\cmd
C:\Windows\System32
Configuration:
warnings_are_errors
headersclean
pcre
debug
compile_examples
Qt Configuration:
private_tests
minimal-config
small-config
medium-config
large-config
full-config
debug_and_release build_all release
debug
c++11
shared
system-zlib
icu
angle
png
freetype
harfbuzz
build_all
accessibility
opengl
opengles2
egl
ssl
openssl
audio-backend
native-gestures
qpa
iconv
concurrentQMAKESPEC...................win32-g++ (commandline)
Architecture................x86_64, features: mmx sse sse2
Host Architecture...........x86_64, features: mmx sse sse2
Maketool....................mingw32-make
Debug build.................yes (combined)
Default build...............debug
Force debug info............no
C++11 support...............yes
Link Time Code Generation...no
Accessibility support.......yes
RTTI support................yes
SSE2 support................yes
SSE3 support................yes
SSSE3 support...............yes
SSE4.1 support..............yes
SSE4.2 support..............yes
AVX support.................yes
AVX2 support................yes
NEON support................no
OpenGL support..............yes
Large File support..........yes
NIS support.................no
Iconv support...............yes
Evdev support...............no
Mtdev support...............no
Inotify support.............no
eventfd(7) support..........no
Glib support................no
CUPS support................no
OpenVG support..............no
SSL support.................yes
OpenSSL support.............yes
libproxy support............no
Qt D-Bus support............no
Qt Widgets module support...yes
Qt GUI module support.......yes
QML debugging...............yes
DirectWrite support.........no
Use system proxies..........noQPA Backends:
GDI.....................yes
Direct2D................noThird Party Libraries:
ZLIB support............system
GIF support.............plugin
JPEG support............plugin
PNG support.............yes
FreeType support........yes
Fontconfig support......no
HarfBuzz support........qt
PCRE support............qt
ICU support.............yes
ANGLE...................yes
Dynamic OpenGL..........noStyles:
Windows.................yes
Windows XP..............yes
Windows Vista...........yes
Fusion..................yes
Windows CE..............no
Windows Mobile..........noSql Drivers:
ODBC....................no
MySQL...................no
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................plugin (qt)
SQLite2.................no
InterBase...............noSources are in..............C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\qtbase
Build is done in............C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0\qtbase
Install prefix..............c:\msys64\home\lim\qt_dist
Headers installed to........c:\msys64\home\lim\qt_dist\include
Libraries installed to......c:\msys64\home\lim\qt_dist\lib
Arch-dep. data to...........c:\msys64\home\lim\qt_dist
Plugins installed to........c:\msys64\home\lim\qt_dist\plugins
Library execs installed to..c:\msys64\home\lim\qt_dist\bin
QML1 imports installed to...c:\msys64\home\lim\qt_dist\imports
QML2 imports installed to...c:\msys64\home\lim\qt_dist\qml
Binaries installed to.......c:\msys64\home\lim\qt_dist\bin
Arch-indep. data to.........c:\msys64\home\lim\qt_dist
Docs installed to...........c:\msys64\home\lim\qt_dist\doc
Translations installed to...c:\msys64\home\lim\qt_dist\translations
Examples installed to.......c:\msys64\home\lim\qt_dist\examples
Tests installed to..........c:\msys64\home\lim\qt_dist\tests
Include paths...............C:\msys64\home\lim\icu\dist\include
Additional libraries........-LC:\msys64\home\lim\icu\dist\lib
Using internal configuration.Info: creating super cache file C:\msys64\home\lim\qt-everywhere-opensource-src-5.5.0.qmake.super
Qt is now configured for building. Just run mingw32-make.
To reconfigure, run mingw32-make confclean and configure.
There are some errors in building progress.Then I started "mingw32-make -j4"
The error message is:text\qzip.cpp:75:0: error: "S_IRGRP" redefined [-Werror] # define S_IRGRP 0040 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:155:0: note: this is the location of the previous definition #define S_IRGRP (S_IRUSR >> 3) ^ text\qzip.cpp:76:0: error: "S_IWGRP" redefined [-Werror] # define S_IWGRP 0020 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:156:0: note: this is the location of the previous definition #define S_IWGRP (S_IWUSR >> 3) ^ text\qzip.cpp:77:0: error: "S_IXGRP" redefined [-Werror] # define S_IXGRP 0010 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:157:0: note: this is the location of the previous definition #define S_IXGRP (S_IXUSR >> 3) ^ text\qzip.cpp:78:0: error: "S_IROTH" redefined [-Werror] \# define S_IROTH 0004 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:160:0: note: this is the location of the previous definition #define S_IROTH (S_IRGRP >> 3) ^ text\qzip.cpp:79:0: error: "S_IWOTH" redefined [-Werror] # define S_IWOTH 0002 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:161:0: note: this is the location of the previous definition #define S_IWOTH (S_IWGRP >> 3) ^ text\qzip.cpp:80:0: error: "S_IXOTH" redefined [-Werror] # define S_IXOTH 0001 ^ In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:53:0, from text\qzip.cpp:41: c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h:162:0: note: this is the location of the previous definition #define S_IXOTH (S_IXGRP >> 3) ^ g++ -c -include .pch\release\qt_gui_pch.h -pipe -fno-keep-inline-dllexport -O2 - std=c++0x -fno-exceptions -frtti -Wall -Wextra -Werror -Wno-error=cpp -Wno-error =deprecated-declarations -Wno-error=strict-overflow -DUNICODE -DQT_NO_USING_NAME SPACE -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_USE_BUNDLED_LIBPNG -DPNG_ARM_NEON_OPT=0 -DQT_ENABLE_HARFBUZZ_NG -DQT_OPENGL _ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -I. -IC:\msys64\home\lim\icu\dist\include -I..\..\include -I..\..\include\QtGui -I.. \..\include\QtANGLE -I..\..\include\QtGui\5.5.0 -I..\..\include\QtGui\5.5.0\QtGu i -Itmp -Iimage -I..\3rdparty\libpng -I..\3rdparty\harfbuzz-ng\include -I..\..\i nclude\QtCore\5.5.0 -I..\..\include\QtCore\5.5.0\QtCore -I..\..\include\QtCore - I.moc\release -I..\..\mkspecs\win32-g++ -o .obj\release\qrawfont.o text\qrawfon t.cpp cc1plus.exe: all warnings being treated as errors Makefile.Release:58521: recipe for target '.obj/release/qzip.o' failed mingw32-make[4]: *** [.obj/release/qzip.o] Error 1 mingw32-make[4]: *** Waiting for unfinished jobs.... mingw32-make[4]: Leaving directory 'c:/msys64/home/lim/qt-everywhere-opensource- src-5.5.0/qtbase/src/gui' Makefile:52: recipe for target 'release-all' failed mingw32-make[3]: *** [release-all] Error 2 mingw32-make[3]: Leaving directory 'c:/msys64/home/lim/qt-everywhere-opensource- src-5.5.0/qtbase/src/gui' Makefile:443: recipe for target 'sub-gui-make_first' failed mingw32-make[2]: *** [sub-gui-make_first] Error 2 mingw32-make[2]: Leaving directory 'c:/msys64/home/lim/qt-everywhere-opensource- src-5.5.0/qtbase/src' Makefile:41: recipe for target 'sub-src-make_first' failed mingw32-make[1]: *** [sub-src-make_first] Error 2 mingw32-make[1]: Leaving directory 'c:/msys64/home/lim/qt-everywhere-opensource- src-5.5.0/qtbase' Makefile:68: recipe for target 'module-qtbase-make_first' failed mingw32-make: *** [module-qtbase-make_first] Error 2
The error message show some macros are defined in the qzip.cpp are conflicted with the same macros defined in c:/msys64/mingw64/x86_64-w64-mingw32/include/sys/stat.h
PS: The build is in the windows cmd-shell
PS: I use ICU lib built in msys2 environment.Please help me, thanks a lot.