Bug 84321

Summary: [Qt][Texmap] Error of cross-compiling webkit with Qt 4.8.1
Product: WebKit Reporter: Fang Bao <Fang.Bao>
Component: New BugsAssignee: Noam Rosenthal <noam>
Status: RESOLVED FIXED    
Severity: Normal CC: abecsi, dongseong.hwang, hausmann, jturcotte, noam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
GCC command invoked in cross-compiling
none
Patch none

Fang Bao
Reported 2012-04-19 00:10:33 PDT
Created attachment 137857 [details] GCC command invoked in cross-compiling I’m trying to cross-compile latest webkit with Qt 4.8.1 and Qt5.0 alpha. There is a cross-compiling error in "TextureMapperGL.cpp" on building with Qt 4.8.1, not appearing on building with Qt 5.0 alpha. Here is the details: ================================================================ WebKit revision: r114348 WebKit port: Qt Qt version: 4.8.1 for Linux/X11, download from http://qt.nokia.com/downloads/linux-x11-cpp ================================================================ Host OS: Ubuntu 11.10 amd64 Host Platform: Desktop PC (Intel(R) Q8400) Target OS: Ubuntu 11.10 armel Target Platform: Pandaboard (OMAP4430, ARMv7 Processor rev 2) Toolchain: arm-linux-gnueabi-gcc (crosstool-NG linaro-1.13.1+bzr - Linaro GCC 2012.03) 4.6.3 ================================================================ Qt configuration from qconfig.pri: CONFIG += def_files_disabled exceptions no_mocdepend release stl qt_no_framework QT_ARCH = arm QT_EDITION = OpenSource QT_CONFIG += minimal-config small-config medium-config large-config full-config phonon phonon-backend accessibility egl openvg opengl opengles2 reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify png system-freetype zlib nis cups iconv glib gstreamer dbus openssl x11sm xshape xvideo xsync xrender mitshm fontconfig xkb alsa pulseaudio icu concurrent xmlpatterns multimedia audio-backend svg script scripttools declarative release ================================================================ Webkit command invoked: webkit_git/Tools/Scripts/build-webkit --qt --release --makeargs="-j5" --no-3d-canvas --media-statistics ================================================================ The output of error: In file included from /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/glx.h:45:0, from /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:43: /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:168:17: error: conflicting declaration ‘typedef double GLdouble’ /home/work/board_sync/Trolltech/Qt4/Qt-4.8.1/include/QtOpenGL/qgl.h:85:17: error: ‘GLdouble’ has a previous declaration as ‘typedef GLfloat GLdouble’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1667:23: error: expected type-specifier before ‘glBlendEquation’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1667:23: error: expected initializer before ‘glBlendEquation’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1669:23: error: expected type-specifier before ‘glBlendColor’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1669:23: error: expected initializer before ‘glBlendColor’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1859:23: error: expected type-specifier before ‘glActiveTexture’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1859:23: error: expected initializer before ‘glActiveTexture’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1950:23: error: expected type-specifier before ‘glSampleCoverage’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:1950:23: error: expected initializer before ‘glSampleCoverage’ In file included from /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/gl.h:2091:0, from /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/glx.h:45, from /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:43: /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/glext.h:5072:19: error: conflicting declaration ‘typedef ptrdiff_t GLintptr’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GLES2/gl2.h:38:26: error: ‘GLintptr’ has a previous declaration as ‘typedef khronos_intptr_t GLintptr’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GL/glext.h:5073:19: error: conflicting declaration ‘typedef ptrdiff_t GLsizeiptr’ /home/work/board_sync/rootfs_panda_ubuntu_1110/usr/include/GLES2/gl2.h:39:26: error: ‘GLsizeiptr’ has a previous declaration as ‘typedef khronos_ssize_t GLsizeiptr’ make[3]: *** [obj/release/TextureMapperGL.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release/Source/WebCore' make[2]: *** [sub-Target-pri-make_default-ordered] Error 2 make[2]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release/Source/WebCore' make[1]: *** [sub-Source-WebCore-WebCore-pro-make_default-ordered] Error 2 make[1]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release' make: *** [incremental] Error 2 ================================================================ GCC command invoked is added in attachment. ================================================================ Because this error doesn't appear on building with Qt 5.0 alpha, I'm not sure whether the latest WebKit could support Qt 4.8. Or did TextureMapperGL not support Qt4.8 on OpenGL ES2 platform?
Attachments
GCC command invoked in cross-compiling (11.54 KB, text/plain)
2012-04-19 00:10 PDT, Fang Bao
no flags
Patch (2.39 KB, patch)
2012-04-19 06:35 PDT, Noam Rosenthal
no flags
Andras Becsi
Comment 1 2012-04-19 03:40:46 PDT
(In reply to comment #0) > Or did TextureMapperGL not support Qt4.8 on OpenGL ES2 platform? Looks like there is a problem with our OpenGL ES2 support with Qt4.8. I remember we had somewhat similar issues with Qt5 related to missing defines and/or include order issues in Qt. Although because WebKit2 is Qt5-only I am not sure about the state of the texmap support for the WebKit1-only Qt4.8 version. CC'd some colleagues who might have more insight here.
Noam Rosenthal
Comment 2 2012-04-19 06:35:53 PDT
Simon Hausmann
Comment 3 2012-04-19 06:47:10 PDT
Comment on attachment 137892 [details] Patch rs=me . Does this also need a "makeCurrent" part?
Noam Rosenthal
Comment 4 2012-04-19 06:49:05 PDT
(In reply to comment #3) > (From update of attachment 137892 [details]) > rs=me . Does this also need a "makeCurrent" part? No. We use this as a way to make sure we re-initialize the shaders and other global resources for each context, we don't actually change the current context.
Noam Rosenthal
Comment 5 2012-04-19 07:02:51 PDT
Fang Bao, would you test if this patch works for you before I commit?
Fang Bao
Comment 6 2012-04-23 01:05:57 PDT
(In reply to comment #5) > Fang Bao, would you test if this patch works for you before I commit? Hi Noam, Thanks for your help. The patch fixed compiling errors. But I encountered a new compiling error in TextureMapperGL.cpp after rebuilding webkit revision r114348 with patch. Here is the error message. /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp: In member function ‘virtual void WebCore::BitmapTextureGL::didReset()’: /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:430:53: error: ‘GL_BGRA’ was not declared in this scope /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp: In member function ‘virtual void WebCore::BitmapTextureGL::updateContents(const void*, const WebCore::IntRect&, const WebCore::IntPoint&, int)’: /home/work/opensource/webkit/source/webkit_git/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp:448:20: error: ‘GL_BGRA’ was not declared in this scope make[3]: *** [obj/release/TextureMapperGL.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release/Source/WebCore' make[2]: *** [sub-Target-pri-make_default-ordered] Error 2 make[2]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release/Source/WebCore' make[1]: *** [sub-Source-WebCore-WebCore-pro-make_default-ordered] Error 2 make[1]: Leaving directory `/home/work/board_sync/rootfs_panda_ubuntu_1110/home/work/board_sync/WebKit/WebKit-114348_Qt-4.8.1/Release' make: *** [incremental] Error 2
WebKit Review Bot
Comment 7 2012-04-28 11:52:26 PDT
Comment on attachment 137892 [details] Patch Clearing flags on attachment: 137892 Committed r115576: <http://trac.webkit.org/changeset/115576>
WebKit Review Bot
Comment 8 2012-04-28 11:52:31 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.