emscripten-core / emscripten-core/emscripten
building.py uses bogus python paths on MSYS2
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
When running emconfigure it seems a bogus python path is referenced by the emconfigure script.
Error message:
```
configure: ./configure
Traceback (most recent call last):
File "c:\emsdk\upstream\emscripten\\emconfigure.py", line 52, in
sys.exit(run())
File "c:\emsdk\upstream\emscripten\\emconfigure.py", line 45, in run
building.configure(sys.argv[1:])
File "c:\emsdk\upstream\emscripten\tools\building.py", line 339, in configure
run_process(args, stdout=stdout, stderr=stderr, env=env, **kwargs)
File "c:\emsdk\upstream\emscripten\tools\shared.py", line 205, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 472, in run
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 775, in __init__
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1178, in _execute_child
OSError: [WinError 193] %1 is not a valid Win32 application
```
My environment uses emsdk 2.0.5 with the following in .emscripten:
```
import os
emsdk_path = os.path.dirname(os.environ.get('EM_CONFIG')).replace('\\', '/')
NODE_JS = emsdk_path + '/node/12.18.1_64bit/bin/node.exe'
PYTHON = emsdk_path + '/python/3.7.4-pywin32_64bit/python.exe'
JAVA = emsdk_path + '/java/8.152_64bit/bin/java.exe'
LLVM_ROOT = emsdk_path + '/upstream/bin'
BINARYEN_ROOT = emsdk_path + '/upstream'
EMSCRIPTEN_ROOT = emsdk_path + '/upstream/emscripten'
TEMP_DIR = emsdk_path + '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
```
Contributor guide
Assessment
This issue has not been assessed yet.