While Building QtWebkit-2.3 (git commit abd77b3f85375632aa313934e8eb9ae89f2bbf2e, from git://gitorious.org/+qtwebkit-developers/webkit/qtwebkit-23.git) for an embedded system running Qt 4.8.1 with OpenGL ES2, the build eventually dies with a failure to find -lXrender. Linking against Xrender was introduced with the below change: commit 611b1450798b71d2931d1d90a585e2cae77ac4c2 Author: commit-queue <commit-queue@webkit.org> Date: Wed Sep 12 12:10:20 2012 +0000 [Qt] Build on X11 with GraphicsSurface but without NPAPI is broken https://bugs.webkit.org/show_bug.cgi?id=96495 Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-09-12 Reviewed by Kenneth Rohde Christiansen. When enabling NPAPI we link against XRender on X11. The other component that needs Xrender is GraphicsSurface. So when building without NPAPI we need to make sure that we link in Xrender. This patch cleans up the GraphicsSurface related linkage required on Mac OS X and X11 by wrapping it in use?(graphics_surface) instead of 3D_GRAPHICS. It is not neccesary to perform the have?(XCOMPOSITE) check anymore because it's already done in features.prf before enabling use_graphics_surface in the first place. * WebCore.pri: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128294 268f45cc-cd09-0410-ab3c-d52691b4dbfc In WebCore.pri, one can indeed read: contains(DEFINES, WTF_USE_3D_GRAPHICS=1) { contains(QT_CONFIG, opengles2):!win32: LIBS += -lEGL mac: LIBS += -framework IOSurface -framework CoreFoundation linux-*: { contains(DEFINES, HAVE_XCOMPOSITE=1): LIBS += -lXcomposite LIBS += -lXrender CONFIG *= x11 } haveQt(4): QT *= opengl }
I wonder if something like: contains(DEFINES, WTF_USE_3D_GRAPHICS=1) { contains(QT_CONFIG, opengles2):!win32: LIBS += -lEGL mac: LIBS += -framework IOSurface -framework CoreFoundation linux-*: { xlibAvailable() { contains(DEFINES, HAVE_XCOMPOSITE=1): LIBS += -lXcomposite LIBS += -lXrender CONFIG *= x11 } } haveQt(4): QT *= opengl } would do the trick
(In reply to comment #1) Looks like we have similar logic in Tools/qmake/mkspecs/features/features.prf where we have: config_libXcomposite: WEBKIT_CONFIG += have_xcomposite config_libXrender: WEBKIT_CONFIG += have_xrender config_glx:!contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += have_glx Could you try something like this and tell me if that works? contains(DEFINES, HAVE_XCOMPOSITE=1): LIBS += -lXcomposite contains(DEFINES, HAVE_XRENDER=1): LIBS += -lXrender contains(DEFINES, HAVE_GLX=1): CONFIG *= x11
Thanks Jocelyn, that worked too! I'll attach a patch with your changes to this ticket
Created attachment 172643 [details] proposed patch
(In reply to comment #4) > Created an attachment (id=172643) [details] > proposed patch The patch doesn't apply since it was created from the 2.3 branch and this code was moved to Tools/qmake/mkspecs/features/features.prf in trunk. If you can redo the patch on top of trunk it would be better, or tell if you want me to do it instead.
I don't mind providing a patch for trunk but one question, how do I get this patch also reviewed and applied for the 2.3 branch?
(In reply to comment #6) > I don't mind providing a patch for trunk but one question, how do I get this patch also reviewed and applied for the 2.3 branch? Allan goes over trunk and cherry-picks most of the patches so it should end up in the branch after 2-3 weeks. Adding this to the 2.3 tracker bug just in case.
Created attachment 172757 [details] patch for trunk
Comment on attachment 172757 [details] patch for trunk Attachment 172757 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/14765060
Comment on attachment 172757 [details] patch for trunk Attachment 172757 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/14765062
Comment on attachment 172757 [details] patch for trunk Humm that would be wrong since GRAPHICS_SURFACE is presently bound to X on Linux so it wouldn't make sense to make it conditional. The conditions were moved and I think that the issue is fixed on trunk because of this part in Tools/qmake/mkspecs/features/features.prf: use?(3d_graphics) { mac: WEBKIT_CONFIG += use_graphics_surface win32:contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += use_graphics_surface linux-*:contains(WEBKIT_CONFIG, have_glx):contains(WEBKIT_CONFIG, have_xcomposite):contains(WEBKIT_CONFIG, have_xrender): WEBKIT_CONFIG += use_graphics_surface } Sorry that I asked you to create another patch without checking first, but hopefully the issue will be fixed for you on the next merge from trunk. Please tell if you have other issues.
No issues. I am closing this issue then. Thanks for your support!
Reopen. The code has been merged, but the merge is slightly wrong because the build systems has diverged.
Created attachment 172771 [details] Patch for qtwebkit23 This merges the code to be closer to trunk but using the old build-system. Note that use_graphics_surface will never be set since the HAVE_X.* flags only work in qt5.
commited as 1edb2e102012ecd6ed7ea062b99678cd4b1a974f and pushed in qtwebkit-2.3-staging.