You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delete the .emscripten file in C:\users\yourusername\ to simulate a 'first run' scenario.
Make sure that cygwin bin\ is in path, and that the 'which' tool is installed in cygwin (by default, it is)
run 'python emcc --help' to generate the .emscripten file.
Try running any of the tests or compiling any file with emscripten.
The result is
Running Emscripten tests...
warning: cannot check node version: [Error 3] The system cannot find the path specified
(Emscripten: Running sanity checks)
Checking JS engine /cygdrive/c/Program Files/nodejs/node failed. Check ~/.emscripten. Details: [Error 3] The system cannot find the path specified
FATAL: The JavaScript shell used for compiling (/cygdrive/c/Program Files/nodejs/node) does not seem to work, check the paths in ~/.emscripten
The result is that in .emscripten, the path to node is found using the 'which' tool inside cygwin, which generates something like
NODE = /cygdrive/c/Program Files/nodejs/node
However, when actually invoking node, the invocation is not done through cygwin, and calling '/cygdrive/c/Program Files/nodejs/node' is an invalid Windows path name and therefore fails.
There are some ways to fix this, I'm not sure which is the best at the moment:
Node lookup would always be done by assuming that node.exe is in PATH, and just always setting 'NODE=node' in .emscripten. Immediately, I can't spot a problem here, except than requiring the extra configuration from users to add node to PATH.
The lookup of node and the invocation of node is synchronized to always occur outside cygwin. This requires that the output of 'which' is routed through the cygpath tool to translate the cygwin path to a windows path. The usage is as follows:
The output of cygpath would then get stored in .emscripten
The lookup of node and the invocation of node is synchronized to always occur inside cygwin. I'm not sure what this really entails, but I think it would require all calls to node throughout the emscripten codebase to first spawn a shell with 'sh' or similar, and have that shell execute node instead.
Option 3 sounds like a lot of work. I'd like emscripten to not require cygwin at all, so doesn't seem an interesting choice. Option #2 can be a bit odd actually, since doesn't 'which' just look through PATH for the path to the program? In that case, node must already be in path, and option 1 suffices.
Btw, does emscripten use 'which' in other parts of the codebase? In that case, I think each invocation of the command located by 'which' will break Windows, unless it explicitly does option 2 or 3.
The text was updated successfully, but these errors were encountered:
As a workaround, to generate valid functional NODE= line in .emscripten after installing cygwin, I renamed cygwin\bin\which.exe to cygwin\bin\which_unused.exe which causes emscripten not to find it, and it falls back to just writing the line 'NODE=node' into .emscripten.
This issue has been automatically marked as stale because there has been no activity in the past 2 years. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
The result is
Running Emscripten tests...
warning: cannot check node version: [Error 3] The system cannot find the path specified
(Emscripten: Running sanity checks)
Checking JS engine /cygdrive/c/Program Files/nodejs/node failed. Check ~/.emscripten. Details: [Error 3] The system cannot find the path specified
FATAL: The JavaScript shell used for compiling (/cygdrive/c/Program Files/nodejs/node) does not seem to work, check the paths in ~/.emscripten
The result is that in .emscripten, the path to node is found using the 'which' tool inside cygwin, which generates something like
NODE = /cygdrive/c/Program Files/nodejs/node
However, when actually invoking node, the invocation is not done through cygwin, and calling '/cygdrive/c/Program Files/nodejs/node' is an invalid Windows path name and therefore fails.
There are some ways to fix this, I'm not sure which is the best at the moment:
C:\Users\clb>cygpath -w "/cygdrive/c/Program Files/nodejs/node"
C:\Program Files\nodejs\node
The output of cygpath would then get stored in .emscripten
Option 3 sounds like a lot of work. I'd like emscripten to not require cygwin at all, so doesn't seem an interesting choice. Option #2 can be a bit odd actually, since doesn't 'which' just look through PATH for the path to the program? In that case, node must already be in path, and option 1 suffices.
Btw, does emscripten use 'which' in other parts of the codebase? In that case, I think each invocation of the command located by 'which' will break Windows, unless it explicitly does option 2 or 3.
The text was updated successfully, but these errors were encountered: