After several unsuccessful attempts to build Qt5.0.1 I tried to configure it with default options without opengl

./configure -no-opengl

My compiler is gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Here is the last portion of the make output where errors started to pop-up. What should be installed or changed to compile Qt5.0.1 from sources on Ubuntu? Any help/advise will be greatly appreciated. Thanks.


g++ -c -pipe -O2 -fno-exceptions -Wall -W -D_REENTRANT -fPIE -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I../../../mkspecs/linux-g++ -I. -I. -I../../../include -I../../../include/QtGui -I../../../include/QtCore -I.moc/release-shared -o .obj/release-shared/openglwindow.o openglwindow.cpp
In file included from openglwindow.cpp:41:0:
openglwindow.h:52:1: error: expected class-name before ‘{’ token
openglwindow.cpp: In destructor ‘virtual OpenGLWindow::~OpenGLWindow()’:
openglwindow.cpp:63:12: warning: possible problem detected in invocation of delete operator: [enabled by default]
openglwindow.cpp:63:12: warning: invalid use of incomplete type ‘class QOpenGLPaintDevice’ [enabled by default]
In file included from openglwindow.cpp:41:0:
openglwindow.h:47:7: warning: forward declaration of ‘class QOpenGLPaintDevice’ [enabled by default]
openglwindow.cpp:63:12: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
openglwindow.cpp: In member function ‘virtual void OpenGLWindow::render()’:
openglwindow.cpp:78:24: error: invalid use of incomplete type ‘class QOpenGLPaintDevice’
In file included from openglwindow.cpp:41:0:
openglwindow.h:47:7: error: forward declaration of ‘class QOpenGLPaintDevice’
openglwindow.cpp:80:13: error: ‘GL_COLOR_BUFFER_BIT’ was not declared in this scope
openglwindow.cpp:80:35: error: ‘GL_DEPTH_BUFFER_BIT’ was not declared in this scope
openglwindow.cpp:80:57: error: ‘GL_STENCIL_BUFFER_BIT’ was not declared in this scope
openglwindow.cpp:80:78: error: ‘glClear’ was not declared in this scope
openglwindow.cpp:82:13: error: invalid use of incomplete type ‘class QOpenGLPaintDevice’
In file included from openglwindow.cpp:41:0:
openglwindow.h:47:7: error: forward declaration of ‘class QOpenGLPaintDevice’
openglwindow.cpp:84:30: error: no matching function for call to ‘QPainter::QPainter(QOpenGLPaintDevice*&)â⠂¬â„¢
openglwindow.cpp:84:30: note: candidates are:
In file included from ../../../include/QtGui/qpainter.h:1:0,
from ../../../include/QtGui/QPainter:1,
from openglwindow.cpp:47:
../../../include/QtGui/../../src/gui/painting/qpainter.h:473:5: note: QPainter::QPainter(const QPainter&)
../../../include/QtGui/../../src/gui/painting/qpainter.h:473:5: note: no known conversion for argument 1 from ‘QOpenGLPaintDevice*’ to ‘const QPainter&’
../../../include/QtGui/../../src/gui/painting/qpainter.h:127:14: note: QPainter::QPainter(QPaintDevice*)
../../../include/QtGui/../../src/gui/painting/qpainter.h:127:14: note: no known conversion for argument 1 from ‘QOpenGLPaintDevice*’ to ‘QPaintDevice*’
../../../include/QtGui/../../src/gui/painting/qpainter.h:126:5: note: QPainter::QPainter()
../../../include/QtGui/../../src/gui/painting/qpainter.h:126:5: note: candidate expects 0 arguments, 1 provided
openglwindow.cpp: In member function ‘void OpenGLWindow::renderNow()’:
openglwindow.cpp:137:44: error: invalid use of incomplete type ‘class QOpenGLContext’
In file included from ../../../include/QtGui/qsurfaceformat.h:1:0,
from ../../../include/QtGui/../../src/gui/kernel/qsurface.h:46,
from ../../../include/QtGui/qsurface.h:1,
from ../../../include/QtGui/../../src/gui/kernel/qwindow.h:52,
from ../../../include/QtGui/qwindow.h:1,
from ../../../include/QtGui/QWindow:1,
from openglwindow.h:41,
from openglwindow.cpp:41:
../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘class QOpenGLContext’
openglwindow.cpp:138:18: error: invalid use of incomplete type ‘class QOpenGLContext’
In file included from ../../../include/QtGui/qsurfaceformat.h:1:0,
from ../../../include/QtGui/../../src/gui/kernel/qsurface.h:46,
from ../../../include/QtGui/qsurface.h:1,
from ../../../include/QtGui/../../src/gui/kernel/qwindow.h:52,
from ../../../include/QtGui/qwindow.h:1,
from ../../../include/QtGui/QWindow:1,
from openglwindow.h:41,
from openglwindow.cpp:41:
../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘class QOpenGLContext’
openglwindow.cpp:139:18: error: invalid use of incomplete type ‘class QOpenGLContext’
In file included from ../../../include/QtGui/qsurfaceformat.h:1:0,
from ../../../include/QtGui/../../src/gui/kernel/qsurface.h:46,
from ../../../include/QtGui/qsurface.h:1,
from ../../../include/QtGui/../../src/gui/kernel/qwindow.h:52,
from ../../../include/QtGui/qwindow.h:1,
from ../../../include/QtGui/QWindow:1,
from openglwindow.h:41,
from openglwindow.cpp:41:
../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘class QOpenGLContext’
openglwindow.cpp:144:14: error: invalid use of incomplete type ‘class QOpenGLContext’
In file included from ../../../include/QtGui/qsurfaceformat.h:1:0,
from ../../../include/QtGui/../../src/gui/kernel/qsurface.h:46,
from ../../../include/QtGui/qsurface.h:1,
from ../../../include/QtGui/../../src/gui/kernel/qwindow.h:52,
from ../../../include/QtGui/qwindow.h:1,
from ../../../include/QtGui/QWindow:1,
from openglwindow.h:41,
from openglwindow.cpp:41:
../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘class QOpenGLContext’
openglwindow.cpp:147:35: error: ‘initializeOpenGLFunctions’ was not declared in this scope
openglwindow.cpp:153:14: error: invalid use of incomplete type ‘class QOpenGLContext’
In file included from ../../../include/QtGui/qsurfaceformat.h:1:0,
from ../../../include/QtGui/../../src/gui/kernel/qsurface.h:46,
from ../../../include/QtGui/qsurface.h:1,
from ../../../include/QtGui/../../src/gui/kernel/qwindow.h:52,
from ../../../include/QtGui/qwindow.h:1,
from ../../../include/QtGui/QWindow:1,
from openglwindow.h:41,
from openglwindow.cpp:41:
../../../include/QtGui/../../src/gui/kernel/qsurfaceformat.h:51:7: error: forward declaration of ‘class QOpenGLContext’
make[4]: *** [.obj/release-shared/openglwindow.o] Error 1
make[4]: Leaving directory `/home/michael/Libraries/Qt/tmp/qtbase/examples/gui/openglwindow'
make[3]: *** [sub-openglwindow-make_first] Error 2
make[3]: Leaving directory `/home/michael/Libraries/Qt/tmp/qtbase/examples/gui'
make[2]: *** [sub-gui-make_first] Error 2
make[2]: Leaving directory `/home/michael/Libraries/Qt/tmp/qtbase/examples'
make[1]: *** [sub-examples-make_first] Error 2
make[1]: Leaving directory `/home/michael/Libraries/Qt/tmp/qtbase'
make: *** [module-qtbase-make_first] Error 2