Skip to content

Conversation

@ShenHongFei
Copy link
Contributor

configure --v8-enable-temporal-support --with-ltcg --dest-cpu=x64 --clang-cl=20.1.8

Fixed an error when building crates.gyp on Windows, and correctly set the lib file extension and system library dependencies.

Current error

     Compiling temporal_rs v0.1.0
     Compiling temporal_capi v0.1.0
     Compiling node_crates v0.1.0 (D:\1\nodejs\deps\crates)
      Finished `release` profile [optimized] target(s) in 9.09s
E:\sdk\vs\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(254,5): warning MSB8065: Custom build for item "Cargo.toml" succeeded, but specified output "d:\1\nodejs\out\release\obj\global_intermediate\release\libnode_crates.a" has not been created. This may cause incremental build to work incorrectly. [D:\1\nodejs\deps\crates\node_crates.vcxproj]
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) NtReadFile [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\io\mod.rs:484
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::io::default_read_to_end::hae912e80507d6821)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\io\mod.rs:484
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::io::default_read_to_end::hfa170b960d79e0a1)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\pal\windows\handle.rs:155
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::pal::windows::handle::Handle::read_to_end::hcf0b8f778f1125e4)
  >>> referenced 1 more times
  
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) RtlNtStatusToDosError [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\io\mod.rs:484
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::io::default_read_to_end::hae912e80507d6821)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\io\mod.rs:484
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::io::default_read_to_end::hfa170b960d79e0a1)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\fs\windows.rs:1362
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::fs::windows::remove_dir_all::hc765fc4a95a44ac9)
  >>> referenced 9 more times
  
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) GetUserProfileDirectoryW [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\env.rs:644
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::env::home_dir::h208640d7371dbbd7)
  
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) NtOpenFile [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\fs\windows.rs:1362
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::fs::windows::remove_dir_all::hc765fc4a95a44ac9)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\fs\windows.rs:1362
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::fs::windows::remove_dir_all::hc765fc4a95a44ac9)
  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\fs\windows\remove_dir_all.rs:101
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::fs::windows::remove_dir_all::open_link_no_reparse::hc86ad9e73694d67a)
  >>> referenced 3 more times
  
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) NtCreateNamedPipeFile [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\pal\windows\pipe.rs:115
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::pal::windows::pipe::anon_pipe::hb590bfe084a23905)
  
�[31;1mlld-link : error : undefined symbol: __declspec(dllimport) NtWriteFile [D:\1\nodejs\tools\v8_gypfiles\mksnapshot.vcxproj]
�[m  >>> referenced by /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library\std\src\sys\pal\windows\handle.rs:314
  >>>               node_crates.lib(std-80c6612147140e42.std.fe2f9c68055895e3-cgu.0.rcgu.o):(std::sys::pal::windows::handle::Handle::synchronous_write::hadd9a6025901175c)

After repair

Node.js has been successfully built on windows

Temporal.Now.plainDateISO().toString() outputs '2025-12-24'

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run. labels Dec 24, 2025
@ShenHongFei
Copy link
Contributor Author

related pr: #61072

@legendecas , could you please review this when you get a chance? Thanks!

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

Labels

dependencies Pull requests that update a dependency file. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants