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
The latest master fails to build on Windows #23909
Comments
@nodejs/platform-windows Ideas? |
Hello @zhulika and thank you for the report. Edit: The following line indicates
|
P.S. In your workspace you should find two files
|
Googleling around this issue made me think that you might have a |
Hi. I'm working through the bisect, so will wait until I have a failing version of the build before pasting the gyp and vcxproj files. In the meantime, here is the value of my LIB evar: Microsoft Windows [Version 10.0.17134.345]
(c) 2018 Microsoft Corporation. All rights reserved.
D:\work>set lib
LIB=C:\Program Files\MySQL\MySQL Server 8.0\lib;
D:\work>dir %LIB%\libeay32.dll
The system cannot find the file specified.
D:\work>dir %LIB%\libeay32.lib
The system cannot find the file specified. I do have quite a few copies of libeay32.dll on my system, but none of them are in that folder. We may have to wait until tomorrow for the results of the bisect (10 rebuilds required). |
The cut-paste failed. Here's the rest of the check:
|
@zhulika, thank you for following up. I'm trying find which tools could cause MSBuild to inject that dependency into the build... |
I couldn't find a specific version that failed, because there are a bunch of commits in the final range that all seem to have different problems (in the way that these things often are). Perhaps a failure to find a file, a bunch of raw compilation errors, sometimes ml64 fails, other times it's the original LIBEAY32 issue. Worryingly (for me), they are from way back in March and appear to relate to adding openssl to the build in the first place. I attach a screenshot of the range that git bisect did settle on, FYI. I assume that someone must have tried building it on Windows in the last six months (!), so there must be something wrong with my setup. It's not that it can't find OpenSSL (which would mean that I'm missing a package), but it fails because there is a clash with LIBEAY32. Do you have any idea what it might be? Thanks, Dan PS, I also attach a config.gypi and openssl.vcxproj that I just got from the master HEAD (6223236), as per your earlier request. |
Again, thank you very much for following up. |
What might have happened in the above version range is that we upgrade to openSSL1.1.h, so it might be that now our openSSL version syncs with your LIBEAY32, and the Linker can confuse the two. As for your config.gypi and openssl.vcxproj, they look the same as mine, so I still don't have a definite answer, but I do have two suspects:
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup> Refs: https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/support-for-user-settings?view=vs-2017 |
Thank you for that. I've only been able to look at this intermittently today so far (it being a Saturday), but I think that I have tracked it down to a clash between the version of openssl in node\deps and the version that is installed by vcpkg (Microsoft's C++ package manager). Things seem to be a little happier if I turn off the VS2017 integration of vcpkg but I haven't quite got as far as doing a full rebuild to prove it. So please don't spend any more of your time on this until I know one way or the other. I'm sure it's something that is clashing on my PC, not a generic issue. Or you would have had hundreds of people complaining by now. Dan |
Thank you for the update. Any kind of solution (even if it's just local for you computer) will be tracked here and might help someone else in the future, so good luck. |
Turning off the vcpkg integration does allow me to build the latest Node. The problem was that vcpkg is still stuck on version 1.0.2p of openssl and using its Visual Studio integration mode inserts that obsolete version at the head of the list of include/lib directories for MSBUILD, causing all of the errors. There is an outstanding ticket to upgrade it but that's out of my pay grade; I'll just have to work without the integration for the moment. NodeJS is much more important to me than is vcpkg (even though they are both great!) Many thanks for your support, Dan |
Since NodeJS is providing all of its own dependencies, you can add a property to your MSBuild projects that will totally disable vcpkg's integration: <PropertyGroup>
<VcpkgEnabled>false</VcpkgEnabled>
</PropertyGroup> This will totally fix other users like @zhulika from having an issue here (though we'll look at trying to make this better in upstream vcpkg as well :)). |
Thanks very much @ras0219-msft; that's a very useful option to know about. Can it be added to the documentation for vcpkg? https://github.com/Microsoft/vcpkg/blob/master/docs/users/integration.md |
Running the below command from the directory where vcpkg is checked out worked for me
|
I've just tried building the latest master (482b56a) on Windows (using vcbuild) and I get loads of "already-defined" errors being reported:
openssl.lib(o_str.obj) : error LNK2005: CRYPTO_strdup already defined in libeay32.lib(LIBEAY32.dll) [D:\work\github\node.master\node\deps\openssl\openssl-cli.vcxproj] openssl.lib(mem.obj) : error LNK2005: CRYPTO_malloc already defined in libeay32.lib(LIBEAY32.dll) [D:\work\github\node.master\node\deps\openssl\openssl-cli.vcxproj] openssl.lib(mem.obj) : error LNK2005: CRYPTO_free already defined in libeay32.lib(LIBEAY32.dll) [D:\work\github\node.master\node\deps\openssl\openssl-cli.vcxproj] openssl.lib(mem.obj) : error LNK2005: CRYPTO_realloc already defined in libeay32.lib(LIBEAY32.dll) [D:\work\github\node.master\node\deps\openssl\openssl-cli.vcxproj] openssl.lib(bn_lib.obj) : error LNK2005: BN_bin2bn already defined in libeay32.lib(LIBEAY32.dll) [D:\work\github\node.master\node\deps\openssl\openssl-cli.vcxproj] ... etc
The v8.12.0 tag (731eed2) builds fine on my PC, so I don't think it's a setup/config issue. I've also tried various combinations of vcbuild flags, which fail with the same errors. Not sure what else to say/try.
The text was updated successfully, but these errors were encountered: