Sitelet https://github.com/nodejs/node/issues/45174
Skip to content

Small ICU fails to build #45174

Description

@aduh95

Version

main

Platform

macOS

Subsystem

build

What steps will reproduce the bug?

./configure --node-builtin-modules-path $(pwd) --with-intl=small-icu --without-npm --without-corepack
CC="ccache cc" CXX="ccache c++" make jstest -j12

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

No response

What do you see instead?

/Library/Developer/CommandLineTools/usr/bin/make -C out BUILDTYPE=Release V=0
  ccache c++ -o /Users/duhamean/Documents/node/out/Release/obj.target/genrb/deps/icu-small/source/tools/genrb/parse.o ../deps/icu-small/source/tools/genrb/parse.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DNODE_OPENSSL_HAS_QUIC' '-D_DARWIN_USE_64_BIT_INODE=1' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I../deps/icu-small/source/common -I../deps/icu-small/source/i18n -I../deps/icu-small/source/tools/toolutil  -O3 -gdwarf-2 -mmacosx-version-min=10.15 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++17 -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF /Users/duhamean/Documents/node/out/Release/.deps//Users/duhamean/Documents/node/out/Release/obj.target/genrb/deps/icu-small/source/tools/genrb/parse.o.d.raw   -c
  ccache c++ -Wl,-search_paths_first -mmacosx-version-min=10.15 -arch x86_64 -L/Users/duhamean/Documents/node/out/Release -stdlib=libc++  -o "/Users/duhamean/Documents/node/out/Release/iculslocs" /Users/duhamean/Documents/node/out/Release/obj.target/iculslocs/tools/icu/iculslocs.o /Users/duhamean/Documents/node/out/Release/obj.target/iculslocs/tools/icu/no-op.o /Users/duhamean/Documents/node/out/Release/libicutools.a 
  ccache c++ -Wl,-search_paths_first -mmacosx-version-min=10.15 -arch x86_64 -L/Users/duhamean/Documents/node/out/Release -stdlib=libc++  -o "/Users/duhamean/Documents/node/out/Release/torque" /Users/duhamean/Documents/node/out/Release/obj.target/torque/deps/v8/src/torque/torque.o /Users/duhamean/Documents/node/out/Release/libtorque_base.a /Users/duhamean/Documents/node/out/Release/libv8_libbase.a 
  touch 3e5ac1b7919114e6c645550b41a071302d3a2a7b.intermediate
  LD_LIBRARY_PATH=/Users/duhamean/Documents/node/out/Release/lib.host:/Users/duhamean/Documents/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/v8_gypfiles; mkdir -p /Users/duhamean/Documents/node/out/Release/obj/gen/inspector-generated-output-root/src/inspector/protocol /Users/duhamean/Documents/node/out/Release/obj/gen/inspector-generated-output-root/include/inspector; /usr/local/opt/python@3.10/bin/python3.10 ../../deps/v8/third_party/inspector_protocol/code_generator.py --jinja_dir ../../deps/v8/third_party --output_base "/Users/duhamean/Documents/node/out/Release/obj/gen/inspector-generated-output-root/src/inspector" --config ../../deps/v8/src/inspector/inspector_protocol_config.json --config_value "protocol.path=../../deps/v8/include/js_protocol.pdl" --inspector_protocol_dir ../../deps/v8/third_party/inspector_protocol
In file included from ../deps/icu-small/source/tools/genrb/parse.cpp:63:
In file included from ../deps/icu-small/source/i18n/collationtailoring.h:27:
../deps/icu-small/source/common/unifiedcache.h:111:24: error: use of typeid requires -frtti
       const char *s = typeid(T).name();
                       ^
../deps/icu-small/source/common/unifiedcache.h:119:24: error: use of typeid requires -frtti
       const char *s = typeid(T).name();
                       ^
../deps/icu-small/source/common/unifiedcache.h:130:33: error: use of typeid requires -frtti
       return this == &other || typeid(*this) == typeid(other);
                                ^
../deps/icu-small/source/common/unifiedcache.h:130:50: error: use of typeid requires -frtti
       return this == &other || typeid(*this) == typeid(other);
                                                 ^
../deps/icu-small/source/tools/genrb/parse.cpp:811:23: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
            buffer += sprintf(buffer, "\\u%04X", (int)c);
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                      ^
1 warning and 4 errors generated.
make[1]: *** [/Users/duhamean/Documents/node/out/Release/obj.target/genrb/deps/icu-small/source/tools/genrb/parse.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [node] Error 2

Additional information

Switching to --without-intl or full ICU fixes the issue. I'll try bisecting to see when this was introduced but I suspect it's the recent ICU update.

Activity

  1. aduh95 commented on Oct 25, 2022

    @aduh95
    ContributorAuthor

    I can confirm that 67828d5 is building, and 1f9b181 is not. /cc @targos

  2. targos commented on Oct 25, 2022

    @targos
    Member

    I would only be able to revert the ICU update. I don't know how to fix it.

  3. added
    icuIssues and PRs related to the ICU dependency.
    on Oct 25, 2022
  4. targos commented on Oct 25, 2022

    @targos
    Member

    @nodejs/i18n-api

  5. self-assigned this
    on Oct 25, 2022
  6. srl295 commented on Oct 25, 2022

    @srl295
    Member

    bisecting ICU to see what broke. Even old node versions (Gallium something) would fail to build icu 72

  7. srl295 commented on Oct 26, 2022

    @srl295
    Member

    can someone suggest a way to speed up the build to just build the failing .o file?

  8. srl295 commented on Oct 26, 2022

    @srl295
    Member

    can someone suggest a way to speed up the build to just build the failing .o file?

    maybe make -C out BUILDTYPE=Release V=0 Release/libicutools.a

  9. srl295 commented on Oct 26, 2022

    @srl295
    Member

    OK bisect says that its icu commit 03b94e9cb304

  10. richardlau commented on Oct 26, 2022

    @richardlau
    Member
    In file included from ../deps/icu-small/source/tools/genrb/parse.cpp:63:
    In file included from ../deps/icu-small/source/i18n/collationtailoring.h:27:
    ../deps/icu-small/source/common/unifiedcache.h:111:24: error: use of typeid requires -frtti
           const char *s = typeid(T).name();
                           ^
    

    Maybe we need to extend enabling rtti to the other ICU targets?

    'direct_dependent_settings': {
    'conditions': [
    [ 'os_posix == 1 and OS != "mac" and OS != "ios"', {
    'cflags': [ '-Wno-deprecated-declarations', '-Wno-strict-aliasing' ],
    'cflags_cc': [ '-frtti' ],
    'cflags_cc!': [ '-fno-rtti' ],
    }],
    [ 'OS == "mac" or OS == "ios"', {
    'xcode_settings': {'GCC_ENABLE_CPP_RTTI': 'YES' },
    }],
    [ 'OS == "win"', {
    'msvs_settings': {
    'VCCLCompilerTool': {'RuntimeTypeInfo': 'true'},
    }
    }],

    It's currently set for icu_implementation but I think the failure has occured in genrb.

  11. srl295 commented on Oct 26, 2022

    @srl295
    Member

    It's currently set for icu_implementation but I think the failure has occured in genrb.

    @richardlau i think you are right.

  12. srl295 commented on Oct 26, 2022

    @srl295
    Member

    @richardlau could you try patching?

  13. srl295 commented on Oct 26, 2022

    @srl295
    Member

    @richardlau except that icutools already depends on icu_implementation

    'dependencies': [ 'icu_implementation', 'icu_uconfig' ],

  14. srl295 commented on Oct 26, 2022

    @srl295
    Member

    PTAL #45195

  15. srl295 commented on Oct 26, 2022

    @srl295
    Member

    the ICU PR was unicode-org/icu#2118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

icuIssues and PRs related to the ICU dependency.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions