Re: libXft won't compile: FC_HINT_STYLE undeclared

Peter Winton <[email protected]> Mon, 23 Feb 2004 16:58:36 -0500
Newsgroups gmane.comp.freedesktop.xlibs.general
Organization Rose-Hulman Institute of Technology
Message-ID <[email protected]>
On Monday 23 February 2004 04:05 pm, Peter Winton wrote:
> On Monday 23 February 2004 03:20 pm, Mike A. Harris wrote:
> > On Mon, 23 Feb 2004, Peter Winton wrote:
> > >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
> >
> > New freetype is required for FC_HINT_STYLE I believe.
>
> You're probably right, but what do you mean by "new freetype"?. I
> subsequently built and installed freetype-2.1.7 and ran ldconfig. Then in
> fontconfig-2.2.1/, I ran
>
> make distclean
> ./configure
> make
>
> Whereas fontconfig built ok with freetype-2.1.5, it fails with
> freetype-2.1.7 with the error:
>
> make[2]: Entering directory `/root/src/gtk/fontconfig-2.2.1/fc-lang'
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I/usr/local/include/freetype2
> -I/usr/local/include    -g -O2 -c fc-lang.c
> In file included from ../fontconfig/fcfreetype.h:27,
>                  from ../src/fcint.h:39,
>                  from fc-lang.c:25:
> /usr/local/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h'
> hasn't been included yet!"
> /usr/local/include/freetype2/freetype/freetype.h:21:2: #error "Please
> always use macros to include FreeType header files."
> /usr/local/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
> /usr/local/include/freetype2/freetype/freetype.h:23:2: #error "  #include
> <ft2build.h>"
> /usr/local/include/freetype2/freetype/freetype.h:24:2: #error "  #include
> FT_FREETYPE_H"
> make[2]: *** [fc-lang.o] Error 1
> make[2]: Leaving directory `/root/src/gtk/fontconfig-2.2.1/fc-lang'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/root/src/gtk/fontconfig-2.2.1'
> make: *** [all-recursive-am] Error 2
>
> Can you possibly point me to a patch to fix this problem, as I've been
> unable to find one. Or do I need to manually fix all the includes in the
> fontconfig source.
> That wouldn't be a huge problem, except that freetype-2.1.7 causes the same
> problem in several other packages I'm building besides fontconfig, hence
> the switch back to 2.1.5.
>
> Thanks,
>
> Peter
>

I got fontconfig from cvs and tried compiling it with freetype-2.1.7 
installed. Unlike 2.2.1, the cvs version built ok after a little tweaking in  
autogen.sh, configure.in, and fcfreetype.c. However libXft still gives me the 
exact same error.

Peter