[Webkit-unassigned] [Bug 101179] New: Build failure with ICU 50 and C++11

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 4 21:50:06 PST 2012


           Summary: Build failure with ICU 50 and C++11
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: Arfrever.FTA at GMail.Com

When GCC >=4.7 (or another compiler supporting C++11) is used, then UChar type from ICU 50 is a typedef to char16_t instead of unsigned short int. This results in compilation failure in WebKit.

To reproduce this bug, you must:
1. Build ICU 50 using GCC >=4.7. ICU will automatically be built with -std=c++11 flag.
2. Build WebKit with -std=c++11 (or -std=gnu++11) manually added to CXXFLAGS.

Compilation failure does not occur with ICU 49 or older.

Last lines from `make`:

  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSBase.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSCallbackConstructor.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSCallbackFunction.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSCallbackObject.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSClassRef.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSContextRef.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSObjectRef.lo
  CXX      Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSStringRef.lo
Source/JavaScriptCore/API/JSStringRef.cpp: In function ‘OpaqueJSString* JSStringCreateWithCharacters(const JSChar*, size_t)’:
Source/JavaScriptCore/API/JSStringRef.cpp:39:50: error: invalid conversion from ‘const JSChar* {aka const short unsigned int*}’ to ‘const UChar* {aka const char16_t*}’ [-fpermissive]
In file included from Source/JavaScriptCore/API/JSStringRef.cpp:30:0:
Source/JavaScriptCore/API/OpaqueJSString.h:44:39: error:   initializing argument 1 of ‘static WTF::PassRefPtr<OpaqueJSString> OpaqueJSString::create(const UChar*, unsigned int)’ [-fpermissive]
Source/JavaScriptCore/API/JSStringRef.cpp: In function ‘const JSChar* JSStringGetCharactersPtr(JSStringRef)’:
Source/JavaScriptCore/API/JSStringRef.cpp:75:31: error: invalid conversion from ‘UChar* {aka char16_t*}’ to ‘const JSChar* {aka const short unsigned int*}’ [-fpermissive]
make[1]: *** [Source/JavaScriptCore/API/libjavascriptcoregtk_3_0_la-JSStringRef.lo] Error 1

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list