Skip to content

Bootstrap Script Error on Windows #152482

@ban-xiu

Description

@ban-xiu

I have tried this code on the main branch.:

python x.py build --stage 1

I expected to see this happen: Successful execution.

Instead, this happened: Exception occurred.

Environment

Windows 11 Chinese Edition

I think this is an encoding conflict caused by the Windows system's GBK codec being unable to read the UTF-8 formatted Rust configuration file.

Backtrace

Traceback (most recent call last):
  File "D:\RustroverProjects\rust\x.py", line 53, in <module>
    bootstrap.main()
    ~~~~~~~~~~~~~~^^
  File "D:\RustroverProjects\rust\src\bootstrap\bootstrap.py", line 1410, in main
    bootstrap(args)
    ~~~~~~~~~^^^^^^
  File "D:\RustroverProjects\rust\src\bootstrap\bootstrap.py", line 1320, in bootstrap
    config_toml = config.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 8891: illegal multibyte sequence

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-PythonArea: Python, like bootstrap/CI scripts or linters/formatters, etc.C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions