Compiling Plasma-Framework with a QT5 compiled with -egl -opengl es2

Nicolás Alvarez nicolas.alvarez at gmail.com
Thu Oct 10 03:07:02 UTC 2013


2013/10/9 nerdopolis <bluescreen_avenger at verizon.net>:
> Hi.
>
> I am trying to compile plasma-framework against a qt5 that is ready for Wayland, which does not have Desktop GL enabled.
>
> However I seem to get an error that seems to be related to opengl in QT.
>
> Is this a bug I should file?
>
>
> This is the relevant output:
> [ 81%] Building CXX object examples/dataengines/sourcesOnRequest/CMakeFiles/plasma_dataengine_example_sourcesOnRequest.dir/plasma_dataengine_example_sourcesOnRequest_automoc.cpp.o
> [ 82%] Building CXX object src/plasmaquick/CMakeFiles/PlasmaQuick.dir/configview.cpp.o
> In file included from /opt/include/GL/glx.h:32:0,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
> /opt/include/GL/gl.h:162:17: error: conflicting declaration ‘typedef double GLdouble’
>  typedef double  GLdouble; /* double precision float */
>                  ^
> In file included from /opt/include/QtQuick/qsggeometry.h:46:0,
>                  from /opt/include/QtQuick/qsgnode.h:45,
>                  from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
>                  from /opt/include/QtQuick/QSGSimpleTextureNode:1,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
> /opt/include/QtGui/qopengl.h:97:17: error: ‘GLdouble’ has a previous declaration as ‘typedef GLfloat GLdouble’
>  typedef GLfloat GLdouble;
>                  ^
> In file included from /opt/include/GL/gl.h:2085:0,
>                  from /opt/include/GL/glx.h:32,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
> /opt/include/GL/glext.h:459:19: error: conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’
>  typedef ptrdiff_t GLsizeiptr;
>                    ^
> In file included from /opt/include/QtGui/qopengl.h:82:0,
>                  from /opt/include/QtQuick/qsggeometry.h:46,
>                  from /opt/include/QtQuick/qsgnode.h:45,
>                  from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
>                  from /opt/include/QtQuick/QSGSimpleTextureNode:1,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
> /opt/include/GLES2/gl2.h:39:26: error: ‘GLsizeiptr’ has a previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’
>  typedef khronos_ssize_t  GLsizeiptr;
>                           ^
> In file included from /opt/include/GL/gl.h:2085:0,
>                  from /opt/include/GL/glx.h:32,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
> /opt/include/GL/glext.h:460:19: error: conflicting declaration ‘typedef ptrdiff_t GLintptr’
>  typedef ptrdiff_t GLintptr;
>                    ^
> In file included from /opt/include/QtGui/qopengl.h:82:0,
>                  from /opt/include/QtQuick/qsggeometry.h:46,
>                  from /opt/include/QtQuick/qsgnode.h:45,
>                  from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
>                  from /opt/include/QtQuick/QSGSimpleTextureNode:1,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
> /opt/include/GLES2/gl2.h:38:26: error: ‘GLintptr’ has a previous declaration as ‘typedef khronos_intptr_t GLintptr’
>  typedef khronos_intptr_t GLintptr;
>                           ^
> In file included from /opt/include/GL/gl.h:2085:0,
>                  from /opt/include/GL/glx.h:32,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:32:
> /opt/include/GL/glext.h:2169:149: error: conflicting declaration ‘typedef void (* GLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, const void*)’
>  typedef void (APIENTRY  *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
>                                                                                                                                                      ^
> In file included from /opt/include/QtGui/qopengl.h:92:0,
>                  from /opt/include/QtQuick/qsggeometry.h:46,
>                  from /opt/include/QtQuick/qsgnode.h:45,
>                  from /opt/include/QtQuick/qsgsimpletexturenode.h:45,
>                  from /opt/include/QtQuick/QSGSimpleTextureNode:1,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.h:24,
>                  from /srcbuild/plasma-framework/src/declarativeimports/core/windowthumbnail.cpp:19:
> /opt/include/QtGui/qopengles2ext.h:192:28: error: ‘GLDEBUGPROC’ has a previous declaration as ‘typedef void (* GLDEBUGPROC)(GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar*, GLvoid*)’
>  typedef void (GL_APIENTRYP GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);

The specific code in windowthumbnail.cpp triggering the errors depends
on X11 and desktop GL. I don't see a clean way to disable it (such as
a flag to choose between GL or GL ES), but you can stop it from
finding the relevant packages by running cmake with:
-DCMAKE_DISABLE_FIND_PACKAGE_XCB=1 -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=1

I haven't tested it.

-- 
Nicolás


More information about the Kde-frameworks-devel mailing list