Compiled protoc.exe depends on debug DLL
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 716
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 10
Description
### Problem description
On Windows, in an NPM project dependent on `grpc-tools@1.12.3`, the installed `protoc.exe` is dependent on the debug version of a DLL that isn't available in the normal redistributable package from Microsoft.
```
$ ls /c/Windows/System32/*.dll | grep vcruntime
/c/Windows/System32/vcruntime140.dll*
/c/Windows/System32/vcruntime140_1.dll*
/c/Windows/System32/vcruntime140d.dll*
$ ldd node_modules/grpc-tools/bin/protoc.exe
ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffa8f4d0000)
KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffa8c9b0000)
KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffa8b910000)
VCRUNTIME140D.dll => /c/Windows/SYSTEM32/VCRUNTIME140D.dll (0x7ffa7ab00000)
MSVCP140D.dll => /c/Windows/SYSTEM32/MSVCP140D.dll (0x7ffa6d770000)
ucrtbased.dll => /c/Windows/SYSTEM32/ucrtbased.dll (0x7ffa65630000)
ucrtbased.dll => /c/Windows/System32/ucrtbased.dll (0x261b7e80000)
ucrtbased.dll => /c/Windows/System32/ucrtbased.dll (0x261b7e80000)
VCRUNTIME140_1D.dll => not found
```
Running `protoc.exe` results in `3221225781` as the exit code.
### Reproduction steps
`npm install --save-dev grpc-tools` in an NPM project on Windows then `npx grpc_tools_node_protoc`.
### Environment
- Windows Server 2019 x64
- Node v16.17.1
- nvm
- compiler n/a
- grpc-tools@1.12.3
### Additional context
Downloading a copy of `VCRUNTIME140_1D.dll` from another machine with the dev tools installed resolves the issue.
Can the binary be built to depend on the non-debug version of the DLL?
Contributor guide
Assessment
This issue has not been assessed yet.