[meta-ti] Build of qtbase fails due to no OpenGL libraries, but completes after cleaning qtbase.

Ulf Samuelsson meta-ti at emagii.com
Tue Jul 1 22:21:24 PDT 2014


When I build an image with QT5 using meta-arago, qtbase fails with a lot 
of error messages.


Some errors:

$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.h:52:1: 
error: expected class-name before '{' token
linking part1
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp: 
In destructor 'virtual OpenGLWindow::~OpenGLWindow()':
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:63:12: 
warning: possible problem detected in invocation of delete operator: 
[enabled by default]
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:63:12: 
warning: invalid use of incomplete type 'class QOpenGLPaintDevice' 
[enabled by default]
In file included from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:41:0:
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.h:47:7: 
warning: forward declaration of 'class QOpenGLPaintDevice' [enabled by 
default]
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/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
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp: 
In member function 'virtual void OpenGLWindow::render()':
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:78:24: 
error: invalid use of incomplete type 'class QOpenGLPaintDevice'
In file included from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:41:0:
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.h:47:7: 
error: forward declaration of 'class QOpenGLPaintDevice'
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:80:13: 
error: 'GL_COLOR_BUFFER_BIT' was not declared in this scope
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:80:35: 
error: 'GL_DEPTH_BUFFER_BIT' was not declared in this scope
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:80:57: 
error: 'GL_STENCIL_BUFFER_BIT' was not declared in this scope
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:80:78: 
error: 'glClear' was not declared in this scope
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:82:13: 
error: invalid use of incomplete type 'class QOpenGLPaintDevice'
In file included from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:41:0:
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.h:47:7: 
error: forward declaration of 'class QOpenGLPaintDevice'
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:84:30: 
error: no matching function for call to 
'QPainter::QPainter(QOpenGLPaintDevice*&)'
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:84:30: 
note: candidates are:
In file included from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/include/QtGui/qpainter.h:1:0,
                  from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/include/QtGui/QPainter:1,
                  from 
$TMP/$WORKDIR/5.1.1-r0-arago1/qtbase-opensource-src-5.1.1/examples/gui/openglwindow/openglwindow.cpp:47:

Googling indicates that this is because:

    "If -no-opengl is specified and OpenGL development files are 
installed, the error does occur."

If I clean out qtbase, and then continue build, it will complete.
$ bitbase -c cleansstate qtbase
$ bitbake <image>

My guess is that during configuration, OpenGL cannot be found, but it is 
there during compile.
There seems to be a dependency error (libgles-omap3?).




BR
Ulf Samuelsson


More information about the meta-ti mailing list