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

Emscripten Linking Error on Windows #8

Closed
RottenBlock opened this issue Mar 10, 2021 · 2 comments
Closed

Emscripten Linking Error on Windows #8

RottenBlock opened this issue Mar 10, 2021 · 2 comments

Comments

@RottenBlock
Copy link

RottenBlock commented Mar 10, 2021

When trying to build system3-sdl2 with Emscripten on an English Windows 10, I suffer an error during the step "Linking CXX executable system3.js." I'm using unmodified code from the repo, and I've tried reinstalling emscripten, system3-sdl2, and even python a few times, without any luck. Using emscripten on Linux works fine, the problem seems exclusive to Windows. Here's the traceback:

Traceback (most recent call last):
File "C:\emsdk\upstream\emscripten\em++.py", line 14, in
sys.exit(emcc.run(sys.argv))
File "C:\emsdk\upstream\emscripten\emcc.py", line 2150, in run
post_link(options, wasm_target, wasm_target, target)
File "C:\emsdk\upstream\emscripten\emcc.py", line 2179, in post_link
emscripten.run(in_wasm, wasm_target, final_js, memfile)
File "C:\emsdk\upstream\emscripten\emscripten.py", line 845, in run
emscript(in_wasm, out_wasm, outfile_js, memfile, shared.DEBUG)
File "C:\emsdk\upstream\emscripten\emscripten.py", line 283, in emscript
metadata = finalize_wasm(in_wasm, out_wasm, memfile, DEBUG)
File "C:\emsdk\upstream\emscripten\emscripten.py", line 437, in finalize_wasm
stdout=subprocess.PIPE)
File "C:\emsdk\upstream\emscripten\tools\building.py", line 1618, in run_binaryen_command
ret = check_call(cmd, stdout=stdout).stdout
File "C:\emsdk\upstream\emscripten\tools\shared.py", line 105, in check_call
return run_process(cmd, *args, **kw)
File "C:\emsdk\upstream\emscripten\tools\shared.py", line 95, 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 474, in run
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 926, in communicate
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 95: character maps to
make[2]: *** [CMakeFiles\system3.dir\build.make:538: system3.js] Error 1
make[1]: *** [CMakeFiles\Makefile2:114: CMakeFiles/system3.dir/all] Error 2
make: *** [Makefile:102: all] Error 2

Any ideas?

@kichikuou
Copy link
Owner

Looks similar to emscripten-core/emscripten#10551.
Maybe try the workaround (setting environment variable) described there?

@RottenBlock
Copy link
Author

Good, looks like setting PYTHONUTF8 to 1 does it for me!

This issue was closed.
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

2 participants