Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337036 - [mozilla overlay] net-libs/xulrunner-2.0_beta6_pre doesn't compile with x11-libs/cairo-1.10.0-r3[+qt4]
Summary: [mozilla overlay] net-libs/xulrunner-2.0_beta6_pre doesn't compile with x11-l...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords: InOverlay
Depends on:
Blocks:
 
Reported: 2010-09-13 05:39 UTC by Joseph Yasi
Modified: 2010-09-20 23:05 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Check for MOZ_WIDGET_QT as well as CAIRO_HAS_QT_SURFACE in order to build against the system cairo. (xulrunner-fix-cairo-qt.patch,642 bytes, patch)
2010-09-13 05:40 UTC, Joseph Yasi
Details | Diff
check_for_moz_widget_qt_before_including_gfxQPainterSurface (check_for_moz_widget_qt_before_including_gfxQPainterSurface.patch,1.28 KB, patch)
2010-09-14 12:56 UTC, Jory A. Pratt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Yasi 2010-09-13 05:39:05 UTC
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
Comment 1 Joseph Yasi 2010-09-13 05:40:42 UTC
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.
Comment 2 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-09-14 10:09:22 UTC
@mozilla: do we support qt4 xulrunner builds yet?
Comment 3 Jory A. Pratt gentoo-dev 2010-09-14 12:42:45 UTC
(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.
Comment 4 Jory A. Pratt gentoo-dev 2010-09-14 12:55:29 UTC
(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
Comment 5 Jory A. Pratt gentoo-dev 2010-09-14 12:56:47 UTC
Created attachment 247244 [details, diff]
check_for_moz_widget_qt_before_including_gfxQPainterSurface

Patch updated for proper upstream inclusion.
Comment 6 Jory A. Pratt gentoo-dev 2010-09-14 13:04:54 UTC
Joseph Yasi  Thanks for your contribution, it has been added to the overlay and I will get this upstream.
Comment 7 Joseph Yasi 2010-09-14 14:12:53 UTC
(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)
Comment 8 Jory A. Pratt gentoo-dev 2010-09-14 22:20:21 UTC
(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.
Comment 9 Joseph Yasi 2010-09-14 22:28:51 UTC
(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.
Comment 10 Jory A. Pratt gentoo-dev 2010-09-16 03:54:14 UTC
Checked and Double checked, thanks Joseph for keeping me on my toes.
Comment 11 Joseph Yasi 2010-09-17 23:28:49 UTC
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.
Comment 12 Jory A. Pratt gentoo-dev 2010-09-18 00:32:06 UTC
No need to reopen a comment on the bug would suffice :) compile is fine either way.
Comment 13 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2010-09-20 22:35:54 UTC
Thank you for your patch Joseph. It has been pushed in mozilla-central repository:
http://hg.mozilla.org/mozilla-central/rev/f8854fb6b63f
Comment 14 Mounir Lamouri (volkmar) (RETIRED) gentoo-dev 2010-09-20 23:05:50 UTC
The firsh push was an outdated patch.
Repushed as:
http://hg.mozilla.org/mozilla-central/rev/dd06023bddcd