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

Scons: UnicodeDecodeError when building with MSVC on Windows #90617

Closed
zaevi opened this issue Apr 13, 2024 · 3 comments · Fixed by #90626
Closed

Scons: UnicodeDecodeError when building with MSVC on Windows #90617

zaevi opened this issue Apr 13, 2024 · 3 comments · Fixed by #90626

Comments

@zaevi
Copy link
Contributor

zaevi commented Apr 13, 2024

Tested versions

System information

Win11, PowerShell on Windows Terminal

Python: 3.12.2, Scons: 4.7.0

Issue description

Seems silence_msvc is toggled on by default after #90551, and it throws errors when building:

$ scons p=windows target=editor module_mono_enabled=yes compiledb=yes debug_symbols=yes dev_build=yes
scons: Reading SConscript files ...
Auto-detected 16 CPU cores available for build parallelism. Using 15 cores by default. You can override it with the -j argument.
Found MSVC version 14.3, arch x86_64
Building for platform "windows", architecture "x86_64", target "editor".
NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).
Checking for C header file mntent.h... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
[ 79%] Linking Program bin\godot.windows.editor.dev.x86_64.mono.exe ...
[ 97%] Building compilation database compile_commands.json
[100%] progress_finish(["progress_finish"], [])
[100%] scons: *** [bin\godot.windows.editor.dev.x86_64.mono.exe] UnicodeDecodeError : 'utf-8' codec can't decode byte 0xd5 in position 2: invalid continuation byte       
Traceback (most recent call last):
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Taskmaster\__init__.py", line 246, in execute
    self.targets[0].build()
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Node\__init__.py", line 757, in build
    self.get_executor()(self, **kw)
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Executor.py", line 386, in __call__
    return _do_execute_map[self._do_execute](self, target, kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Executor.py", line 119, in execute_action_list
    status = act(*args, **kw)
             ^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Action.py", line 1349, in __call__
    return c.__call__(self, target, source, env, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Action.py", line 1280, in __call__
    return act(
           ^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Action.py", line 1521, in __call__
    stat = act(target, source, env, exitstatfunc, presub,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Action.py", line 724, in __call__
    stat = self.execute(target, source, env, executor=executor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\scoop\apps\scons\4.7.0\scons-local-4.7.0\SCons\Action.py", line 1102, in execute
    result = spawn(shell, escape, cmd_line[0], cmd_line, ENV)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\zaevi\source\Godot\godot-source\platform/windows\detect.py", line 417, in spawn_capture
    sys.stderr.write("".join(tmp_stdout.readlines()[1:]))
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 2: invalid continuation byte
scons: building terminated because of errors.
[Time elapsed: 00:00:13.568]

It's ok when building with silence_msvc=no.

Steps to reproduce

N/A

Minimal reproduction project (MRP)

N/A

@akien-mga
Copy link
Member

CC @Repiteo

@akien-mga
Copy link
Member

@zaevi What's your Python version?

@zaevi
Copy link
Contributor Author

zaevi commented Apr 13, 2024

@zaevi What's your Python version?

$ python
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants