Skip to content

Cannot build libnode v24.0.0 on Windows #58208

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

Open
alshdavid opened this issue May 7, 2025 · 3 comments · May be fixed by #58235
Open

Cannot build libnode v24.0.0 on Windows #58208

alshdavid opened this issue May 7, 2025 · 3 comments · May be fixed by #58235
Labels
windows Issues and PRs related to the Windows platform.

Comments

@alshdavid
Copy link

alshdavid commented May 7, 2025

Version

24.0.0

Platform

Windows 11 x86_64

Subsystem

Windows 11
PowerShell

$ python --version
Python 3.10.6
$ clang --version
clang version 19.1.1
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin
git clone "https://github.com/nodejs/node" --branch "v24.0.0"
cd node
.\vcbuild.bat                         # works
.\vcbuild.bat dll                     # does not work
.\vcbuild.bat x64 dll openssl-no-asm  # also does not work
$ .\vcbuild.bat dll
[vcvarsall.bat] Environment initialized for: 'x64'
Found MSVS version 17.0
Found Clang version 19.1.1
configure  --shared --dest-cpu=x64 --openssl-no-asm --clang-cl=19.1.1
Node.js configure: Found Python 3.10.6...

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

Every time

What is the expected behavior? Why is that the expected behavior?

To produce a libnode.dll file

What do you see instead?

Build error

C:\Users\dalsh\Development\alshdavid\libnode-prebuilt\node\deps\v8\include\v8-primitive.h(203,3):
 message : 'Write' has been explicitly marked deprecated here [C:\Users\dalsh\Development\alshdav 
id\libnode-prebuilt\node\libnode.vcxproj]
C:\Users\dalsh\Development\alshdavid\libnode-prebuilt\node\deps\v8\include\v8config.h(608,35): me 
ssage : expanded from macro 'V8_DEPRECATED' [C:\Users\dalsh\Development\alshdavid\libnode-prebuil 
t\node\libnode.vcxproj]
lld-link : error : undefined symbol: public: __cdecl node::ThreadsafeCopyOnWrite<class std::map<c
lass std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>, class no 
de::UnionBytes, struct std::less<class std::basic_string<char, struct std::char_traits<char>, cla
ss std::allocator<char>>>, class std::allocator<struct std::pair<class std::basic_string<char, st 
ruct std::char_traits<char>, class std::allocator<char>> const, class node::UnionBytes>>>>::Read: 
:Read(class node::ThreadsafeCopyOnWrite<class std::map<class std::basic_string<char, struct std:: 
char_traits<char>, class std::allocator<char>>, class node::UnionBytes, struct std::less<class st 
d::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>, class std::all 
ocator<struct std::pair<class std::basic_string<char, struct std::char_traits<char>, class std::a 
llocator<char>> const, class node::UnionBytes>>>> const *) [C:\Users\dalsh\Development\alshdavid\ 
libnode-prebuilt\node\libnode.vcxproj]
  >>> referenced by C:\Users\dalsh\Development\alshdavid\libnode-prebuilt\node\src\node_builtins. 
  h:131
  >>>               out\Release\obj\libnode\\tools\msvs\pch\node_pch.obj:(public: <auto> __cdecl  
  node::builtins::BuiltinLoader::GetBuiltinIds(void) const)

lld-link : error : undefined symbol: public: class std::map<class std::basic_string<char, struct  
std::char_traits<char>, class std::allocator<char>>, class node::UnionBytes, struct std::less<cla 
ss std::basic_string<char, struct std::char_traits<char>, class std::allocator<char>>>, class std 
::allocator<struct std::pair<class std::basic_string<char, struct std::char_traits<char>, class s 
td::allocator<char>> const, class node::UnionBytes>>> const & __cdecl node::ThreadsafeCopyOnWrite 
<class std::map<class std::basic_string<char, struct std::char_traits<char>, class std::allocator 
<char>>, class node::UnionBytes, struct std::less<class std::basic_string<char, struct std::char_ 
traits<char>, class std::allocator<char>>>, class std::allocator<struct std::pair<class std::basi 
c_string<char, struct std::char_traits<char>, class std::allocator<char>> const, class node::Unio 
nBytes>>>>::Read::operator*(void) const [C:\Users\dalsh\Development\alshdavid\libnode-prebuilt\no 
de\libnode.vcxproj]
  >>> referenced by C:\Users\dalsh\Development\alshdavid\libnode-prebuilt\node\src\node_builtins. 
  h:131
  >>>               out\Release\obj\libnode\\tools\msvs\pch\node_pch.obj:(public: <auto> __cdecl  
  node::builtins::BuiltinLoader::GetBuiltinIds(void) const)

Additional information

I have a repo that create prebuilt libnode binaries and the pipeline fails on Windows x64 and MacOS x64

https://github.com/alshdavid/libnode-prebuilt/actions/runs/14870045413/job/41756186494

@marco-ippolito marco-ippolito added the windows Issues and PRs related to the Windows platform. label May 7, 2025
@marco-ippolito
Copy link
Member

@nodejs/platform-windows

StefanStojanovic added a commit to JaneaSystems/node that referenced this issue May 8, 2025
@StefanStojanovic StefanStojanovic linked a pull request May 8, 2025 that will close this issue
@StefanStojanovic
Copy link
Contributor

@alshdavid Thanks for reporting this. I've opened a PR fixing it. I tested locally before opening a PR, but please, if you can, test the fix locally too, as vcbuild.bat dll is not tested in the CI.

StefanStojanovic added a commit to JaneaSystems/node that referenced this issue May 9, 2025
@alshdavid
Copy link
Author

Looks like it's working on my end! Thanks for the PR 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants