Bug 21717

Summary: Cannot compile but freetype and fontconfig are installed.
Product: cairo Reporter: Reil Brennan <reilmb>
Component: freetype font backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.6.4   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Reil Brennan 2009-05-13 08:03:23 UTC
Cannot use the latest version because of the libsvg requirement to be later than 2.15 when only 2.10 is available so I am using 1.6.4 and have run across the following problem on linux that even though the freetype and fontconfig are installed it will not compile.

LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
PKG_CONFIG=/usr/bin/pkg-config
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig

[root@cbvapp-d1014 cairo-1.6.4]# rpm -qa |grep freetype
freetype-2.1.9-8.el4.6
freetype-devel-2.1.9-8.el4.6
[root@cbvapp-d1014 cairo-1.6.4]# rpm -qa |grep fontconfig
fontconfig-2.2.3-13.el4
fontconfig-devel-2.2.3-13.el4
[root@cbvapp-d1014 cairo-1.6.4]#



From ./configure
config.status: creating src/cairo-no-features.h
config.status: src/cairo-no-features.h is unchanged

cairo (version 1.6.4) will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          yes
  Xlib Xrender:  yes
  Quartz:        no (CoreGraphics framework not found)
  Quartz-image:  no (disabled, use --enable-quartz-image to enable)
  XCB:           no (disabled, use --enable-xcb to enable)
  Win32:         no (requires a Win32 platform)
  OS2:           no (disabled, use --enable-os2 to enable)
  PostScript:    yes
  PDF:           yes
  SVG:           yes
  glitz:         no (disabled, use --enable-glitz to enable)
  BeOS:          no (disabled, use --enable-beos to enable)
  DirectFB:      no (disabled, use --enable-directfb to enable)

the following font backends:
  FreeType:      no (requires fontconfig)
  Win32:         no (requires a Win32 platform)
  Quartz:        no (CoreGraphics framework not found)

the following features:
  PNG functions: yes

and the following debug options:
  gcov support:  no
  test surfaces: no
  ps testing:    yes
  pdf testing:   no (requires poppler-glib >= 0.8.0)
  svg testing:   no (requires librsvg-2.0 >= 2.15.0)

using CFLAGS:
-I/usr/include/libpng12 -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/include/pixman-1 -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-long-long -Winline -fno-strict-aliasing

configure: error: Cairo requires at least one font backend.
                  Please install freetype and fontconfig, then try again:
                  http://freetype.org/  http://fontconfig.org/
Comment 1 Carl Worth 2009-05-13 10:14:41 UTC
(In reply to comment #0)
> Cannot use the latest version because of the libsvg requirement to be later
> than 2.15 when only 2.10 is available

I don't understand this. The librsvg version requirement is only for *testing* cairo's SVG backend. It's not required for compiling and using cairo's SVG backend.

 so I am using 1.6.4 and have run across
> the following problem on linux that even though the freetype and fontconfig are
> installed it will not compile.

For these, the next step would be to look into config.log and see what went wrong when the configure script attempted to compile a minimal program using freetype.

But really, putting work into using 1.8 would be more worthwhile than getting 1.6 running.

Have fun!

-Carl
Comment 2 Chris Wilson 2009-06-03 01:28:44 UTC
This sounds like the issue with configure checking for FcFini() that caused it to ignore old versions of fontconfig. This is one of the many bugs fixed in the 1.8 stable release.

I have to second Carl's statement that librsvg is only required for running the test suite and not for compiling cairo with support for the SVG backend. Please file a new bug if you cannot build 1.8 on your system.

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.