Re: fontconfig error




--- Michael Ekstrand <michael elehack net> wrote:

> On Sun, 2006-08-27 at 12:44 -0700, Sergei Steshenko wrote:
> > 
> > --- Michael Ekstrand <michael elehack net> wrote:
> > 
> > > On Sat, 2006-08-26 at 20:40 -0400, Bill Cunningham wrote:
> > > > > This is your first error message:
> > > > >
> > > > > "
> > > > >      84
> > > > 
> > > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/freetype2 -I/usr/local
> > > > /include
> > > > > -I/usr/local/include -DFONTCONFIG_PATH=\"/usr/local/etc/fonts\" -I.. -I../
> > > > src -g -O2 -MT
> > > > > fcfreetype.l
> > > > >      84 o -MD -MP -MF .deps/fcfreetype.Tpo -c fcfreetype.c  -fPIC -DPIC -o
> > > > .libs/fcfreetype.o
> > > > >      85 fcfreetype.c:53:10: #include expects "FILENAME" or <FILENAME>
> > > > >
> > > > > ".
> > > > >
> > > > > And it is exactly the same error message which caused me to file
> > > > > already mentioned bug report:
> > > > >
> > > > > https://bugs.freedesktop.org/show_bug.cgi?id=7862
> > > > > .
> > > > >
> > > > > Did you read the bug report and did you compare my report with
> > > > > your error message ?
> > > > >
> > > > > I have no idea how to fix this.
> > > 
> > > It looks like a result of FreeType's housecleaning..  The latest
> > > versions of freetype removed the public install of old internal headers,
> > > which half the projects on the Internet (it seems) used.  They were
> > > never supposed to, but they did.  Result: many packages are broken.
> > 
> > Do your words in simple English mean that fontconfig folks release
> > packages which can't compile ?
> > 
> > That is, they release packages not even trying to compile them ?
> 
> No.  They release packages which use internal/experimental FreeType
> headers, which up through 2.1, FreeType had installed.  The FreeType
> folks released these so developers could experiment with new features
> and concepts, but never intended for the features to be used in released
> code.  With 2.2, they removed these headers, so that only the
> documented, public API's are exposed.  fontconfig used the old headers.
> It will build fine with freetype 2.1.x, but not 2.2.  fontconfig is
> "broken" in that it uses internal/undocumented API's, but not "broken"
> in the sense of them failing to test.  The problem is fixed in
> FontConfig 2.3.93 and later.
> 
> The following page has all the details:
> 
> http://freetype.sourceforge.net/freetype2/freetype-2.2.0.html
> 
> > > Installing an older freetype (2.1.x I believe) is an intermediate fix;
> > > otherwise, there are patches from freetype's website for some packages,
> > > and many packages have appropriate fixes already.
> > 
> > Could you please be more specific about the patches ? I.e., could you please
> > provide URLs to the patches ?
> 
> URL above has a link to freetype's info and patch page.
> 
> - Michael
> 
> -- 
> mouse, n.: a device for pointing at the xterm in which you wish to type
>         -- Fortune file
> Visit me on the Web: http://www.elehack.net/michael
> 
> 

Michael,

thanks for your reply.

Maybe I miss simething, but it appears that your reply addresses a problem which
is different from the one I had.

If I understand correctly, the link you gave, i.e.

http://freetype.sourceforge.net/freetype2/freetype-2.2.0.html

explains root causes and fixes of problems in libraries/applications which
depend on fontconfig.

The problem I reported, i.e. https://bugs.freedesktop.org/show_bug.cgi?id=7862 ,
is about fontconfig itself.

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, and gcc complains:

fcfreetype.c:53:10: error: #include expects "FILENAME" or <FILENAME>
fcfreetype.c:58:10: error: #include expects "FILENAME" or <FILENAME>
fcfreetype.c:59:10: error: #include expects "FILENAME" or <FILENAME>
fcfreetype.c:60:10: error: #include expects "FILENAME" or <FILENAME>
.

As I said, the problematic file is a part of fontcofig source tarball:

fontconfig-2.3.2/src/fcfreetype.c

- it is not a part of some other library or application that depends on fontconfig.

The same is true for fontconfig-2.3.95, and the same problematic '#include ...'
statements are present in fontconfig-2.3.95, though I haven't tried to compile
it.

The point of my https://bugs.freedesktop.org/show_bug.cgi?id=7862 bug report is
that first and formost the fontconfig-2.3.2/src/fcfreetype.c file has wrong syntax,
the wrongness being lack of '"' or '<', '>' to enclose the included file names.

If you think I'm missing something, could you please explain what it is ?

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]