Re: fontconfig error
- From: Sergei Steshenko <sergstesh yahoo com>
- To: David "Nečas" <yeti physics muni cz>, gtk-list gnome org
- Subject: Re: fontconfig error
- Date: Sun, 27 Aug 2006 15:13:19 -0700 (PDT)
--- David Neèas (Yeti) <yeti physics muni cz> wrote:
> On Sun, Aug 27, 2006 at 02:23:38PM -0700, Sergei Steshenko wrote:
> >
> > I tried to compile fontconfig, and a part of fontconfig, namely fcfreetype.c file,
> > wont'c compile.
> >
> > Here is how the '#include ...' part of the file looks:
> >
> >
> > "
> > ...
> > 47 #include <stdlib.h>
> > 48 #include <stdio.h>
> > 49 #include <string.h>
> > 50 #include "fcint.h"
> > 51 #include <ft2build.h>
> > 52 #include FT_FREETYPE_H
> > 53 #include FT_INTERNAL_OBJECTS_H
> > 54 #include FT_TRUETYPE_TABLES_H
> > 55 #include FT_SFNT_NAMES_H
> > 56 #include FT_TRUETYPE_IDS_H
> > 57 #include FT_TYPE1_TABLES_H
> > 58 #include FT_INTERNAL_STREAM_H
> > 59 #include FT_INTERNAL_SFNT_H
> > 60 #include FT_INTERNAL_TRUETYPE_TYPES_H
> > 61 #if HAVE_FT_GET_X11_FONT_FORMAT
> > 62 #include FT_XFREE86_H
> > 63 #endif
> > 64
> > 65 #if HAVE_FT_GET_BDF_PROPERTY
> > 66 #include FT_BDF_H
> > 67 #include FT_MODULE_H
> > ...
> > ".
> >
> > As one can see, in addition to traditional
> >
> > #include <file>
> >
> > or
> >
> > # include "file"
> >
> > there are lines like these:
> >
> > 52 #include FT_FREETYPE_H
> > 53 #include FT_INTERNAL_OBJECTS_H
> > 54 #include FT_TRUETYPE_TABLES_H
> > 55 #include FT_SFNT_NAMES_H
> > 56 #include FT_TRUETYPE_IDS_H
> > 57 #include FT_TYPE1_TABLES_H
> > 58 #include FT_INTERNAL_STREAM_H
> > 59 #include FT_INTERNAL_SFNT_H
> > 60 #include FT_INTERNAL_TRUETYPE_TYPES_H
> > 61 #if HAVE_FT_GET_X11_FONT_FORMAT
> > 62 #include FT_XFREE86_H
> > 63 #endif
> > .
> >
> > These lines are peculiar in that they have neither '"', nor '<', '>' to
> > enclose the file names
>
> ISO C allows
>
> 1. #include <systemheader.h>
> 2. #include "localheader.h"
> 3. #include MACRO
>
> where MACRO has to -- after all expansions -- give one of
> the former two cases. The FT_* macros are defined in
> freetype/config/ftheader.h and freetype/internal/internal.h.
>
> Except that the internal headers no longer exist in FreeType
> 2.2+. Neither are defined the corresponding FT_INTERNAL_*
> macros. When a FT_* macro is undefined none of the cases
> 1.-3. occurs, the preprocessor sees literal
>
> #include FT_INTERNAL_OBJECTS_H
>
> and complains. Thus you get errors on lines correspoding to
> inclusion of internal headers (through FT_INTERNAL_*
> macros).
>
> Yeti
>
>
> --
> Anonyms eat their boogers.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
David,
thanks for your clarifications.
I understand that macros are first expanded, and thus, if they
expand to a legal construct, i.e. "filename" or <filename>, then
the compiler will accept them.
Now here are your statements in a rephrased form - correct me if I'm wrong
1) items like FT_FREETYPE_H, i.e. items without the encapsulating '"' or
'<', '>' are meant to be macros;
2) the above macros used to be defined in
freetype/config/ftheader.h
freetype/internal/internal.h
files;
3) the above .h files are not within the source tarball anymore - here is
my check of this statement:
"
[31] 0:19 sergei comp home net:/mnt/removable4/sergei/build_work/build> find fontconfig-2.3.2
-name "*.h"
fontconfig-2.3.2/src/fcint.h
fontconfig-2.3.2/fontconfig/fontconfig.h
fontconfig-2.3.2/fontconfig/fcfreetype.h
fontconfig-2.3.2/fontconfig/fcprivate.h
fontconfig-2.3.2/fc-case/fccase.h
fontconfig-2.3.2/fc-case/fccase.tmpl.h
fontconfig-2.3.2/fc-lang/fclang.h
fontconfig-2.3.2/fc-lang/fclang.tmpl.h
fontconfig-2.3.2/fc-glyphname/fcglyphname.h
fontconfig-2.3.2/fc-glyphname/fcglyphname.tmpl.h
[32] 1:06 sergei comp home net:/mnt/removable4/sergei/build_work/build>
"
- indeed they are not in the tarball.
Now, taking your statement:
"
When a FT_* macro is undefined none of the cases
1.-3. occurs, the preprocessor sees literal
#include FT_INTERNAL_OBJECTS_H
and complains. Thus you get errors on lines correspoding to
inclusion of internal headers (through FT_INTERNAL_*
macros).
"
may I rephrase it this way:
fontconfig-2.3.2.tar.gz can NOT be compiled because some header files
(namely freetype/config/ftheader.h, freetype/internal/internal.h) are
missing in it
?
If so, is my earlier statement, that fontconfig released a tarball which
can not be compiled, correct ?
Thanks,
Sergei.
Applications From Scratch: http://appsfromscratch.berlios.de/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]