Re: libXft won't compile: FC_HINT_STYLE undeclared

Peter Winton <[email protected]> Wed, 25 Feb 2004 14:50:40 -0500
Newsgroups gmane.comp.freedesktop.xlibs.general
Organization Rose-Hulman Institute of Technology
Message-ID <[email protected]>
On Monday 23 February 2004 02:54 pm, Peter Winton wrote:
> I'm trying to build libXft-2.1.3 but get the error
>
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include
> -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include
> -I/usr/X11R6/include -g -O2 -MT xftdpy.lo -MD -MP -MF .deps/xftdpy.Tpo -c
> xftdpy.c  -fPIC -DPIC -o .libs/xftdpy.o
> xftdpy.c: In function `_XftDefaultInit':
> xftdpy.c:380: `FC_HINT_STYLE' undeclared (first use in this function)
> xftdpy.c:380: (Each undeclared identifier is reported only once
> xftdpy.c:380: for each function it appears in.)
> xftdpy.c: In function `XftDefaultSubstitute':
> xftdpy.c:478: `FC_HINT_STYLE' undeclared (first use in this function)
> xftdpy.c:482: `FC_HINT_FULL' undeclared (first use in this function)
> make[1]: *** [xftdpy.lo] Error 1
> make[1]: Leaving directory `/root/src/gtk/libXft-2.1.3'
> make: *** [all] Error 2
>
> I have fontconfig-2.2.1 and freetype-2.1.5 installed. (freetype-2.1.5
> instead of 2.1.7 to avoid all those "ft2build.h not included" errors when
> building fontconfig or anything else that uses freetype and has not been
> updated). I would assume FC_HINT_STYLE and FC_HINT_FULL should come from
> fontconfig headers, but I couldn't find them in any of the fontconfig
> headers, or any of the headers in /usr/local/include or /usr/include, for
> that matter. Is this a compatibility issue, or do I need to install
> something else.
>
> /usr/local/include/fontconfig contains:
>
> fcfreetype.h
> fcprivate.h
> fontconfig.h
>
> The following have compiled and installed with no problems:
>
> freetype-2.1.5
> fontconfig-2.2.1
> atk-1.5.4
> glib-2.3.2
> xrender-0.8.3
>
> Thanks,
>
> Peter Winton

I think I figured out the problem. fontconfig was installing its headers to 
/usr/local/include, but I had some old fontconfig headers lying around in 
/usr/X11R6/include -- not sure where these came from. cpp0 was getting 
-I/usr/local/include before -I/usr/X11R6/include, so I guess it was using the 
old headers. I removed the old headers and it fixed the problem.

Thanks for your help, everyone!

Peter