Repository navigation
Temporal does not compile with shared ICU or no ICU #62676
Description
When Node.js is configured with --with-intl=none (or --without-intl) or --with-intl=system-icu the build fails when Temporal is enabled.
e.g.
--with-intl=system-icu: https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu2404_sharedlibs_icu_x64/55537/console
20:51:03 ccache clang++-19 -o /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/objects/js-temporal-zoneinfo64.o ../deps/v8/src/objects/js-temporal-zoneinfo64.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_FILE_OFFSET_BITS=64' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-DBUILDING_V8_SHARED' '-DBUILDING_V8_PLATFORM_SHARED' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DV8_TARGET_ARCH_X64' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.17"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DENABLE_GDB_JIT_INTERFACE' '-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION' '-DV8_SHORT_BUILTIN_CALLS' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_TEMPORAL_SUPPORT' '-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DV8_ENABLE_SEEDED_ARRAY_INDEX_HASH' '-DNDEBUG' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB' '-DV8_ENABLE_LEAPTIERING' '-DV8_ENABLE_SPARKPLUG' '-DV8_ENABLE_MAGLEV' '-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DV8_ENABLE_WASM_SIMD256_REVEC' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' -I../deps/v8 -I../deps/v8/include -I/opt/icu-73.2/include -I/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj/gen/inspector-generated-output-root -I../deps/v8/third_party/inspector_protocol -I/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj/gen -I/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj/gen/inspector-generated-output-root/include -I/home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj/gen/generate-bytecode-output-root -I../deps/v8/third_party/zlib -I../deps/v8/third_party/zlib/google -I../deps/v8/third_party/fp16/src/include -I../deps/v8/third_party/highway/src -I../deps/v8/third_party/simdutf -I../deps/v8/third_party/abseil-cpp -I../deps/crates/vendor/temporal_capi/bindings/cpp -fvisibility=hidden -fvisibility-inlines-hidden -pthread -Wno-unused-parameter -m64 -O3 -fno-omit-frame-pointer -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -fno-strict-aliasing -std=gnu++20 -Wno-invalid-offsetof -Wno-nullability-completeness -MMD -MF /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/.deps//home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/objects/js-temporal-zoneinfo64.o.d.raw -c
20:51:05 ../deps/v8/src/objects/js-temporal-zoneinfo64.cc:14:10: fatal error: 'udatamem.h' file not found
20:51:05 14 | #include "udatamem.h"
20:51:05 | ^~~~~~~~~~~~
20:51:05 1 error generated.
20:51:05 make[2]: *** [tools/v8_gypfiles/v8_base_without_compiler.target.mk:1138: /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/objects/js-temporal-zoneinfo64.o] Error 1
--without-intlhttps://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu2404_sharedlibs_withoutintl_x64/55537/console
23:19:59 /usr/bin/ld: /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/objects/js-temporal-zoneinfo64.o: in function `v8::internal::ZoneInfo64Provider::ZoneInfo64Provider()':
23:19:59 js-temporal-zoneinfo64.cc:(.text._ZN2v88internal18ZoneInfo64ProviderC2Ev+0x13): undefined reference to `zoneinfo64_static_data_len'
23:19:59 /usr/bin/ld: js-temporal-zoneinfo64.cc:(.text._ZN2v88internal18ZoneInfo64ProviderC2Ev+0x1d): undefined reference to `zoneinfo64_static_data'
23:20:00 clang++-19: error: linker command failed with exit code 1 (use -v to see invocation)
23:20:00 make[2]: *** [tools/v8_gypfiles/mksnapshot.target.mk:222: /home/iojs/build/workspace/node-test-commit-linux-containered/out/Release/mksnapshot] Error 1
23:20:00 rm a50936564b94c8a1c04b713ccd861b094c973ce83a2131b86111777ecadc0a82.intermediate
The first issue (with --with-intl=system-icu) stems from V8 using a private header file from ICU. In #62508, this is being worked around by temporarily patching V8 with https://github.com/nodejs/node/pull/62508/files#diff-89a9a4423f9b83142d44bfb376f2c56ffff396ee1ef98c4930a61d5ed9732c7f. Unfortunately applying that in #61806 breaks parallel/test-temporal-with-zoneinfo in the default (no --with-intl=... specified) case.
e.g. https://github.com/nodejs/node/actions/runs/24165429332/job/70525857573?pr=61806#step:9:6040
=== release test-temporal-with-zoneinfo ===
Path: parallel/test-temporal-with-zoneinfo
Error: --- stderr ---
/home/runner/work/node/node/node/test/parallel/test-temporal-with-zoneinfo.js:19
assert.strictEqual(pdt.toString(), '1969-07-20T20:17:00Z');
^
Error: Temporal error: Internal error: Failed to load timezone info.
at Instant.toString (<anonymous>)
at Object.<anonymous> (/home/runner/work/node/node/node/test/parallel/test-temporal-with-zoneinfo.js:19:24)
at Module._compile (node:internal/modules/cjs/loader:1829:14)
at Object..js (node:internal/modules/cjs/loader:1969:10)
at Module.load (node:internal/modules/cjs/loader:1552:32)
at Module._load (node:internal/modules/cjs/loader:1354:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:255:19)
at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
at node:internal/main/run_main_module:33:47
Node.js v26.0.0-pre
Command: out/Release/node --harmony-temporal /home/runner/work/node/node/node/test/parallel/test-temporal-with-zoneinfo.js
===
=== 1 tests failed
===
Failed tests:
out/Release/node --harmony-temporal /home/runner/work/node/node/node/test/parallel/test-temporal-with-zoneinfo.js
Also ideally we don't want to be carrying patches on top of V8 as much as possible, so would prefer something patched upstream in V8 if possible.
Refs: #61806 (comment)
Activity
aduh95 commentedon Aug 9, 2026
Still relevant
srl295 commentedon Aug 21, 2026
Hi!
I actually didn't see the proposal go to that list.
I think a simpler patch can be made without using private headers, working on that.
build: Fix Temporal compilation with system or no ICU
aduh95 commentedon Aug 21, 2026
I can confirm srl295/v8@8ffc0b8 looks quite promising, thanks!
test-temporal-with-zoneinfo--without-intl)--with=intl=system-icu)--with-intl=small-icu)No ICU build error
The following diff fixes the compilation (and
test-temporal-with-zoneinfostill passes):srl295 commentedon Aug 21, 2026
I assume no icu isn't a regression.
fix: fix for no-icu build
srl295 commentedon Aug 21, 2026
https://chromium-review.googlesource.com/c/v8/v8/+/8281487
srl295 commentedon Aug 21, 2026
@aduh95 i dug into this a little more. (and please chime in on the v8 above ^ )
The no-icu failure you got seems to also be where
v8_enable_temporal_supportis falsy. If it was true, then the data items should have been baked in. I'm going to restore the code, but with an ifdef.build: Fix Temporal compilation with system or no ICU
srl295 commentedon Aug 24, 2026
CC @nodejs/i18n-api
aduh95 commentedon Aug 24, 2026
The
defined(V8_TEMPORAL_SUPPORT)in srl295/v8@9e43c2a are almost certainly a red herring, thedeps/v8/src/objects/js-temporal-zoneinfo64.ccfile should be included only if temporal support is enabled, so it's only adding non-reachable code AFAICT.FWIW if I manually run
python deps/v8/tools/include-file-as-bytes.py deps/crates/vendor/zoneinfo64-v0_3/src/data/zoneinfo64.res deps/v8/src/objects/builtins-temporal-zoneinfo64-data.cc zoneinfo64_static_data, add a#include "builtins-temporal-zoneinfo64-data.cc"indeps/v8/src/objects/js-temporal-zoneinfo64.cc, I'm able to compile with--without-intl. FWIW here's the build rule for that file:node/deps/v8/BUILD.gn
Lines 3563 to 3578 in 46a7dbd
I couldn't find it in Node.js GYP files. So the issue I reported above is more likely Node.js-specific than indicating an issue with srl295/v8@8ffc0b8. I'm happy to chime in on the V8 CL, but I'm afraid I'd likely be off-topic.
srl295 commentedon Aug 24, 2026
OK.
Ah, so that needs to be ported to node.. thanks
build: Fix Temporal compilation with system or no ICU
deps: V8: cherry-pick 2c5a216d6f0b
build: Fix Temporal compilation with system or no ICU
build: Fix Temporal compilation with system or no ICU
deps: V8: cherry-pick cd89fe6f7acb
srl295 commentedon Sep 17, 2026
I have a fix in #65992 that floats a v8 patch.
build: Fix Temporal compilation with system or no ICU
build: Fix Temporal compilation with system or no ICU
build: Fix Temporal compilation with system or no ICU
deps: V8: cherry-pick 67771dd35093
Fix Temporal compilation with system or no ICU
Fix Temporal compilation with system or no ICU
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
build: add `v8_enable_temporal_systemicu`
build: port `make_temporal_zoneinfo_cpp` to GYP
deps: V8: backport 9fb4444bfc46
build: add `v8_enable_temporal_systemicu`
build: port `make_temporal_zoneinfo_cpp` to GYP
build: port `make_temporal_zoneinfo_cpp` to GYP
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46
deps: V8: backport 9fb4444bfc46