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

Build Failure with UnicodeDecodeError #19009

Closed
DoneListen opened this issue Mar 20, 2023 · 2 comments
Closed

Build Failure with UnicodeDecodeError #19009

DoneListen opened this issue Mar 20, 2023 · 2 comments

Comments

@DoneListen
Copy link

DoneListen commented Mar 20, 2023

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.0 (8e1e305519e1027726a48861a1fec5662f7e18a2)
clang version 14.0.0 (https://github.com/llvm/llvm-project 1a929525e86a20d0b3455a400d0dbed40b325a13)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: D:\SvnCode\emsdk-main\upstream\bin

We used the -s MAIN MODULE compilation parameter and A compilation error has occurred:

Traceback (most recent call last):
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emcc.py", line 3915, in <module>
     sys.exit(main(sys.argv))
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emcc.py", line 3908, in main
     ret = run(args)
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emcc.py", line 1148, in run
     phase_post_link(options, state, wasm_target, wasm_target, target)
   File "contextlib.py", line 79, in inner
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emcc.py", line 2665, in phase_post_link
     phase_emscript(options, in_wasm, wasm_target, memfile)
   File "contextlib.py", line 79, in inner
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emcc.py", line 2693, in phase_emscript
     emscripten.run(in_wasm, wasm_target, final_js, memfile)
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emscripten.py", line 854, in run
     emscript(in_wasm, out_wasm, outfile_js, memfile, shared.DEBUG)
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emscripten.py", line 323, in emscript
     glue, forwarded_data = compile_settings()
   File "D:\SvnCode\emsdk-main\upstream\emscripten\emscripten.py", line 184, in compile_settings
     out = shared.run_js_tool(path_from_root('src/compiler.js'),
   File "D:\SvnCode\emsdk-main\upstream\emscripten\tools\shared.py", line 234, in run_js_tool
     return check_call(command, **kw).stdout
   File "D:\SvnCode\emsdk-main\upstream\emscripten\tools\shared.py", line 220, in check_call
     return run_process(cmd, *args, **kw)
   File "D:\SvnCode\emsdk-main\upstream\emscripten\tools\shared.py", line 105, in run_process
     ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
   File "subprocess.py", line 507, in run
   File "subprocess.py", line 1121, in communicate
 UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 2920860: illegal multibyte sequence

It compiles normally until this MAIN MODULE parameter is used.

@sbc100
Copy link
Collaborator

sbc100 commented Mar 20, 2023

This looks like it should have been fixed in #16736, which itself looks like it made it into the 3.1.14 release.

Can you try with a more recent version of emsdk? The current version is 3.1.34.

@DoneListen
Copy link
Author

This looks like it should have been fixed in #16736, which itself looks like it made it into the 3.1.14 release.

Can you try with a more recent version of emsdk? The current version is 3.1.34.

I set the environment variable "PYTHONUTF8" to 1 temporarily,compiling my project has succeeded.I'll use the latest version later. thanks a lot.

@sbc100 sbc100 closed this as completed Mar 21, 2023
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