Bug 136431 - [GTK] [JHBuild] Cyclic dependency between cairo and librsvg
Summary: [GTK] [JHBuild] Cyclic dependency between cairo and librsvg
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-01 10:04 PDT by Carlos Alberto Lopez Perez
Modified: 2014-09-01 11:10 PDT (History)
4 users (show)

See Also:


Attachments
Build log for "Tools/gtk/install-dependencies" that shows the cyclic dependency between cairo and libsrvg. (270.89 KB, text/plain)
2014-09-01 10:04 PDT, Carlos Alberto Lopez Perez
no flags Details
Patch (1.66 KB, patch)
2014-09-01 10:19 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2014-09-01 10:04:27 PDT
Created attachment 237454 [details]
Build log for "Tools/gtk/install-dependencies" that shows the cyclic dependency between cairo and libsrvg.

There is a cyclic dependency between cairo and libsrvg.

* libsrvg needs cairo to be built.
* cairo needs libsrvg to run the SVG testsuite.

On most cases this went unnoticed because the developer machine had the libsrvg development libraries installed, so the jhbuild cairo used that libraries to build and run the test suite. But if the machine has not the libsrvg libraries cairo will fail to build.

I'm attaching the complete build log for "Tools/gtk/install-dependencies" where you can see the issue.

On top of that, libsrvg was missing declared dependencies on both cairo and glib, which may cause that the package is built before glib or cairo, and in that cause it will either fail to build or link against the system libraries instead of the jhbuild ones.
Comment 1 Carlos Alberto Lopez Perez 2014-09-01 10:10:07 PDT
According to http://comments.gmane.org/gmane.linux.lfs.beyond.support/44277 the cairo SVG testsuite seems to be kind of broken. Also it don't makes much sense that we run the cairo testsuite, we are not developing cairo.

According to http://lists.freedesktop.org/archives/cairo/2012-April/022952.html one way of disabling the cairo SVG testsuite is passing ac_cv_func_rsvg_pixbuf_from_file=no in the cairo configure flags.

I tested that, and it works as expected. This diff is what changes between running "./configure" or "./configure ac_cv_func_rsvg_pixbuf_from_file=no"


$ diff -u config.log1 config.log2
--- config.log1	2014-09-01 16:27:39.086909128 +0000
+++ config.log2	2014-09-01 16:28:24.146909588 +0000
@@ -327,7 +327,8 @@
 checking for cairo's SVG surface backend feature... 
 checking whether cairo's SVG surface backend feature could be enabled... yes
 checking for LIBRSVG... yes
-checking for rsvg_pixbuf_from_file... yes
+checking for rsvg_pixbuf_from_file... (cached) no
+configure: WARNING: SVG backend will not be tested since librsvg >= 2.15.0 is not available
 checking for cairo's image surface backend feature... 
 checking for pixman... yes
 checking whether cairo's image surface backend feature could be enabled... yes
@@ -488,6 +489,6 @@
   test surfaces: no (disabled, use --enable-test-surfaces to enable)
   ps testing:    no (requires libspectre)
   pdf testing:   no (requires poppler-glib >= 0.17.4)
-  svg testing:   yes
+  svg testing:   no (requires librsvg-2.0 >= 2.15.0)
Comment 2 Carlos Alberto Lopez Perez 2014-09-01 10:19:04 PDT
Created attachment 237455 [details]
Patch
Comment 3 WebKit Commit Bot 2014-09-01 11:10:48 PDT
Comment on attachment 237455 [details]
Patch

Clearing flags on attachment: 237455

Committed r173159: <http://trac.webkit.org/changeset/173159>
Comment 4 WebKit Commit Bot 2014-09-01 11:10:52 PDT
All reviewed patches have been landed.  Closing bug.