PDA

View Full Version : Statically compiling QT fails in mingw32-make command



kguptaqt
18th January 2010, 07:07
Hi I am new to QT. Just wanted to statically compile Qt. Ran two commands :

1) configure –static –platform win32-g++ (worked fine without any problem)
2) mingw32-make (it took around 2 hours and failed at last).

the errors are:

mingw32-make[4]: Entering directory `C:/Qt/2009.05/qt/src/plugins/codecs/kr'
g++ -c -g -Wall -frtti -fexceptions -mthreads -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..
\include\QtCore" -I"..\..\..\..\include" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT
_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtNetwork" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include" -I"..\..\..\3rdparty\h
arfbuzz\src" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\qgraphicssystem_trace.o qgra
phicssystem_trace.cpp
ar -ru ..\..\..\..\plugins\graphicssystems\libqtracegraph icssystemd.a tmp/obj/debug_static/main.o tmp/obj/debug_static/qgraphicssystem_trace.o
mingw32-make[4]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/trace'
mingw32-make -f Makefile.Release all
mingw32-make[4]: Entering directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/trace'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQ
T_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtNetwork" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include" -I"..\.
.\..\3rdparty\harfbuzz\src" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\release_static\main.o ma
in.cpp
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQ
T_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtNetwork" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include" -I"..\.
.\..\3rdparty\harfbuzz\src" -I"..\..\..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\release_static\qgraphics
system_trace.o qgraphicssystem_trace.cpp
ar -ru ..\..\..\..\plugins\graphicssystems\libqtracegraph icssystem.a tmp/obj/release_static/main.o tmp/obj/release_static/qgraphicssystem_trace.o
mingw32-make[4]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/trace'
mingw32-make[3]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/trace'
cd opengl\ && mingw32-make -f Makefile
mingw32-make[3]: Entering directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
mingw32-make -f Makefile.Debug all
mingw32-make[4]: Entering directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_
THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\QtOpenGL" -I"..\..\..\..\include" -I"..\..\..\..\include\A
ctiveQt" -I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\main.o main.cpp
ar -ru ..\..\..\..\plugins\graphicssystems\libqglgraphics systemd.a tmp/obj/debug_static/main.o
mingw32-make[4]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
mingw32-make -f Makefile.Release all
mingw32-make[4]: Entering directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT
_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\QtOpenGL" -I"..\..\..\..\include" -I"..\..\
..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\release_static\main.o main.cpp
ar -ru ..\..\..\..\plugins\graphicssystems\libqglgraphics system.a tmp/obj/release_static/main.o
mingw32-make[4]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
mingw32-make[3]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems/opengl'
mingw32-make[2]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/graphicssystems'
cd phonon\ && mingw32-make -f Makefile
mingw32-make[2]: Entering directory `C:/Qt/2009.05/qt/src/plugins/phonon'
cd ds9\ && mingw32-make -f Makefile
mingw32-make[3]: Entering directory `C:/Qt/2009.05/qt/src/plugins/phonon/ds9'
mingw32-make -f Makefile.Debug all
mingw32-make[4]: Entering directory `C:/Qt/2009.05/qt/src/plugins/phonon/ds9'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_PHONON_LIB -D
QT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\phonon" -I"..\..\..\..\inclu
de" -I"..\..\..\..\include\ActiveQt" -I"..\..\..\..\include\phonon_compat\phonon" -I"..\..\..\..\include\phonon_compat" -I"..\..\..\..\include\phonon\Phonon"
-I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\abstractvideorenderer.o ..\..\..\3rdparty\phonon\ds9\abstractvideorendere
r.cpp
C:/Qt/2009.05/qt/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_C
ORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\phonon" -I"..\..\..\..\include" -I"..\..\..\.
.\include\ActiveQt" -I"..\..\..\..\include\phonon_compat\phonon" -I"..\..\..\..\include\phonon_compat" -I"..\..\..\..\include\phonon\Phonon" -I"tmp\moc\debug
_static" -I"..\..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\..\..\3rdparty\phonon\ds9\audiooutput.h -o tmp\moc\debug_static\moc_audiooutput.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_PHONON_LIB -D
QT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\phonon" -I"..\..\..\..\inclu
de" -I"..\..\..\..\include\ActiveQt" -I"..\..\..\..\include\phonon_compat\phonon" -I"..\..\..\..\include\phonon_compat" -I"..\..\..\..\include\phonon\Phonon"
-I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\audiooutput.o ..\..\..\3rdparty\phonon\ds9\audiooutput.cpp
C:/Qt/2009.05/qt/bin/moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_C
ORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\phonon" -I"..\..\..\..\include" -I"..\..\..\.
.\include\ActiveQt" -I"..\..\..\..\include\phonon_compat\phonon" -I"..\..\..\..\include\phonon_compat" -I"..\..\..\..\include\phonon\Phonon" -I"tmp\moc\debug
_static" -I"..\..\..\..\mkspecs\win32-g++" -D__GNUC__ -DWIN32 ..\..\..\3rdparty\phonon\ds9\backend.h -o tmp\moc\debug_static\moc_backend.cpp
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DPHONON_MAKE_QT_ONLY_BACKEND -DQT_STATICPLUGIN -DQT_PLUGIN -DQT_PHONON_LIB -D
QT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\include\QtGui" -I"..\..\..\..\include\phonon" -I"..\..\..\..\inclu
de" -I"..\..\..\..\include\ActiveQt" -I"..\..\..\..\include\phonon_compat\phonon" -I"..\..\..\..\include\phonon_compat" -I"..\..\..\..\include\phonon\Phonon"
-I"tmp\moc\debug_static" -I"..\..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_static\backend.o ..\..\..\3rdparty\phonon\ds9\backend.cpp
..\..\..\3rdparty\phonon\ds9\backend.cpp: In static member function 'static QMutex* Phonon::DS9::Backend::directShowMutex()':
..\..\..\3rdparty\phonon\ds9\backend.cpp:69: error: 'qt_plugin_instance' was not declared in this scope
mingw32-make[4]: *** [tmp/obj/debug_static/backend.o] Error 1
mingw32-make[4]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/phonon/ds9'
mingw32-make[3]: *** [debug-all] Error 2
mingw32-make[3]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/phonon/ds9'
mingw32-make[2]: *** [sub-ds9-make_default] Error 2
mingw32-make[2]: Leaving directory `C:/Qt/2009.05/qt/src/plugins/phonon'
mingw32-make[1]: *** [sub-phonon-make_default] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/2009.05/qt/src/plugins'
mingw32-make: *** [sub-plugins-make_default-ordered] Error 2

Please help. Am i missing something.

wysota
22nd January 2010, 10:58
It seems you can't build Phonon statically, at least not with ds9 backend.

GeppyZ
2nd March 2010, 14:22
Iam also having issues like his. Iam building on Windows 7 x64 with nmake (VisualStudio 2008) & tried it with MingW32-Make. If i compile with '-no-phonon' it crashes at a dependency that webkit has with phonon. So i have to compile it. How do we do this on windows? I am also running into problems on Mac OS X & Ubuntu, but i will keep it on topic here :)

JD2000
2nd March 2010, 17:52
..\..\..\3rdparty\phonon\ds9\backend.cpp:69: error: 'qt_plugin_instance' was not declared in this scope

This is the error that stopped compilation, have you tried opening backend.cpp and looking at line 69 to see what is going on?