[GRASS-dev] GRASS 7: cairo compilation problem

Markus Neteler neteler at osgeo.org
Fri Aug 27 09:22:40 EDT 2010


Hi,

I have problems to compile cairo after a distro upgrade:

[neteler at north cairodriver]$ make
gcc -shared -o /home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_cairodriver.7.0.svn.so
-L/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib
-L/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib
-Wl,--no-undefined -Wl,--export-dynamic  -L/usr/lib64
-Wl,-rpath-link,/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib
  OBJ.x86_64-unknown-linux-gnu/Box.o
OBJ.x86_64-unknown-linux-gnu/Color.o
OBJ.x86_64-unknown-linux-gnu/Draw_bitmap.o
OBJ.x86_64-unknown-linux-gnu/Draw.o
OBJ.x86_64-unknown-linux-gnu/Driver.o
OBJ.x86_64-unknown-linux-gnu/Erase.o
OBJ.x86_64-unknown-linux-gnu/Graph.o
OBJ.x86_64-unknown-linux-gnu/Line_width.o
OBJ.x86_64-unknown-linux-gnu/Raster.o
OBJ.x86_64-unknown-linux-gnu/read_bmp.o
OBJ.x86_64-unknown-linux-gnu/read.o
OBJ.x86_64-unknown-linux-gnu/read_ppm.o
OBJ.x86_64-unknown-linux-gnu/read_xid.o
OBJ.x86_64-unknown-linux-gnu/Set_window.o
OBJ.x86_64-unknown-linux-gnu/Text.o
OBJ.x86_64-unknown-linux-gnu/write_bmp.o
OBJ.x86_64-unknown-linux-gnu/write.o
OBJ.x86_64-unknown-linux-gnu/write_ppm.o
OBJ.x86_64-unknown-linux-gnu/write_xid.o  -lgrass_driver.7.0.svn
-lgrass_gis.7.0.svn -lfreetype -lXrender -lcairo -lX11
-L/usr/lib64 -lSM -lICE -lX11  -lm
OBJ.x86_64-unknown-linux-gnu/Text.o: In function `fc_init':
/home/neteler/grass70/lib/cairodriver/Text.c:180: undefined reference
to `FcInit'
OBJ.x86_64-unknown-linux-gnu/Text.o: In function `set_font_fc':
/home/neteler/grass70/lib/cairodriver/Text.c:198: undefined reference
to `FcNameParse'
/home/neteler/grass70/lib/cairodriver/Text.c:199: undefined reference
to `FcDefaultSubstitute'
/home/neteler/grass70/lib/cairodriver/Text.c:200: undefined reference
to `FcConfigGetCurrent'
/home/neteler/grass70/lib/cairodriver/Text.c:200: undefined reference
to `FcConfigSubstitute'
/home/neteler/grass70/lib/cairodriver/Text.c:201: undefined reference
to `FcConfigGetCurrent'
/home/neteler/grass70/lib/cairodriver/Text.c:201: undefined reference
to `FcFontMatch'
OBJ.x86_64-unknown-linux-gnu/Text.o: In function `font_list_fc':
/home/neteler/grass70/lib/cairodriver/Text.c:217: undefined reference
to `FcPatternCreate'
/home/neteler/grass70/lib/cairodriver/Text.c:218: undefined reference
to `FcObjectSetBuild'
/home/neteler/grass70/lib/cairodriver/Text.c:219: undefined reference
to `FcFontList'
/home/neteler/grass70/lib/cairodriver/Text.c:228: undefined reference
to `FcPatternGetString'
/home/neteler/grass70/lib/cairodriver/Text.c:229: undefined reference
to `FcPatternGetString'
/home/neteler/grass70/lib/cairodriver/Text.c:240: undefined reference
to `FcObjectSetDestroy'
/home/neteler/grass70/lib/cairodriver/Text.c:241: undefined reference
to `FcPatternDestroy'
/home/neteler/grass70/lib/cairodriver/Text.c:242: undefined reference
to `FcFontSetDestroy'
collect2: ld returned 1 exit status
make: *** [/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib/libgrass_cairodriver.7.0.svn.so]
Error 1

In Text.c, I see

#if CAIRO_HAS_FT_FONT
#include <cairo-ft.h>
#include <fontconfig/fontconfig.h>
#endif

but

[neteler at north cairodriver]$ grep CAIRO_HAS_FT_FONT ../../include/config.h
[neteler at north cairodriver]$ grep CAIRO_HAS_FT_FONT *
Text.c:#if CAIRO_HAS_FT_FONT
Text.c:#if CAIRO_HAS_FT_FONT
Text.c:#if CAIRO_HAS_FT_FONT
Text.c:#if CAIRO_HAS_FT_FONT
Text.c:#if CAIRO_HAS_FT_FONT

and

ls -l /usr/include/fontconfig/fontconfig.h
-rw-r--r-- 1 root root 23426 2010-01-18 17:58
/usr/include/fontconfig/fontconfig.h

So I wonder how this should work but I may have overseen a detail.

Markus


More information about the grass-dev mailing list