When compiling xulrunner 2.0 with the qt4 backend enabled for the system cairo, the build fails with: ../../staticlib/libthebes.a(gfxASurface.o): In function `gfxASurface::Wrap(_cairo_surface*)': gfxASurface.cpp:(.text+0x1d1): undefined reference to `gfxQPainterSurface::gfxQPainterSurface(_cairo_surface*)' collect2: ld returned 1 exit status xulrunner expects the qt4 backend to be disabled if the qt toolkit isn't selected for the xulrunner build. A patch is included which checks for MOZ_WIDGET_QT as well as CAIRO_HAS_QT_SURFACE in gfxASurface.cpp. I have not tested the patch with the QT backend enabled, but it works with the gtk backend. Reproducible: Always
Created attachment 247094 [details, diff] Check for MOZ_WIDGET_QT as well as CAIRO_HAS_QT_SURFACE in order to build against the system cairo.
@mozilla: do we support qt4 xulrunner builds yet?
(In reply to comment #2) > @mozilla: do we support qt4 xulrunner builds yet? > Nope we do not but the cairo check is wrong in xul. will fix it in hg and push patch upstream for user.
(In reply to comment #3) > (In reply to comment #2) > > @mozilla: do we support qt4 xulrunner builds yet? > > > > Nope we do not but the cairo check is wrong in xul. will fix it in hg and push > patch upstream for user. > Err configure check is broken in many places at the moment. Here is the patch, I will push this up for the user. Thanks Joseph for your contributions
Created attachment 247244 [details, diff] check_for_moz_widget_qt_before_including_gfxQPainterSurface Patch updated for proper upstream inclusion.
Joseph Yasi Thanks for your contribution, it has been added to the overlay and I will get this upstream.
(In reply to comment #6) > Joseph Yasi Thanks for your contribution, it has been added to the overlay and > I will get this upstream. > You patch doesn't work. #ifdef doesn't support complex expressions and doesn't evaluate the defined(MOZ_WIDGET_QT) check. It needs to be #if defined(CAIRO_HAS_QT_SURFACE) && defined(MOZ_WIDGET_QT)
(In reply to comment #7) > (In reply to comment #6) > > Joseph Yasi Thanks for your contribution, it has been added to the overlay and > > I will get this upstream. > > > > You patch doesn't work. #ifdef doesn't support complex expressions and doesn't > evaluate the defined(MOZ_WIDGET_QT) check. It needs to be > #if defined(CAIRO_HAS_QT_SURFACE) && defined(MOZ_WIDGET_QT) > You are correct, sorry I was in a rush this morning. correct patch is now in overlay. Also we have added qt support so you might be interested.
(In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #6) > > > Joseph Yasi Thanks for your contribution, it has been added to the overlay and > > > I will get this upstream. > > > > > > > You patch doesn't work. #ifdef doesn't support complex expressions and doesn't > > evaluate the defined(MOZ_WIDGET_QT) check. It needs to be > > #if defined(CAIRO_HAS_QT_SURFACE) && defined(MOZ_WIDGET_QT) > > > > You are correct, sorry I was in a rush this morning. correct patch is now in > overlay. Also we have added qt support so you might be interested. > One more try, #if not #ifdef.
Checked and Double checked, thanks Joseph for keeping me on my toes.
You missed changing the 2nd #ifdef to #if in the patch. The patch changed two lines, not just one. The patch in the overlay shouldn't compile as is. Thanks for dealing with upstream for me.
No need to reopen a comment on the bug would suffice :) compile is fine either way.
Thank you for your patch Joseph. It has been pushed in mozilla-central repository: http://hg.mozilla.org/mozilla-central/rev/f8854fb6b63f
The firsh push was an outdated patch. Repushed as: http://hg.mozilla.org/mozilla-central/rev/dd06023bddcd