Errors when building QT 4.7.3 from source
-
wrote on 20 Apr 2011, 21:34 last edited by
I'm trying to build QT (1.1 SDK) from source but a lot of errors happen during compilation.
What I did:
@set PATH=C:QtSDKmingwbin
configure.exe -platform win32-g++ -qconfig minimal > C:file.txt@This is the content of file.txt afterwards
@
This is the Qt for Windows Open Source Edition.Environment:
C:QtSDKmingwbin
You are licensed to use this software under the terms of the GNU GPL version 3.You are licensed to use this software under the terms of the Lesser GNU LGPL version 2.1.
See C:/QtSDK/QtSources/4.7.33or C:/QtSDK/QtSources/4.7.3L
Configuration:
minimal-config
build_alldebug
Qt Configuration:
release
debug
zlib
png
accessibility
qt3support
opengl
s60
ipv6
script
scripttools
xmlpatterns
phonon
phonon-backend
multimedia
audio-backend
declarative
native-gestures
svg
minimal-configQMAKESPEC...................win32-g++ (commandline)
Architecture................windows
Maketool....................mingw32-make
Debug symbols...............yes
Link Time Code Generation...no
Accessibility support.......yes
STL support.................yes
Exception support...........yes
RTTI support................yes
MMX support.................yes
3DNOW support...............yes
SSE support.................yes
SSE2 support................yes
IWMMXT support..............no
OpenGL support..............yes
OpenVG support..............no
OpenSSL support.............no
QtDBus support..............no
QtXmlPatterns support.......yes
Phonon support..............yes
QtMultimedia support........yes
WebKit support..............yes
Declarative support.........yes
Declarative debugging.......yes
QtScript support............yes
QtScriptTools support.......yes
Graphics System.............raster
Qt3 compatibility...........yesThird Party Libraries:
ZLIB support............qt
GIF support.............plugin
TIFF support............plugin
JPEG support............plugin
PNG support.............yes
MNG support.............plugin
FreeType support........noStyles:
Windows.................yes
Windows XP..............yes
Windows Vista...........yes
Plastique...............yes
Cleanlooks..............yes
Motif...................yes
CDE.....................yes
Windows CE..............no
Windows Mobile..........no
S60.....................noSql Drivers:
ODBC....................no
MySQL...................no
OCI.....................no
PostgreSQL..............no
TDS.....................no
DB2.....................no
SQLite..................plugin (qt)
SQLite2.................no
InterBase...............noSources are in..............C:QtSDKQtSources4.7.3
Build is done in............C:QtSDKQtSources4.7.3
Install prefix..............C:QtSDKQtSources4.7.3
Headers installed to........C:/QtSDK/QtSources/4.7.3/include
Libraries installed to......C:/QtSDK/QtSources/4.7.3/lib
Plugins installed to........C:/QtSDK/QtSources/4.7.3/plugins
Imports installed to........C:/QtSDK/QtSources/4.7.3/imports
Binaries installed to.......C:/QtSDK/QtSources/4.7.3/bin
Docs installed to...........C:/QtSDK/QtSources/4.7.3/doc
Data installed to...........C:/QtSDK/QtSources/4.7.3
Translations installed to...C:/QtSDK/QtSources/4.7.3/translations
Examples installed to.......C:/QtSDK/QtSources/4.7.3/examples
Demos installed to..........C:/QtSDK/QtSources/4.7.3/demosCreating qmake...
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -IC:QtSDKQtSources4.7.3/include -IC:QtSDKQtSources4.7.3/include/QtCore -IC:QtSDKQtSources4.7.3/include -IC:QtSDKQtSources4.7.3/include/QtCore -IC:QtSDKQtSources4.7.3/src/corelib/global -IC:QtSDKQtSources4.7.3/src/corelib/xml -IC:QtSDKQtSources4.7.3/mkspecs/win32-g++ -IC:QtSDKQtSources4.7.3/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp
del project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o option.o winmakefile.o projectgenerator.o property.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o qbitarray.o qbuffer.o qbytearray.o qcryptographichash.o qvsnprintf.o qbytearraymatcher.o qconfig.o qdatetime.o qdir.o qdiriterator.o qfile.o qtemporaryfile.o qfileinfo.o qabstractfileengine.o qfsfileengine.o qfsfileengine_iterator.o qfsfileengine_win.o qfsfileengine_iterator_win.o qglobal.o qhash.o qiodevice.o qlibraryinfo.o qlist.o qlinkedlist.o qlocale.o qmalloc.o qmap.o qregexp.o qtextcodec.o qutfcodec.o qstring.o qstringlist.o qsystemlibrary.o qtextstream.o quuid.o qvector.o qurl.o qsettings.o qsettings_win.o qvariant.o qmetatype.o qxmlstream.o qxmlutils.o qnumeric.o
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -IC:QtSDKQtSources4.7.3/include -IC:QtSDKQtSources4.7.3/include/QtCore -IC:QtSDKQtSources4.7.3/include -IC:QtSDKQtSources4.7.3/include/QtCore -IC:QtSDKQtSources4.7.3/src/corelib/global -IC:QtSDKQtSources4.7.3/src/corelib/xml -IC:QtSDKQtSources4.7.3/mkspecs/win32-g++ -IC:QtSDKQtSources4.7.3/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNICODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAKE_OPENSOURCE_EDITION project.cpp
Building qmake failed, return code 2
@ -
wrote on 20 Apr 2011, 21:36 last edited by
These are some of the errors:
@
In file included from project.cpp:42:
project.h:45:25: error: qstringlist.h: No such file or directory
project.h:46:25: error: qtextstream.h: No such file or directory
project.h:47:21: error: qstring.h: No such file or directory
project.h:48:20: error: qstack.h: No such file or directory
project.h:49:18: error: qmap.h: No such file or directory
project.h:50:23: error: qmetatype.h: No such file or directory
In file included from property.h:45,
from project.cpp:43:
C:QtSDKQtSources4.7.3/src/corelib/global/qglobal.h:62:28: error: QtCore/qconf
ig.h: No such file or directory
C:QtSDKQtSources4.7.3/src/corelib/global/qglobal.h:1173:31: error: QtCore/qfe
atures.h: No such file or directory
In file included from project.cpp:44:
option.h:48:19: error: qfile.h: No such file or directory
In file included from project.cpp:45:
cachekeys.h:49:23: error: qfileinfo.h: No such file or directory
cachekeys.h:50:19: error: qhash.h: No such file or directory
In file included from project.cpp:46:
generators/metamakefile.h:47:19: error: qlist.h: No such file or directory
project.cpp:48:23: error: qdatetime.h: No such file or directory
project.cpp:51:18: error: qdir.h: No such file or directory
project.cpp:52:21: error: qregexp.h: No such file or directory
project.cpp:56:20: error: qdebug.h: No such file or directory
In file included from project.cpp:67:
C:QtSDKQtSources4.7.3/tools/shared/symbian/epocroot_p.h:56:28: error: QtCore/
qstring.h: No such file or directory
In file included from project.cpp:42:
project.h:54: error: expected constructor, destructor, or type conversion before
'class'
project.h:69: error: 'uint' does not name a type
project.h:75: error: ISO C++ forbids declaration of 'QStack' with no type
project.h:75: error: expected ';' before '<' token
project.h:76: error: ISO C++ forbids declaration of 'QStack' with no type
project.h:76: error: expected ';' before '<' token
project.h:79: error: ISO C++ forbids declaration of 'QMap' with no type
project.h:79: error: expected ';' before '<' token
project.h:84: error: 'QString' does not name a type
project.h:85: error: ISO C++ forbids declaration of 'QMakeProperty' with no typeproject.h:85: error: expected ';' before '' token
project.h:87: error: ISO C++ forbids declaration of 'QMap' with no type
project.h:87: error: expected ';' before '<' token
project.h:88: error: ISO C++ forbids declaration of 'QString' with no type
project.h:88: error: expected ',' or '...' before '&' token
project.h:103: error: 'QString' has not been declared
project.h:103: error: 'uchar' has not been declared
project.h:103: error: 'QMap' has not been declared
project.h:103: error: expected ',' or '...' before '<' token
project.h:105: error: ISO C++ forbids declaration of 'QStringList' with no type
project.h:105: error: expected ',' or '...' before '&' token
project.h:106: error: 'QString' has not been declared
project.h:106: error: 'QMap' has not been declared
project.h:106: error: expected ',' or '...' before '<' token
project.h:107: error: 'QStringList' does not name a type
project.h:108: error: 'QMakeProperty' has not been declared
project.h:108: error: ISO C++ forbids declaration of 'QMap' with no type
project.h:108: error: expected ',' or '...' before '<' token
project.h:109: error: ISO C++ forbids declaration of 'QStringList' with no type
project.h:109: error: expected ';' before '&' token
project.h:114: error: expected ')' before '' token
project.h:115: error: ISO C++ forbids declaration of 'QMap' with no type
project.h:115: error: expected ',' or '...' before '<' token
project.h:116: error: ISO C++ forbids declaration of 'QMap' with no type
project.h:116: error: expected ',' or '...' before '<' token
project.h:117: error: expected ')' before '*' token
project.h:122: error: ISO C++ forbids declaration of 'QString' with no type
project.h:122: error: expected ',' or '...' before '&' token
project.h:122: error: 'bool QMakeProject::parse(int)' cannot be overloaded
project.h:88: error: with 'bool QMakeProject::parse(int)'
project.h:123: error: ISO C++ forbids declaration of 'QString' with no type
project.h:123: error: expected ',' or '...' before '&' token
project.h:124: error: 'uchar' has not been declared
project.h:124: error: 'bool QMakeProject::read(int)' cannot be overloaded
project.h:123: error: with 'bool QMakeProject::read(int)'
project.h:126: error: 'QStringList' does not name a type
project.h:127: error: 'QStringList' does not name a type
project.h:129: error: 'QString' does not name a type
project.h:130: error: ISO C++ forbids declaration of 'QMakeProperty' with no typ
e@ -
wrote on 20 Apr 2011, 22:49 last edited by
(Re)-Compiling Qt from the sources within the SDK is know to cause problems. If you need a manually compiled version, I recommend to grab the sources from http://qt.nokia.com/downloads and use that one.
-
wrote on 20 Apr 2011, 22:52 last edited by
Is qt-everywhere-opensource-src-4.7.2.zip the right one?
-
wrote on 20 Apr 2011, 23:04 last edited by
You need perl in the path, I had the same issue. Download "activeperl":http://www.activestate.com/activeperl/downloads and your problems will go away ;-)
-
wrote on 20 Apr 2011, 23:12 last edited by
[quote author="Hedge" date="1303339941"]Is qt-everywhere-opensource-src-4.7.2.zip the right one?
[/quote]Yes, that's the right one (and the most recent, Qt 4.7.3 has not been released yet).
-
wrote on 20 Apr 2011, 23:22 last edited by
ucomesdag:
That helped but there are still 3 or 4 errors:@header created for C:/QtSDK/QtSources/4.7.3/src/qt3support/widgets/q3whatsthis.h
(2)
header created for C:/QtSDK/QtSources/4.7.3/src/qt3support/widgets/q3widgetstack
.h (2)
header (master) created for Qt3Support
headers.pri file created for Qt3Support
Creating qmake...
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -Igenerators/symbian -IC:\QtSDK\QtSources\4.7.3/include -IC:\QtSDK
QtSources\4.7.3/include/QtCore -IC:\QtSDK\QtSources\4.7.3/include -IC:\QtSDK\QtS
ources\4.7.3/include/QtCore -IC:\QtSDK\QtSources\4.7.3/src/corelib/global -IC:\Q
tSDK\QtSources\4.7.3/src/corelib/xml -IC:\QtSDK\QtSources\4.7.3/mkspecs/win32-g+- -IC:\QtSDK\QtSources\4.7.3/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLE
S -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNI
CODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_
GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAK
E_OPENSOURCE_EDITION project.cpp
project.cpp: In member function 'QStringList& QMakeProject::values(const QString
&, QMap<QString, QStringList>&)':
project.cpp:3004: error: 'class QDateTime' has no member named 'toString'
mingw32-make: *** [project.o] Error 1
del project.o main.o makefile.o unixmake.o unixmake2.o mingw_make.o option.o win
makefile.o projectgenerator.o property.o meta.o makefiledeps.o metamakefile.o xm
loutput.o pbuilder_pbx.o borland_bmake.o msvc_nmake.o msvc_vcproj.o msvc_vcxproj
.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.
o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o qbitarray
.o qbuffer.o qbytearray.o qcryptographichash.o qvsnprintf.o qbytearraymatcher.o
qconfig.o qdatetime.o qdir.o qdiriterator.o qfile.o qtemporaryfile.o qfileinfo.o
qabstractfileengine.o qfsfileengine.o qfsfileengine_iterator.o qfsfileengine_wi
n.o qfsfileengine_iterator_win.o qglobal.o qhash.o qiodevice.o qlibraryinfo.o ql
ist.o qlinkedlist.o qlocale.o qmalloc.o qmap.o qregexp.o qtextcodec.o qutfcodec.
o qstring.o qstringlist.o qsystemlibrary.o qtextstream.o quuid.o qvector.o qurl.
o qsettings.o qsettings_win.o qvariant.o qmetatype.o qxmlstream.o qxmlutils.o qn
umeric.o
C:\QtSDK\QtSources\4.7.3\qmake\project.o konnte nicht gefunden werden
g++ -c -oproject.o -O -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Ige
nerators/mac -Igenerators/symbian -IC:\QtSDK\QtSources\4.7.3/include -IC:\QtSDK
QtSources\4.7.3/include/QtCore -IC:\QtSDK\QtSources\4.7.3/include -IC:\QtSDK\QtS
ources\4.7.3/include/QtCore -IC:\QtSDK\QtSources\4.7.3/src/corelib/global -IC:\Q
tSDK\QtSources\4.7.3/src/corelib/xml -IC:\QtSDK\QtSources\4.7.3/mkspecs/win32-g+ - -IC:\QtSDK\QtSources\4.7.3/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLE
S -DQT_LITE_COMPONENT -DQT_NO_PCRE -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DUNI
CODE -DHAVE_QCONFIG_CPP -DQT_BUILD_QMAKE -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_
GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQMAK
E_OPENSOURCE_EDITION project.cpp
project.cpp: In member function 'QStringList& QMakeProject::values(const QString
&, QMap<QString, QStringList>&)':
project.cpp:3004: error: 'class QDateTime' has no member named 'toString'
mingw32-make: *** [project.o] Error 1
Building qmake failed, return code 2@
- -IC:\QtSDK\QtSources\4.7.3/tools/shared -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLE
-
wrote on 20 Apr 2011, 23:44 last edited by
[quote author="Hedge" date="1303341741"]ucomesdag:
That helped but there are still 3 or 4 errors:
[/quote]Did you run mingw32-make clean before retrying?
-
wrote on 22 Apr 2011, 20:33 last edited by
Bump!
Can anyone help me with the problem mentioned in the post above? -
wrote on 23 Apr 2011, 19:43 last edited by
Try it from the regular source package.
-
wrote on 23 Apr 2011, 22:16 last edited by
Did you try running configure without arguments and then build?
Here it builds fine with the QtSources 4.7.3 on windows 7 as I mentioned the only hick-up I had was that it needed perl. Btw the regular sources also seem to need perl for syncqt.
-
wrote on 26 Apr 2011, 11:45 last edited by
[quote author="ucomesdag" date="1303596988"]Btw the regular sources also seem to need perl for syncqt.[/quote]
syncqt is not needed for regular sources. I used to compile Qt myself on windows for years, I had no problems ever.
-
wrote on 28 Apr 2011, 10:34 last edited by
[quote author="Volker" date="1303818302"]
[quote author="ucomesdag" date="1303596988"]Btw the regular sources also seem to need perl for syncqt.[/quote]syncqt is not needed for regular sources. I used to compile Qt myself on windows for years, I had no problems ever.[/quote]
Same here, but because of the issue with the QtSources that come with the SDK I downloaded the regular sources cause I did'nt want to install perl, if I could have lived without it why install it now, and I had exactly the same issue it needed perl. -
wrote on 28 Apr 2011, 18:02 last edited by
syncqt is only needed if the source tree is different from the build tree (according to the configure shell script). I never needed perl on my Windows box when I compiled Qt mysql for a couple of years (always using the regular sources of the framework, no SDK; using MSVS). What are your configure options?
-
wrote on 28 Apr 2011, 21:47 last edited by
[quote author="Volker" date="1304013778"]syncqt is only needed if the source tree is different from the build tree (according to the configure shell script). I never needed perl on my Windows box when I compiled Qt mysql for a couple of years (always using the regular sources of the framework, no SDK; using MSVS). What are your configure options?[/quote]
None as I always used when compiling from source. -
wrote on 28 Apr 2011, 22:11 last edited by
Seems, I need to give it a try myself. I'll report soon.
-
wrote on 29 Apr 2011, 12:03 last edited by
[quote author="Volker" date="1304028718"]Seems, I need to give it a try myself. I'll report soon.[/quote]Please do so, would like to know if it's me that has it all wrong or not! :-)
-
wrote on 8 May 2011, 13:04 last edited by
I just ran two configure sessions for Qt 4.7.3, and all went without any problems.
Setup:
- Installed Qt Creator 2.2.0
- downloaded qt-everywhere-commercial-src-4.7.3.tar.gz (the open source should be fairly identical, except of licensing files)
- extract the archive
- cd into the extracted directory
- ran .\configure.exe in Visual Studio 2008 command prompt
- opened cmd.exe, put C:\Qt\qtcreator-2.2.0\mingw\bin into PATH and ran .\configure.exe -platform win32-g++ -qconfig minimal
No hassles with missing perl (it is not installed!) in both cases, no call of syncqt.