Bug 95560 - [Qt] Use system OpenGLES / EGL includes if available instead of ANGLE includes
Summary: [Qt] Use system OpenGLES / EGL includes if available instead of ANGLE includes
Status: RESOLVED DUPLICATE of bug 95965
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Milian Wolff
Depends on:
Blocks: 95466
  Show dependency treegraph
Reported: 2012-08-31 05:15 PDT by Milian Wolff
Modified: 2012-09-06 22:46 PDT (History)
6 users (show)

See Also:

Patch (13.82 KB, patch)
2012-08-31 05:46 PDT, Milian Wolff
hausmann: review-
hausmann: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2012-08-31 05:15:47 PDT
Building QtWebKit for QNX with OpenGL support fails because the ANGLE headers in ThirdParty/ANGLE/include/{EGL,GLES2} are used instead of the system versions. These headers reference x11 headers for example, which is not available on QNX and thus triggers compilation errors.

I'll propose a patch based on Simon Hausmann's previous patch shown here: http://paste.ubuntu.com/1175616/

I had to extend it though, since the code in ANGLE/src contains includes of "GLSLANG/ShaderLang.h" which will not be found with the patch above, since ANGLE/include is not in the INCLUDEPATH anymore. To fix this, I will add the GLSLANG folder directly to the include path and change the includes to something like

#include "ShaderLang.h"
#include "GLSLANG/ShaderLang.h"

I'll add a patch.
Comment 1 Milian Wolff 2012-08-31 05:46:20 PDT
Created attachment 161675 [details]
Comment 2 WebKit Review Bot 2012-08-31 05:49:22 PDT
Attachment 161675 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/ThirdParty/ANGLE/ChangeLog', u'Sour..." exit_code: 1
Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp:14:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 1 in 16 files

If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Milian Wolff 2012-08-31 05:53:47 PDT
The style check is a false-positive afaiks, as this is ThirdParty code.
Comment 4 John Bauman 2012-08-31 08:08:00 PDT
It would make more sense to modify eglplatform.h not to include X11 headers (and use their types) on QNX. It looks like this has already been done for android. Also, please upstream any changes.
Comment 5 John Bauman 2012-08-31 08:14:43 PDT
Or alternatively, if QNX doesn't support EGL, you could try ensuring that Extensions3DOpenGLES.cpp isn't compiled there.
Comment 6 Milian Wolff 2012-08-31 08:38:40 PDT
Thanks for the hint, EGL is supported and there is a eglplatform.h - I'll copy the code from there and put it into ANGLE's eglplatform.h and revise the patch presented here. Or, well - I'll try to get it upstream into ANGLE also.
Comment 7 Simon Hausmann 2012-09-06 22:45:09 PDT
Comment on attachment 161675 [details]

The solution to this is to change the way Angle is built and it's been done already :)
Comment 8 Simon Hausmann 2012-09-06 22:46:04 PDT
Bug #95965 fixes the issue of building WebKit on a platform where EGL/GLES2 is provided and where those would clash with Angle.

*** This bug has been marked as a duplicate of bug 95965 ***