nodejs / nodejs/node

Temporal does not compile with shared ICU or no ICU

Ouverte
#62,676 20 commentaires 6 réactions 1 personne assignée Voir sur GitHub

@srl295 y travaille déjà.

Depuis le 11/9/2026.

i18n-api icu never-stale v8 engine
Langage dominant
JavaScript
Étoiles
122k
Forks
37.3k
Merge moyen
4 j 2 h
PR mergées (30 j)
283

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.

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
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 https://github.com/nodejs/node/pull/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 https://github.com/nodejs/node/pull/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: https://github.com/nodejs/node/pull/61806#issuecomment-4208315579

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.