Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X

Duplicate in 2021.3.X

Votes

1

Found in

2019.4

2020.3

2020.3.8f1

2021.1

2021.2

2022.1

Issue ID

1336012

Regression

No

[Linux] [IL2CPP] Building for Linux with IL2CPP from Windows fails if your system username contains a space

Linux

-

How to reproduce:
1. Create a new Windows user with a name containing a space
2. Create a new Unity project
3. Select IL2CPP as the scripting backend (Edit > Project Settings > Player)
4. Select Linux as the target platform (File > Build Settings)
5. Click Build

Expected result: The project builds successfully
Actual result: The project build fails with Unity.IL2CPP.Building.BuilderFailedException

Reproducible with: 2019.4.28f1, 2020.3.13f1, 2021.1.14f1, 2021.2.0b2, 2022.1.0a1
Could not test with: 2018.4.34f1 (no Linux IL2CPP module)

  1. Resolution Note (fix version 2022.2):

    Fixed in version 2022.2.0a10

  2. Resolution Note (fix version 2021.1):

    Fixed in version 2021.1.26f1

  3. Resolution Note (fix version 2020.3):

    Fixed in version 2020.3.21f1

  4. Resolution Note (fix version 2019.4):

    Fixed in version 2019.4.33f1

Comments (3)

  1. F11B0T

    Nov 07, 2025 13:49

    Found a workaround!!

    Basically just change the linux toolchain directory (by using an Environment Variable):

    - Create a new folder to have the toolchain files (I used "C:\UnitySysroots")
    - Go to "/AppData/Local/unity3d/cache/sysroots/" and move those 2 folders into the new one.
    - On "Unity Project Settings > Toolchain Management" disable this option: "Install toolchain packages automatically"

    - Win + R, type "sysdm.cpl"
    - "Advanced tab" + click "Environment Variables"
    - On "User variables" and "System variables" (I did both just to be safe) click "New":
    - Variable name: UNITY_SYSROOT_CACHE
    - Variable value: C:\UnitySysroots (or some other path *without spaces*)
    - Reboot computer.

    Now try to build again and it should work!!

    Hope this helps someone!

  2. F11B0T

    Nov 06, 2025 14:59

    Not fixed on Unity 2021.3.36f1

  3. z0code0z

    Feb 01, 2023 00:13

    This is still an issue in 2021.3.16f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.