[GRASSLIST:4512] Re: freetype compile error

Glynn Clements glynn.clements at virgin.net
Tue Oct 12 15:58:52 EDT 2004


Kirk R. Wythers wrote:

> I'm looking at the following compile error in d.text.freetype. Any  
> thoughts?
> 
> 
> barbaloot:~/grass5_dev/grass53_exp_2004_05_15/src/display/ 

2004_05_15? Is this code actually from May, or has it been updated
since then?

> d.text.freetype kirkw$ gmake53
>    SRC     = /Users/kirkw/grass5_dev/grass53_exp_2004_05_15/src
>    CMD     = /Users/kirkw/grass5_dev/grass53_exp_2004_05_15/src/CMD
>    UNUSED  = /Users/kirkw/grass5_dev/grass53_exp_2004_05_15/unused
>    HEADER  = head.unknown
>    ARCH    = unknown
>    GISBASE = /Users/kirkw/grass5_dev/grass53_exp_2004_05_15/dist.unknown
>    VERSION = 5.3-cvs 2004
> #################################################################
> /Users/kirkw/grass5_dev/grass53_exp_2004_05_15/src/display/ 
> d.text.freetype
>    make -f OBJ.unknown/make.rules
> 
> gcc -I/Users/kirkw/grass5_dev/grass53_exp_2004_05_15/src/include  
> -I/usr/X11R6/include -I/sw/include -g -O2   -I/usr/X11R6/include  
> -I/sw/include -I/usr/X11R6/include/freetype2  -c main.c -o  
> OBJ.unknown/main.o
> main.c:79: error: parse error before "library"

It's using the <freetype/freetype.h> header from FreeType 1.x, when it
needs to use 2.x. Presumably the FreeType 1.x headers are in
/sw/include, which occurs before /usr/X11R6/include/freetype2 on the
command line.

We should probably be putting $(EXTRA_CFLAGS) before $(COMPILE_FLAGS)
in the Makefile templates (src/CMD/generic/make.mid and mk/mid.mk); in
general, package-specific directories should be checked before generic
directories.

A quick workaround would be to change the ordering of the -I switches
in the make.rules file.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list