Bug 127283 - [GTK] Fix a c++11 compliance issue for fontconfig
Summary: [GTK] Fix a c++11 compliance issue for fontconfig
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: ChangSeok Oh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-20 04:10 PST by ChangSeok Oh
Modified: 2014-01-21 10:18 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.92 KB, patch)
2014-01-20 04:19 PST, ChangSeok Oh
no flags Details | Formatted Diff | Diff
Patch (1.64 KB, patch)
2014-01-21 02:14 PST, ChangSeok Oh
no flags Details | Formatted Diff | Diff
Patch (2.90 KB, patch)
2014-01-21 09:16 PST, ChangSeok Oh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ChangSeok Oh 2014-01-20 04:10:46 PST
A build failure happens when building with clang.

In file included from ../../Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:29:
In file included from /home/shivamidow/Projects/WebKit/WebKitBuild/Dependencies/Root/include/cairo/cairo-ft.h:50:
/home/shivamidow/Projects/WebKit/WebKitBuild/Dependencies/Root/include/fontconfig/fontconfig.h:116:39: error: 
      invalid suffix on literal; C++11 requires a space between literal and identifier
      [-Wreserved-user-defined-literal]
#define FC_CACHE_SUFFIX             ".cache-"FC_CACHE_VERSION
                                             ^
/home/shivamidow/Projects/WebKit/WebKitBuild/Dependencies/Root/include/fontconfig/fontconfig.h:117:45: error: 
      invalid suffix on literal; C++11 requires a space between literal and identifier
      [-Wreserved-user-defined-literal]
#define FC_DIR_CACHE_FILE           "fonts.cache-"FC_CACHE_VERSION
                                                  ^
/home/shivamidow/Projects/WebKit/WebKitBuild/Dependencies/Root/include/fontconfig/fontconfig.h:118:47: error: 
      invalid suffix on literal; C++11 requires a space between literal and identifier
      [-Wreserved-user-defined-literal]
#define FC_USER_CACHE_FILE          ".fonts.cache-"FC_CACHE_VERSION
                                                   ^
  CXX      Source/WebCore/bridge/libWebCore_la-NP_jsobject.lo
  CXX      Source/WebCore/bridge/libWebCore_la-npruntime.lo

So I propose to apply a proper patch to fontconfig or else to bump fontconfig to at lease 2.9.91
Comment 1 ChangSeok Oh 2014-01-20 04:19:10 PST
Created attachment 221645 [details]
Patch
Comment 2 Martin Robinson 2014-01-20 09:53:52 PST
Is there any way we can instead compile fontconfig with -Wno-reserved-user-defined-literal
Comment 3 Zan Dobersek 2014-01-20 11:40:07 PST
Using module_autogenargs in Tools/gtk/jhbuildrc should work:

module_autogenargs['fontconfig'] = 'CFLAGS=...' + autogenargs
Comment 4 Martin Robinson 2014-01-20 12:29:34 PST
Maybe we can wait for the alternate approach on this one so that we don't have to have another patch in the repo?
Comment 5 ChangSeok Oh 2014-01-21 02:14:41 PST
Created attachment 221729 [details]
Patch
Comment 6 ChangSeok Oh 2014-01-21 02:16:31 PST
(In reply to comment #2)
> Is there any way we can instead compile fontconfig with -Wno-reserved-user-defined-literal

Yeah. we can avoid the failure by adding the flag, -Wno-reserved-user-defined-literal to CXXFALGS.
Comment 7 ChangSeok Oh 2014-01-21 02:18:37 PST
(In reply to comment #3)
> Using module_autogenargs in Tools/gtk/jhbuildrc should work:
> 
> module_autogenargs['fontconfig'] = 'CFLAGS=...' + autogenargs

Zan thanks for the tip. But the build failure happens when building webkit not fontconfig itself. Sorry for my poor description about this bug. :P
Comment 8 Martin Robinson 2014-01-21 08:30:42 PST
(In reply to comment #7)
> (In reply to comment #3)
> > Using module_autogenargs in Tools/gtk/jhbuildrc should work:
> > 
> > module_autogenargs['fontconfig'] = 'CFLAGS=...' + autogenargs
> 
> Zan thanks for the tip. But the build failure happens when building webkit not fontconfig itself. Sorry for my poor description about this bug. :P

Oh, in that case a patch is probably the best, because we don't want to let C++11 slip into WebKit code. Sorry for the confusion. Do you mind if I r+ your patch again?
Comment 9 ChangSeok Oh 2014-01-21 09:11:26 PST
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #3)
> > > Using module_autogenargs in Tools/gtk/jhbuildrc should work:
> > > 
> > > module_autogenargs['fontconfig'] = 'CFLAGS=...' + autogenargs
> > 
> > Zan thanks for the tip. But the build failure happens when building webkit not fontconfig itself. Sorry for my poor description about this bug. :P
> 
> Oh, in that case a patch is probably the best, because we don't want to let C++11 slip into WebKit code. Sorry for the confusion. Do you mind if I r+ your patch again?

No problem. Let me re-upload the first patch near soon. :)
Comment 10 ChangSeok Oh 2014-01-21 09:16:35 PST
Created attachment 221752 [details]
Patch
Comment 11 ChangSeok Oh 2014-01-21 09:50:26 PST
Comment on attachment 221752 [details]
Patch

Thanks for the r+!
Comment 12 WebKit Commit Bot 2014-01-21 10:18:30 PST
Comment on attachment 221752 [details]
Patch

Clearing flags on attachment: 221752

Committed r162448: <http://trac.webkit.org/changeset/162448>
Comment 13 WebKit Commit Bot 2014-01-21 10:18:33 PST
All reviewed patches have been landed.  Closing bug.