Skip to content

Failed to compile flutter engine on Windows when Python path contains space #143740

@CodeVisio

Description

@CodeVisio

Steps to reproduce

I make it short.
I followed the instructions to build flutter engine without success. I got always errors like

...
ninja: fatal: CreateProcess: %1 is not a valid Win32 application.

and alike.

Then I changed all paths inside

.\build\toolchain\win\BUILD.gn

For example

tool("copy") {
command = "$python_path $tool_wrapper_path recursive-mirror {{source}} {{output}}"
description = "COPY {{source}} {{output}}"
}

into

tool("copy") {
command = ""$python_path" $tool_wrapper_path recursive-mirror {{source}} {{output}}"
description = "COPY {{source}} {{output}}"
}

That because my user name on windows 10 is Name[space]Surname.

Changed that, I could continue the compilation but it didn't success.

Again I got erros like

[0/7379] ACTION //flutter/sky/packages/sky_engine:copy_dart_ui_web(//build/toolchain/win:clang_x64)
...
ninja: fatal: CreateProcess: %1 is not a valid Win32 application.

Unfortunately I couldn't find where those files/commands for ACTION are generated.
toolchain.ninja and build.ninja are recreated every time.

So my questions:

  1. How could I fix the errors?
  2. Where can I find help on building flutter engine on windows?

I tried on discord but got no answers.

Thanks

Expected results

Pls see above

Actual results

Pls see above

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktope: local-engine-developmentLocal builds of the engine working betterengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions