Qmake fails to build on windows mingw Qt 4.8.0
-
I'm trying to build a static version of Qt 4.8.0 on windows. I'm using MinGW 20010802 which has gcc 4.5.2, IIRC.
It fails building qmake during configure and I'm not sure why.
My configure line:
$ configure.exe -release -nomake examples -nomake demos -nomake tools -no-exce
ptions -no-stl -no-qt3support -no-script -no-scripttools -no-openssl -no-opengl
-no-webkit -no-phonon -no-sql-sqlite -static -qt-libjpeg -qt-zlib -qt-libpng -
qt-libtiff -no-rtti -no-style-cde -no-style-motif -no-style-cleanlooks -no-styl
e-plastique -no-ltcg -opensourceoutput when it starts building qmake:
WARNING: Using static linking will disable the use of plugins.
Make sure you compile ALL needed modules into the library.
Running syncqt...
Creating qmake...
g++ -c -oqconfig.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -Igenerators/symbian -Igenerators/integrity -IC:\Qt\qt-everywhere-o
pensource-src-4.8.0/include -IC:\Qt\qt-everywhere-opensource-src-4.8.0/include/Q
tCore -IC:\Qt\qt-everywhere-opensource-src-4.8.0/include -IC:\Qt\qt-everywhere-o
pensource-src-4.8.0/include/QtCore -IC:\Qt\qt-everywhere-opensource-src-4.8.0/sr
c/corelib/global -IC:\Qt\qt-everywhere-opensource-src-4.8.0/src/corelib/xml -IC:
\Qt\qt-everywhere-opensource-src-4.8.0/mkspecs/win32-g++ -IC:\Qt\qt-everywhere-o
pensource-src-4.8.0/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LI
TE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHA
VE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARI
ANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOU
RCE_EDITION C:\Qt\qt-everywhere-opensource-src-4.8.0/src/corelib/global/qconfig.
cpp
g++ -static-libgcc -static-libstdc++ -s -o qmake.exe project.o main.o makefile.o
unixmake.o unixmake2.o mingw_make.o option.o winmakefile.o projectgenerator.o p
roperty.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borlan
d_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o msvc_objectmodel.o msbuild_o
bjectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.
o symbiancommon.o registry.o epocroot.o gbuild.o qbitarray.o qbuffer.o qbytearra
y.o qcryptographichash.o qvsnprintf.o qbytearraymatcher.o qconfig.o qdatetime.o
qdir.o qdiriterator.o qfile.o qtemporaryfile.o qfileinfo.o qabstractfileengine.o
qfilesystementry.o qfilesystemengine.o qfilesystemengine_win.o qfilesystemitera
tor_win.o qfsfileengine.o qfsfileengine_iterator.o qfsfileengine_win.o qglobal.o
qhash.o qiodevice.o qlibraryinfo.o qlist.o qlinkedlist.o qlocale.o qlocale_tool
s.o qlocale_win.o qmalloc.o qmap.o qregexp.o qtextcodec.o qutfcodec.o qstring.o
qstringlist.o qsystemlibrary.o qsystemerror.o qtextstream.o quuid.o qvector.o qu
rl.o qsettings.o qsettings_win.o qvariant.o qmetatype.o qxmlstream.o qxmlutils.o
qnumeric.o -lole32 -luuid -ladvapi32 -lkernel32
pbuilder_pbx.o:pbuilder_pbx.cpp:(.text+0x39b8): undefined reference to__chkstk _ms' msvc_vcproj.o:msvc_vcproj.cpp:(.text+0x102ae): undefined reference to
_chkstk
ms'
qbytearray.o:qbytearray.cpp:(.text+0x251c): undefined reference to `__chkstk_ms'qfile.o:qfile.cpp:(.text+0x28be): undefined reference to
__chkstk_ms' qfile.o:qfile.cpp:(.text+0x2efc): undefined reference to
__chkstk_ms'
qstring.o:qstring.cpp:(.text+0x3b44): more undefined references to `__chkstk_ms'
follow
collect2: ld returned 1 exit status... <more errors>
-
Is your build environment set up correctly?
Do the INCLUDE and LIB environment variables contain any references to non-MinGW libraries?
Are you mixing libraries compiled with different compilers?
Have you tried doing a fresh build?
Have you tried to compile a simple example to verify your toolchain even works? -
I'm not sure what happened. I do not have Visual Studio, so I don't see how I'd be mixing anything with different compilers. I too had noticed the msvc references.
I added -no-vcproj and -no-dsp and then ran mingw32-make confclean. After that, the build will progress further.