Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small ICU fails to build #45174

Closed
aduh95 opened this issue Oct 25, 2022 · 13 comments · Fixed by #45195
Closed

Small ICU fails to build #45174

aduh95 opened this issue Oct 25, 2022 · 13 comments · Fixed by #45195
Assignees
Labels
icu Issues and PRs related to the ICU dependency.

Comments

@aduh95
Copy link
Contributor

aduh95 commented Oct 25, 2022

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/[email protected]/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.

@aduh95
Copy link
Contributor Author

aduh95 commented Oct 25, 2022

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

@targos
Copy link
Member

targos commented Oct 25, 2022

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

@targos targos added the icu Issues and PRs related to the ICU dependency. label Oct 25, 2022
@targos
Copy link
Member

targos commented Oct 25, 2022

@nodejs/i18n-api

@srl295 srl295 self-assigned this Oct 25, 2022
@srl295
Copy link
Member

srl295 commented Oct 25, 2022

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

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

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

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

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

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

OK bisect says that its icu commit 03b94e9cb304

@richardlau
Copy link
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.

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

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

@richardlau i think you are right.

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

@richardlau could you try patching?

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

@richardlau except that icutools already depends on icu_implementation

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

@srl295
Copy link
Member

srl295 commented Oct 26, 2022

PTAL #45195

srl295 added a commit to srl295/node that referenced this issue Oct 26, 2022
- RTTI is needed for genrb now

Fixes: nodejs#45174
@srl295
Copy link
Member

srl295 commented Oct 26, 2022

the ICU PR was unicode-org/icu#2118

aduh95 pushed a commit that referenced this issue Oct 27, 2022
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
RafaelGSS pushed a commit that referenced this issue Nov 1, 2022
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
RafaelGSS pushed a commit that referenced this issue Nov 10, 2022
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
danielleadams pushed a commit that referenced this issue Dec 30, 2022
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
danielleadams pushed a commit that referenced this issue Dec 30, 2022
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
danielleadams pushed a commit that referenced this issue Jan 3, 2023
- RTTI is needed for genrb now.

Fixes: #45174
PR-URL: #45195
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icu Issues and PRs related to the ICU dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants