bugThe FreeType Project - Bugs: bug #40972, #include <ftglyph.h> finds...


bug #40972: #include <ftglyph.h> finds FTGlyph.h from FTGL on case insensitive systems (since version 2.5.1)

Submitted by:  Mojca Miklavec <mojca>
Submitted on:  Thu 19 Dec 2013 05:26:52 PM UTC  
Severity: 3 - NormalItem Group: None
Status: Wont FixPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu 19 Dec 2013 08:45:05 PM UTC, comment #3:

It's not the fault of our library that another library which is based on FreeType uses such a similar header name!

My workaround doesn't need patching at all; you simply add a few lines to the file which loads `ft2build.h' (the first time). I consider this as a quick solution for a problem which normally doesn't happen.

Regarding the other include file path issue, I think it is standard that the local directories (e.g. /usr/local, /opt, ...) come before the system directories in /usr. No idea why your particular project doesn't follow.

I'm closing this report.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 19 Dec 2013 08:29:59 PM UTC, comment #2:

I replaced

#define FT_GLYPH_H <ftglyph.h>


#define FT_GLYPH_H <../freetype2/ftglyph.h>

in $prefix/include/freetype2/config/ftheader.h and it seems that it helped, but I consider that kind of patching/workarounds a bit weird.

Fixing the actual ROOT sources (software where compilation fails) seems to be the wrong place to do this kind of patching and it's totally unpredictable what the exact path would be and when to apply this kind of a patch.

Despite fixing this particular issue I bumped into another problem later on, namely ft2build.h was taken from /usr/X11R6/include/ft2build.h instead of /opt/local/include/freetype2/config/ftheader.h which broke the build. (For some reason this didn't happen before 2.5.1 when the file was probably located in /opt/local/include/freetype2/freetype/config/ftheader.h.)

The solution to this second problem is probably to take special care to remove all possible references to /usr/X11R6 from all flags (but some OpenGL libraries needed for the software also reside in /usr/X11R6).

Mojca Miklavec <mojca>
Thu 19 Dec 2013 06:26:12 PM UTC, comment #1:

How unfortunate. Assuming that you use the FreeType header macros: What about

#include <ft2build.h>


#undef FT_GLYPH_H
#define FT_GLYPH_H <../freetype/ftglyph.h>


#include FT_GLYPH_H

(with proper preprocessor guards for Mac OS X)? Doing it this way, everything should still work correctly with the include path returned by `pkg-config freetype2' or `freetype-config'.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 19 Dec 2013 05:26:52 PM UTC, original submission:

On Mac OS X we have a problem that the code for including ftglyph.h which used to include

#include <freetype/ftglyph.h>

now acts as

#include <ftglyph.h>

which loads the wrong file on case-insensitive system like Mac OS X, in my case $prefix/include/FTGL/FTGlyph.h. This started to be a problem after the release of version 2.5.1.

It is not clear to me what the proper solution would be. Switching back to #include <freetype/ftglyph.h> would certainly help, but in case this is not the option, the only other solution I see is to agree which of both projects would be willing to change the name of the header file (probably not that easy). Another option is that projects depending on both FreeType and FTGL figure out a way to change the include paths depending on which file is currently being compiled.

See also https://sft.its.cern.ch/jira/browse/ROOT-5773

Mojca Miklavec <mojca>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by mojca (Submitted the item)
  • -unavailable- added by mojca

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 Dec 2013 08:45:05 PM UTCwlStatusNone=>Wont Fix
    Thu 19 Dec 2013 06:26:12 PM UTCwlAssigned toNone=>wl
    Thu 19 Dec 2013 05:26:53 PM UTCmojcaCarbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup