-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
doc: add tips about vcpkg cause build faild on windows #52181
doc: add tips about vcpkg cause build faild on windows #52181
Conversation
@H4ad Hi Vinicius, can you review this document? |
Since I never had this issue and I don't know how to reproduce it, I'm afraid that I should not approve this. But let's ping the other members of @nodejs/platform-windows and see if someone feels more comfortable approving this one. |
@congzhangzh I'd like to check this, but I too never had this issue. Do you have any idea how to reproduce the issue this tip solves? |
@StefanStojanovic Hi Stefan, that's great you can help:) First, let me clarify how I identified this problem.I have two windows to compile node, one work, and the other failed. How to reproduce this problem
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
: I use vcpkg install boost opentelem-cpp[oltp-http,oltp-grpc]
vcpkg install zlib
vcpkg integrate install
git clone https://github.com/nodejs/node.git
cd node
: I use vcbuild.bat x64 dll debug
vcbuild.bat x64 dll
cd vcpkg_repo_dir
vcpkg integrate remove
cd node_repo_dir
: I use vcbuild.bat x64 dll debug
vcbuild.bat x64 dll
cd node_repo_dir
rmdir out /q /s /f
: I use vcbuild.bat x64 dll debug
vcbuild.bat x64 dll
Btwthat should be a misconfig of vcpkg .props/.target hook? can you cc to upstream? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a fresh VM and tried out the scenario you suggested. All played out as you said it would, so although I've never experienced this before I can confirm your tip for fixing it works.
The remove command you have in the BUILDING.md
isn't correct (the one in your comment is), so please change that and I'll approve the PR.
Co-authored-by: Stefan Stojanovic <StefanStojanovic@users.noreply.github.com>
@StefanStojanovic Hi Stefan, that's cool, and I change that follow you advice, please review again :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Giving the approval on behalf of @StefanStojanovic, thanks for the great review, and @congzhangzh thanks for the PR.
Landed in dd711d2 |
PR-URL: #52181 Refs: nodejs/help#1656 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
PR-URL: #52181 Refs: nodejs/help#1656 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
vcpkg may cause nodejs build on windows to fail, symbol already defined in zlib.lib(zlib1.dll).
vcpkg uses some magic to hook into the vc++ project, add its include to include search dir and auto copy the dll to output dir if vcpkg integrate install is done.
some talk happens on the internet and none of them point to vcpkg, but one thing is sure, once you run vcpkg integrate remove, vcbuild.bat will succ!
vcpkg is popular and included in CLion and Visual Studio, so our folks should know this may be a trouble!
Refs: