Ticket #159 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

freetype/fontconfig/cairo/pango version problem? / fontconfig compilation problem?

Reported by: human Owned by: oetiker
Priority: trivial Milestone: RRDtool 1.3
Component: misc Version: 1.3dev
Keywords: prerequisites versions Cc:

Description

doc/rrdbuild.pod is not very clear about these versions:

grep cairo doc/rrdbuild.pod 
There is a problem with F<cairo.pc> on opensolaris. It suggests that
xrender is required for compilation with cairo. This is not true and also
 perl -i~ -p -e 's/(Requires.*?)\s*xrender.*/$1/' /usr/lib/pkgconfig/cairo.pc 
 wget http://oss.oetiker.ch/rrdtool/pub/libs/cairo-1.6.4.tar.gz
 gunzip -c cairo-1.4.10.tar.gz   | tar xf -
 cd cairo-1.4.10

using freetype-2.3.5, fontconfig-2.4.2, cairo-1.6.4, pango-1.21.1: Result:cairo does not find fontconfig

cairo (version 1.6.4) will be compiled with the following surface backends:
  image:         yes (always builtin)
  Xlib:          no (disabled, use --enable-xlib to enable)
  Xlib Xrender:  no (requires --enable-xlib)
  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 (disabled, use --enable-win32 to enable)
  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 (disabled, use --enable-win32 to enable)
  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/local/include/pixman-1 -Wall -Wsign-compare -Werror-implicit-function-declaration -Wpoi
nter-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -
Wmissing-format-attribute -Wdeclaration-after-statement -Wno-unused-parameter -Wno-long-long -Winline -fno-strict-alia
sing

configure: error: Cairo requires at least one font backend.
                  Please install freetype and fontconfig, then try again:
                  http://freetype.org/  http://fontconfig.org/

configure.log

configure:27969: gcc -o conftest -O3 -fPIC     conftest.c  -lm -lfontconfig   >&5
/tmp/cci157aI.o(.text+0x15): In function `main':
: undefined reference to `FcFini'
collect2: ld returned 1 exit status
configure:27975: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "cairo"
| #define PACKAGE_TARNAME "cairo"
| #define PACKAGE_VERSION "1.6.4"
| #define PACKAGE_STRING "cairo 1.6.4"
| #define PACKAGE_BUGREPORT "http://bugs.freedesktop.org/enter_bug.cgi?product=cairo"
| #define PACKAGE "cairo"
| #define VERSION "1.6.4"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define STDC_HEADERS 1
| #define HAVE_CTIME_R 1
| #define HAVE_DRAND48 1
| /* end confdefs.h.  */
| /* Define FcFini to an innocuous variant, in case <limits.h> declares FcFini.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define FcFini innocuous_FcFini
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char FcFini (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
| 
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| 
| #undef FcFini
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char FcFini ();
| /* The GNU C library defines this for functions which it implements
|     to always fail with ENOSYS.  Some functions are actually named
|     something starting with __ and the normal name is an alias.  */
| #if defined __stub_FcFini || defined __stub___FcFini
| choke me
| #endif
| 
| int
| main ()
| {
| return FcFini ();
|   ;
|   return 0;
| }
configure:27993: result: no

using freetype-2.3.5, fontconfig-2.4.2, cairo-1.4.10, pango-1.21.1: rrdtool does not find pangocairo: ...

Find 3rd-Party Libraries
checking for cairo_font_options_create in -lcairo... no
checking for pkg-config... pkg-config
checking for cairo_font_options_create in -lcairo... yes
checking cairo.h usability... yes
checking cairo.h presence... yes
checking for cairo.h... yes
checking for cairo_svg_surface_create in -lcairo... yes
checking cairo-svg.h usability... yes
checking cairo-svg.h presence... yes
checking for cairo-svg.h... yes
checking for cairo_pdf_surface_create in -lcairo... yes
checking cairo-pdf.h usability... yes
checking cairo-pdf.h presence... yes
checking for cairo-pdf.h... yes
checking for cairo_ps_surface_create in -lcairo... yes
checking cairo-ps.h usability... yes
checking cairo-ps.h presence... yes
checking for cairo-ps.h... yes
checking for pango_cairo_context_set_font_options in -lpango-1.0... no
checking for pkg-config... (cached) pkg-config
checking for pango_cairo_context_set_font_options in -lpango-1.0... no
configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of pangocairo. Check config.log for hints on why
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
  so that compiler and the linker can find libpango-1.0 and its header files. If
  you have not installed pangocairo, you can get it either from its original home on

     http://ftp.gnome.org/pub/GNOME/sources/pango/1.17

  You can find also find an archive copy on

     http://oss.oetiker.ch/rrdtool/pub/libs

  The last tested version of pangocairo is 1.17.

       LIBS=-lcairo -lcairo -lcairo -lm  -lcairo -lfreetype -lz -lfontconfig -lpng12   -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lfreetype -lz -lfontconfig -lpng
12  
   LDFLAGS= -L/usr/local/lib     -L/usr/local/lib    
  CPPFLAGS= -I/usr/include/libpng12 -INONE/include/cairo -I/usr/local/include/cairo -I/usr/local/include/freetype2 -I/usr/local/include   -I/usr/include/libpng12 -I/usr/local/include/pango-1.0 -I/usr/l
ocal/include/cairo -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/freetype2 -I/usr/local/include  

----------------------------------------------------------------------------
                
checking for xmlParseFile in -lxml2... yes
checking libxml/parser.h usability... yes
checking libxml/parser.h presence... yes
checking for libxml/parser.h... yes
configure: error: Please fix the library issues listed above and try again.

But as FcFini? is documented in fontconfig, this could also be a fontconfig configuration/compilation/installation problem, and only rrdbuild.pod should be corrected regards

A.

Change History

comment:1 Changed 4 years ago by human

  • Priority changed from minor to trivial
  • Type changed from defect to enhancement

order of directories in PKG_CONFIG_PATH is important

as not being able to get rid of old freetype:

rpm -q freetype
freetype-2.1.4-7.el3

I use

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

which lets cairo 1.6.4 recognize freetype another

export LD_LIBRARY_PATH=/usr/local/lib

configure and make works!

... perhaps helpful for users with old systems ;-))

regards

A.

Note: See TracTickets for help on using tickets.

NOTE: The content of this website is accessible with any browser. The graphical design though relies completely on CSS2 styles. If you see this text, this means that your browser does not support CSS2. Consider upgrading to a standard conformant browser like Mozilla Firefox or Opera but also Apple's Safari or KDE's Konqueror for example. It may also be that you are looking at a mirror page which did not copy the CSS for this page. Or if some pictu res are missing, then the mirror may not have picked up the contents of the inc directory.