[Fontconfig] fontconfig-2.2.94 won't build against freetype-2.1.8

Turner David dturner at cptechno.com
Mon May 10 18:17:36 EST 2004


> Apparently, freetype-2.1.8 has renamed "ABS", "MAX",
> and "MIN" to "FT_ABS", "FT_MAX", and "FT_MIN" in the
> ./include/freetype/internal/ftobjs.h file.  This
> breaks the fontconfig build horribly.  It looks like
> the change was implemented with version 2.1.8, as the
> original #define names are still intact with version
> 2.1.7.
> At first glance, the file that needs to be updated is
> ./src/fcfreetype.c.
> After updating that file in two or three places,
> fontconfig compiles cleanly.  Woohoo!  It is 2:12am
> and I have been staring at this for like three hours. 
> I will see if I can generate a patch file tomorrow,
> but this may not be the most elegant solution -- i.e.
> hardcoding this change would break builds against old
> versions of freetype.  Perhaps some type of ifdef
> action is required?

The correct fix is to place the definitions of MIN, MAX and ABS
within fontconfig itself. This will work with any version of
FreeType (old or recent).

FontConfig 2.2.94 and before simply included _internal_ (i.e.
private) FreeType headers to get these definitions. It should
never had since these files routinely change upon releases.

I don't know if there are other occurences of these incorrect
includes in FontConfig, but you should be able to find them by
grepping for the strings "freetype/internal" and "FT_INTERNAL"
in the source code.

These includes should _not_ happen. Further similar breakages are
_guaranteed_ in the future if you insist on keeping them. In the
case were you truly need something that is not accessible
through the public API, please request another public function 
to expose the relevant information to external libraries in
the FreeType development mailing list.

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)

> Anyways, something to think about fixing in the code.
> __________________________________
> Do you Yahoo!?
> Win a $20,000 Career Makeover at Yahoo! HotJobs  
> http://hotjobs.sweepstakes.yahoo.com/careermakeover 
> _______________________________________________
> fontconfig mailing list
> fontconfig at freedesktop.org
> http://freedesktop.org/mailman/listinfo/fontconfig

This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
NDS TECHNOLOGIES FRANCE will not therefore be liable for the message if modified.

More information about the Fontconfig mailing list