Bug 125074 - [GTK] Fails to build with freetype 2.5.1
Summary: [GTK] Fails to build with freetype 2.5.1
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-02 05:05 PST by Alberto Garcia
Modified: 2013-12-02 09:46 PST (History)
12 users (show)

See Also:


Attachments
Patch (3.02 KB, patch)
2013-12-02 08:48 PST, Andres Gomez Garcia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2013-12-02 05:05:55 PST
FreeType 2.5.1 changed the header file layout:

   http://sourceforge.net/projects/freetype/files/freetype2/2.5.1/

Now all headers went from /usr/include/freetype2/freetype/ to /usr/include/freetype2/.

At least HarfBuzzFaceCairo.cpp looks for the headers in the old path
so it doesn't build.

This is apparently not the official way to include FreeType, as
explained in the link above:

  "Applications that use [...] the documented way for header inclusion
   [...] don't need any change to the source code."
Comment 1 Andres Gomez Garcia 2013-12-02 05:06:48 PST
Giving it a look ...
Comment 2 Zan Dobersek 2013-12-02 06:08:13 PST
The GTK port relies on pkg-config to provide the correct inclusion directory, so I'm interested where this goes wrong.
Comment 3 Alberto Garcia 2013-12-02 06:25:59 PST
(In reply to comment #2)
> The GTK port relies on pkg-config to provide the correct inclusion
> directory, so I'm interested where this goes wrong.

Apparently we're including the freetype headers in an unsupported
way. We should use FT_FREETYPE_H, FT_TRUETYPE_TABLES_H, etc.

I think Andrés is testing the changes and will upload a patch soon.
Comment 4 Andres Gomez Garcia 2013-12-02 07:56:20 PST
Confirmed after upgrading freetype6 jhbuild module to 2.5.1 and trying to build:

  CXX    Source/WebCore/platform/graphics/freetype/libPlatform_la-SimpleFontDataFreeType.lo
../../Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:47:31: fatal error: freetype/tttables.h: No such file or directory
compilation terminated.
make[1]: *** [Source/WebCore/platform/graphics/freetype/libPlatform_la-SimpleFontDataFreeType.lo] Error 1
make[1]: Leaving directory `/opt/webkit/WebKit.git/WebKitBuild/Release'
make: *** [all] Error 2
Comment 5 Andres Gomez Garcia 2013-12-02 08:48:39 PST
Created attachment 218175 [details]
Patch
Comment 6 Alberto Garcia 2013-12-02 09:04:46 PST
(In reply to comment #5)
> Created an attachment (id=218175) [details]
> Patch

lgtm
Comment 7 Carlos Garcia Campos 2013-12-02 09:21:14 PST
Comment on attachment 218175 [details]
Patch

I guess this affects the stable branch too.
Comment 8 Andres Gomez Garcia 2013-12-02 09:24:04 PST
(In reply to comment #7)
> (From update of attachment 218175 [details])
> I guess this affects the stable branch too.

Yes, I think it makes sense to cherry-pick it.
Comment 9 Alberto Garcia 2013-12-02 09:24:43 PST
(In reply to comment #8)
> (In reply to comment #7)
> > (From update of attachment 218175 [details] [details])
> > I guess this affects the stable branch too.
> 
> Yes, I think it makes sense to cherry-pick it.

It does, I can reproduce it in Debian with freetype from sid.
Comment 10 WebKit Commit Bot 2013-12-02 09:46:22 PST
Comment on attachment 218175 [details]
Patch

Clearing flags on attachment: 218175

Committed r159939: <http://trac.webkit.org/changeset/159939>
Comment 11 WebKit Commit Bot 2013-12-02 09:46:26 PST
All reviewed patches have been landed.  Closing bug.