Bug 3951

Summary: FcFini not in older version of Fontconfig - no check for fc ver
Product: cairo Reporter: Damien Carbery <damien.carbery>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high CC: hys545
Version: 0.9.3   
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:

Description Damien Carbery 2005-08-02 19:33:06 UTC
Two test source files call the FcFini() fontconfig function. This is available
in Fontconfig 2.3.0 and greater (http://fontconfig.org/fontconfig-devel/r162.html)

The cairo configure script does not check for fontconfig version.
Attached patch does this.

On Solaris 10, with Fontconfig 2.2.3, it will fail to configure because of no
available font backends. [I'll have to update fontconfig, though SunFreeWare.com
only has 2.2.98 :( ]
Comment 1 Damien Carbery 2005-08-02 19:34:10 UTC
Created attachment 3211 [details] [review]
Proposed patch which fixes the logic
Comment 2 Carl Worth 2005-08-03 00:05:22 UTC
I don't think we want to turn off the freetype font backend just because
FcFini can't be found. FcFini is not used in the implementation of cairo
itself, and it's really only relevant to the check-valgrind target of the
tests, (which isn't much help on Salris anyway).

Instead, what I would like to see is after a successful check for the
presence of fontconfig, there should be a check for the existence of the
FcFini function, (either by fontconfig version or via AC_CHECK_FUNCS).
Then the call to FcFini can be made conditional.

A similar approach is already used with a similar cleanup function in
the Xlib backend. See the XrmFinalize check in configure.in and the
call conditioned on HAVE_XRMFINALIZE. Note that if we copy that check
that we should abstract the save_CFLAGS and save_LIBS stuff into a new
macro.
Comment 3 Damien Carbery 2005-08-03 01:02:37 UTC
I leave it to your better judgement. As a build engineer I mainly focus on
getting stuff built - I'm not too bother if it doesn't work ;-)
As a local interim solution, while I work on building fontconfig 2.3.0, I can
#ifdef the FcFini calls out so that I am not blocked.
Comment 4 Carl Worth 2005-08-04 01:23:29 UTC
*** Bug 3966 has been marked as a duplicate of this bug. ***
Comment 5 Carl Worth 2005-08-04 03:32:12 UTC
Created attachment 3236 [details]
Problem screenshot

Here's a patch that allows things to build just fine with an old fontconfig
by checking explicitly for the FcFini function and only calling it if it
is present.
Comment 6 Carl Worth 2005-08-04 03:33:40 UTC
I've committed that patch now. Please try it from CVS or from the patch
here and let me know if you still have any problems.
Comment 7 Carl Worth 2005-08-22 17:14:19 UTC
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.

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.