google / closure-compiler-npm

Package for managing and documenting closure-compiler for use via npm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Windows native version failing to dynamic-link Visual C++ runtime

alexeagle opened this issue · comments

On latest release

npm install google-closure-compiler@20190729.0.0

And Windows Server 2019 Datacenter with "Visual C++ Redistributable for Visual Studio 2015" https://www.microsoft.com/en-us/download/details.aspx?id=48145 installed

I run
C:\Users\alexeagle\Documents\GitHub\rules_nodejs\examples\closure\node_modules\google-closure-compiler-windows\compiler.exe
and get a dialog box

compiler.exe - System Error

The code execution cannot proceed because MSVCR100.dll was not found. Reinstalling the program may fix this problem.

(Context: trying to run the native compiler under Bazel in https://buildkite.com/bazel/rules-nodejs-nodejs/builds/4305#777ee3aa-7f0d-4818-90d9-96ca83779219 to potentially replace rules_closure - failing with


ERROR: D:/temp/tmp-52248vvrcg1gbh15/BUILD.bazel:4:1: Action bundle.js failed (Exit 127)
--
 D:/b/lase2atr/execroot/build_bazel_rules_nodejs/_tmp/1a4d26eef7adf17cc291ee0f25ebc0ad/_bazel_b/uskdt36o/external/nodejs_windows_amd64/bin/nodejs/node.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

)

What version of the VC++ dll was the windows native binary tested against? @meteorcloudy says it looks like it's the 2010 version which we shouldn't make users install if they have the more modern one already

I think we're at the mercy of what is available to us within the Travis CI build infrastructure, because I believe that's where all of the binaries get built as part of the release and deployment process.

https://github.com/google/closure-compiler-npm/blob/master/deployments.md

@ChadKillingsworth can you help with this? Thanks

Let me go see if I can figure this out. We are at the mercy of the GRAAL project for this and I seem to remember them requiring the Window 7 SDK. Here's the appveyor config which builds the windows GRAAL image: https://github.com/google/closure-compiler-npm/blob/master/appveyor.yml#L3

That config says Visual Studio 2015 which ought to match the current redistributable that I've installed? But https://www.appveyor.com/docs/windows-images-software/ says that there are two newer VS versions you could select.

When I worked on the windows native image, it would not build on newer SDKs. I actually couldn't use Travis to build these because I could not figure out how to get an SDK that old installed.

There was an issue on the GRAAL issue tracker that specifically said Windows 7 SDK. That was the only one that successfully built.

Do you have a reference to the graal issue?

We are running into the same issue in emscripten: emscripten-core/emscripten#10328

Perhaps you can ship the MSVCR100.dll alongside the executable?

oracle/graal#1762 seems related too

Unclear if #174 will resolve this issue.

I don't expect #174 to fix this. We'll need to build on a newer windows SDK version and that requires Java 11 support for the build - which breaks GWT.

I was hopeful that #185 would address this, but based on oracle/graal#1762 that seems unlikely. It should be easier to address now that we're building on a modern SDK for windows though.

I don't see any action that this project could take to address the issue at this time. The root problem must be addressed by Graal directly. I'm closing this until there is actual action we could take.