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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Mojca Miklavec <mojca>
Submitted:  Thu 19 Dec 2013 05:26:52 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Wont Fix Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  None

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>
Group administrator
Thu 19 Dec 2013 08:29:59 PM UTC, comment #2: 

I replaced

#define FT_GLYPH_H  <ftglyph.h>

by

#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>
Group administrator
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.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-12-19 wl StatusNone Wont Fix
        Open/ClosedOpen Closed
    2013-12-19 wl Assigned toNone wl
    2013-12-19 mojca Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code