Skip to content
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

node-gyp fails for grpc on windows-latest action, with Node 12 and 14 #2114

Closed
bcoe opened this issue May 4, 2020 · 5 comments
Closed

node-gyp fails for grpc on windows-latest action, with Node 12 and 14 #2114

bcoe opened this issue May 4, 2020 · 5 comments

Comments

@bcoe
Copy link

bcoe commented May 4, 2020

Verbose output (from npm or node-gyp):
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  win_delay_load_hook.cc
  WINDOWS_BUILD_WARNING.vcxproj -> D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\Release\\WINDOWS_BUILD_WARNING.node
  address_sorting.c
  address_sorting_posix.c
  address_sorting_windows.c
  win_delay_load_hook.cc
  address_sorting.vcxproj -> D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\Release\\libaddress_sorting.lib
  ares__close_sockets.c
  ares__get_hostent.c
##[warning]D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\cares\cares\ares__get_hostent.c(141,32): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\ares.vcxproj]
  ares__read_line.c
  ares__timeval.c
  ares_cancel.c
  ares_create_query.c
  ares_data.c
  ares_destroy.c
  ares_expand_name.c
  ares_expand_string.c
  ares_fds.c
  ares_free_hostent.c
  ares_free_string.c
 ares_platform.c
  ares_process.c
  ares_query.c
  ares_search.c
  ares_send.c
  ares_strcasecmp.c
  ares_strdup.c
  ares_strerror.c
  ares_strsplit.c
  ares_timeout.c
  ares_version.c
  ares_writev.c
  bitncmp.c
  inet_net_pton.c
  inet_ntop.c
  windows_port.c
  win_delay_load_hook.cc
  ares.vcxproj -> D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\Release\\libares.lib
  err_data.c
  a_bitstr.c
##[warning]D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(147,1): warning C4005: 'OPENSSL_VERSION_NUMBER': macro redefinition (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
##[error]C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\ossl_typ.h(92,30): error C2371: 'EVP_MD_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c)D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(303,30): error C2371: 'EVP_MD_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\ossl_typ.h(92): message : see declaration of 'EVP_MD_CTX' (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c)D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(303): note: see declaration of 'EVP_MD_CTX' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
##[error]D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(304,26): error C2371: 'EVP_MD': redefinition; different basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
##[error]C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\ossl_typ.h(91): message : see declaration of 'EVP_MD' (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c)C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\ossl_typ.h(100,34): error C2371: 'EVP_ENCODE_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
##[error]D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(308,34): error C2371: 'EVP_ENCODE_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\ossl_typ.h(100): message : see declaration of 'EVP_ENCODE_CTX' (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_bitstr.c)D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(308): note: see declaration of 'EVP_ENCODE_CTX' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
##[error]C:\Users\runneradmin\AppData\Local\node-gyp\Cache\12.16.3\include\node\openssl\crypto.h(231,3): error C2371: 'CRYPTO_THREADID': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]
D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(231): message : see declaration of 'CRYPTO_THREADID' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [D:\a\cloud-trace-nodejs\cloud-trace-nodejs\node_modules\grpc\build\boringssl.vcxproj]

This failure started cropping up with the most recent release of Node 12, and also occurs on Node 14. We continue to be able to compile on Node 10 at latest.

A full failing test run can be found here (GitHub actions makes it difficult to copy the whole terminal).

@bcoe bcoe changed the title node-gyp fails on windows-latest action, with Node 12 and 14 node-gyp fails for grpc on windows-latest action, with Node 12 and 14 May 4, 2020
@richardlau
Copy link
Member

This failure started cropping up with the most recent release of Node 12, and also occurs on Node 14. We continue to be able to compile on Node 10 at latest.

This looks like some sort of mismatch/conflict between OpenSSL and BoringSSL. Node.js 10 is still on OpenSSL 1.1.1e while 12 and 14 were updated to 1.1.1g.

@bcoe
Copy link
Author

bcoe commented May 5, 2020

@richardlau would this be something we could potentially fix on the grpc side of things (CC: @murgatroid99), or something that would need to be fixed in node-gyp (here's where I admit I tend to avoid compiled dependencies, and this is a knowledge gap for me).

@murgatroid99
Copy link

You can't just build grpc from source on Windows. We screw around with header files when we build the binaries that we distribute, and we don't expect our users to do that. We do currently distribute binaries for Node 12, so that may be a download failure, but we don't distribute binaries for Node 14 so I wouldn't expect that one to work.

@bcoe
Copy link
Author

bcoe commented May 5, 2020

Talking with Michael, it sounds like this is something that will need to be fixed on the grpc end 👌

@bcoe bcoe closed this as completed May 5, 2020
@bcoe
Copy link
Author

bcoe commented May 5, 2020

Adding this link here for reference, there's a chance it's actually related to a Node regression:

nodejs/node#33254

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants