Skip to content

deps: issues with v8 and prior ICUs #19151

@srl295

Description

@srl295
  • Version: master
  • Platform: mac
  • Subsystem: deps

configure --with-icu-source=https://ssl.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.zip --with-intl=full-icu

… (while bypassing #19150 by avoiding iculslocs ) will exhibit the following error:

../../deps/v8/src/objects/intl-objects.cc:733:19: error: no member named 'toUTF8String' in 'icu_58::UnicodeString'
        category->toUTF8String(keyword).data());
        ~~~~~~~~  ^
1 error generated.

The above is probably due to std::string now being used directly by v8 with ICU, and this might fix it (note a comment that's now wrong).

diff --git a/tools/icu/icu-generic.gyp b/tools/icu/icu-generic.gyp
index 8f29369255..a50f12d794 100644
--- a/tools/icu/icu-generic.gyp
+++ b/tools/icu/icu-generic.gyp
@@ -35,9 +35,7 @@
           'UCONFIG_NO_REGULAR_EXPRESSIONS=1',
           'U_ENABLE_DYLOAD=0',
           'U_STATIC_IMPLEMENTATION=1',
-          # Don't need std::string in API.
-          # Also, problematic: <http://bugs.icu-project.org/trac/ticket/11333>
-          'U_HAVE_STD_STRING=0',
+          'U_HAVE_STD_STRING=1',
           # TODO(srl295): reenable following pending
           # https://code.google.com/p/v8/issues/detail?id=3345
           # (saves some space)

On some systems, there's also an issue in v8 which I worked around at srl295@384ab7d - introduced into v8 at v8/v8@99e8963 (and into node later) - there is a call to icu::toUCharPtr() passed as an input to a reinterpret_cast. This seems to unnecessarily tie the code to ICU 59+, and in any event ICU uses char16_t and not UChar as the type for C++ going forward. So toUCharPtr() is not something to call going forward. edit split this off to #19656

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-apiIssues and PRs related to the i18n implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions