Bug 101249

Summary: [Qt4] QtWebKit-2.3 tries to open non-existent qopengl.h
Product: WebKit Reporter: Cedric Hombourger <chombourger>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: allan.jensen, dino, noam, webkit.review.bot
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 88186    
Attachments:
Description Flags
proposed patch
chombourger: review-
proposed patch none

Description Cedric Hombourger 2012-11-05 13:27:03 PST
While trying to build QtWebKit-2.3 for an OpenGL ES2 platform running Qt 4.8.1, build of abd77b3f85375632aa313934e8eb9ae89f2bbf2e (git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit-23.git) fails with many errors from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h. The first error raised is:

Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLES.h:35:21: error: qopengl.h: No such file or directory

Subsequent errors are simply caused by the above. The following is an excerpt of Extensions3DOpenGLES.h:

#include "Extensions3DOpenGLCommon.h"

#if PLATFORM(QT)
// Takes care of declaring the GLES extensions.
#include <qopengl.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif

The #include <opengl.h> has been added with the following commit:

commit 782d2b09837c843a4afbae149e6c6b22bf1b3870
Author: commit-queue <commit-queue@webkit.org>
Date:   Tue Sep 18 12:21:44 2012 +0000

    Fix compilation with Qt 5 on MeeGo 1.2 Harmattan
    https://bugs.webkit.org/show_bug.cgi?id=96937
    
    Patch by Simon Hausmann <simon.hausmann@digia.com> on 2012-09-18
    Reviewed by Jocelyn Turcotte.
    
    The gl2ext.h header file on the platform is outdated. Instead use the newer copy from Qt
    through implicit inclusion of qopengl.h. Since Qt's declarations are based on newer Khronos
    headers, the multi sampling extensions do have the PROC suffix, we need the same workaround
    as QNX.
    
    * platform/graphics/opengl/Extensions3DOpenGLES.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

A simple work-around is to add " && HAVE(QT5)" to "#if PLATFORM(QT)"
Comment 1 Cedric Hombourger 2012-11-05 14:03:46 PST
Created attachment 172399 [details]
proposed patch
Comment 2 WebKit Review Bot 2012-11-05 14:08:30 PST
Attachment 172399 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/ChangeLog:11:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:12:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
Source/WebCore/ChangeLog:14:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 4 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Cedric Hombourger 2012-11-05 14:15:02 PST
Created attachment 172404 [details]
proposed patch
Comment 4 Allan Sandfeld Jensen 2012-11-07 05:23:29 PST
Does it also work if you include qgl.h instead of qopengl.h ?
Comment 5 Allan Sandfeld Jensen 2012-11-07 06:20:22 PST
Comment on attachment 172404 [details]
proposed patch

Qt4 specific changes are no longer commited to trunk, but I will apply it on QtWebKit2.3
Comment 6 Allan Sandfeld Jensen 2012-11-07 06:24:47 PST
Commited as 93525bce7330e0b56f186140b6a053a4f3dbf9a4
and pushed in qtwebkit-2.3-staging