[cairo] fontconfig compile error (was: Interesting Linux distribution problem)
jonathan at jfkew.plus.com
Mon Sep 28 15:02:10 PDT 2009
On 28 Sep 2009, at 22:08, Travis Griggs wrote:
> On Sep 28, 2009, at 12:07 PM, Mike Shaver wrote:
>> On Mon, Sep 28, 2009 at 10:27 AM, Travis Griggs <tgriggs at cincom.com>
>>> The question really boils down to "how would you build/compile/
>>> distribute Cairo so that your Linux app can use it on as wide a
>>> variety of Linux installs as possible?"
>> Ship your own. Doing otherwise exposes you to a mess of
>> version-matrix support issues that really don't pay for themselves
>> when it comes to the download savings.
> OK. Figured it was going to come to that. Behdad said the same thing
> in IRC.
> Following that advice, I'm trying to compile fontconfig (managed to
> get FreeType compiled, found one issue with it). I think some of the
> same developers hang out here, so I apologize for asking somewhat off
> topic. I can ask on a different list if someone points me at it.
> Anyway, I'm trying to compile fontconfig in my own local directory
> ($HOME/BuildCairo), set with --prefix at ./configure time. I also used
> the --sysconfdir=/etc, If I didn't, it wanted to believe that the
> FONTCONFIG_PATH was down in my BuildCairo directory. But I still get a
> compile error of some sort. Not even sure exactly what's going wrong.
> I see lots of warning, but am missing the actual error. I've copied
> the output below my sig. Any help/hints greatly appreciated.
> The -DFC_CACHEDIR value seems like a Bad Thing, but maybe I just don't
> understand it well enough...
I'm very far from being an expert on any of this, but FWIW... it looks
like you're getting lots of compile errors in fontconfig's
fcfreetype.c, and I wonder if the root cause of these is that you have
freetype 1 headers that are being found ahead of freetype 2 on your
system. I see -I/usr/include/freetype2 there in your command line, but
I don't know what else may be lying around....
Also, you might want to consider linking with the system's fontconfig
library, even though you're compiling your own Cairo; if you're
prepared to assume that all Linux distros you're targeting will have
(some version of) fontconfig in a standard place, this may be more
reliable than using a private, static-linked copy which may be
incompatible with the configuration and font cache files belonging to
the system's fontconfig. Your users will not thank you if your app
stomps all over their system's font caches because you're shipping a
different fontconfig version; nor will they appreciate it if you avoid
this by using an entirely separate configuration, thereby forcing them
to "install" fonts twice.
More information about the cairo