glShaderSource conflict - Interface on Pi 2


So I have revisited High Fidelity on the Pi, and after scratching my head with Qt (ended up working with 5.4.2), I managed to explore what steps were unneeded in my prior tutorial, so I will be rewriting it later on.

Out of curiosity, I decided to compile interface, and for the most part, it actually compiles pretty well. The issue seems to stem from the following:

Building CXX object libraries/entities-renderer/CMakeFiles/entities-renderer.dir/src/RenderableLightEntityItem.cpp.o
In file included from /usr/local/qt5/include/QtGui/qopengl.h:99:0,
                 from /usr/local/qt5/include/QtQuick/qquickwindow.h:39,
                 from /usr/local/qt5/include/QtQuick/QQuickWindow:1,
                 from /home/ubuntu/hifi/libraries/entities-renderer/src/RenderableWebEntityItem.cpp:14:
/usr/include/GLES2/gl2.h:600:125: error: declaration of C function 'void glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)' conflicts with
 GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
In file included from /usr/include/GL/gl.h:2059:0,
                 from /home/ubuntu/hifi/libraries/gpu/src/gpu/GPUConfig.h:37,
                 from /home/ubuntu/hifi/libraries/entities-renderer/src/RenderableWebEntityItem.cpp:11:
/usr/include/GL/glext.h:777:21: error: previous declaration 'void glShaderSource(GLuint, GLsizei, const GLchar* const*, const GLint*)' here
 GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length);

I’ve tried looking up the issues over this, but have come up with no direct solution. Compiling interface isn’t a massive priority on the Pi, but considering that it seems to only be held back due to what seems to be a library conflict, I was wondering if anyone had any input about a possible solution.

Pastebin: link


Yes, it looks like gl version headers are conflicting. The Pi should reference gl2.h/ES headers I guess.

I’m testing mine as a headless IoT device, given up trying to do “proper” computer stuff with it for the moment.