Bug 7179 - Building cairo can trigger a circular dependency (cairo tests->pango->gtk+->cairo) causing build pain
Summary: Building cairo can trigger a circular dependency (cairo tests->pango->gtk+->c...
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.1.1
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-10 13:04 UTC by Elijah Newren
Modified: 2006-06-19 08:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to track addition of cairo_surface_set_fallback_resolution (2.27 KB, patch)
2006-06-10 16:23 UTC, Carl Worth
Details | Splinter Review

Description Elijah Newren 2006-06-10 13:04:59 UTC
I ran across this when rebuilding:

/opt/gnome2/lib/libgtk-x11-2.0.so: undefined reference to
`cairo_pdf_surface_set_dpi'
collect2: ld returned 1 exit status
make[2]: *** [pdf2png] Error 1
make[2]: Leaving directory `/export/home/b/newrenTemp/gnome/cairo/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/b/newrenTemp/gnome/cairo'
make: *** [all] Error 2
Comment 1 Elijah Newren 2006-06-10 13:07:45 UTC
Looks related to http://lists.freedesktop.org/archives/cairo/2006-May/006871.html
Comment 2 Carl Worth 2006-06-10 16:23:49 UTC
Created attachment 5872 [details] [review]
Patch to track addition of cairo_surface_set_fallback_resolution

It's even more related to this from today:

http://article.gmane.org/gmane.comp.lib.cairo/6924 [*]

Anyway, this is a change only to API that has never appeared in a stable
release of cairo, and I believe the calling GTK+ code has also not yet appeared
in a stable release.

I'll attach a patch to fix GTK+, and close this report as NOTOURBUG.

-Carl

[*] I would have given a link to that in the archives at cairographics.org, but
stupid pipermail eats the message up:

http://lists.freedesktop.org/archives/cairo/2006-June/007101.html
Comment 3 Carl Worth 2006-06-10 16:26:00 UTC
As discussed above, this needs to be fixed in GTK+.

-Carl
Comment 4 Elijah Newren 2006-06-10 16:32:51 UTC
http://bugzilla.gnome.org/show_bug.cgi?id=344512 exists about the needed gtk+
updates.  As for cairo, since the cairo tests depend on gtk+ which in turn
depend on cairo, this cyclic dependency will make it hard for many users to fix
their build.  Is there any easy way to detect this case and not build the tests?
(or at least a simple configure switch that can be used to disable the tests? --
I manually edited Makefile.am to remove this cyclicness and get a working build
again)
Comment 5 Carl Worth 2006-06-12 10:02:57 UTC
Thanks for the clarification. I've clarified the bug title and reopened this.

I've also just pushed out a change to cairo that should help with the current
problem. What it does (for gcc >= 2 and elf-based systems at least) is provide
the old symbol names in the cairo build so that the circular dependency will
hopefully not lead to a build failure.

But eliminating the circular dependency completely would be even better.

The solution that I would like to see is that "make" should build cairo only,
(no tests), so the ciruclar stuff would only show up when explicitly running the
tests with "make check".

I just haven't found the right automake magic to make that happen. If someone
who knows more about that than me could take a look at this, that would be very
appreciated.

-Carl
Comment 6 Carl Worth 2006-06-19 07:16:47 UTC
Behdad just fixed cairo's Makefiles so that "make check" will depend on things
like poppler but that "make" never will. This should make it quite easy for
anyone to avoid a circular dependency.

Here's the commit of interest:

http://gitweb.cairographics.org/?p=cairo;a=commit;h=72e7667ed904b93475d7e4540778c498aa781cdf

-Carl
Comment 7 Elijah Newren 2006-06-19 08:05:36 UTC
Awesome, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.