Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2019.4
2020.1
2020.2
2020.2.0b1
2021.1
Issue ID
1276238
Regression
No
Linux IL2CPP build fails while using Windows Editor when there are spaces in %USERPROFILE%
Reproduction steps:
1. Open a new or an existing project
2. Go to Edit > Project Settings... > Player > Other Settings and select the IL2CPP Scripting Backend
3. Import the Toolchain Win Linux x64 package
4. Build the project
Expected result: Build succeeds
Actual result: Build fails
Part of the error:
stdout:
Running il2cpp.exe in server GC mode.
Either unknown arguments were used or one or more assemblies could not be found :
PartOfName\AppData\Local\unity3d\cache\sysroots\windows-x86_64-linux-x86_64\llvm-9.0.0-1\bin\ld.lld -target x86_64-glibc2.17-linux-gnu
Reproducible with: 2019.4.17f1, 2020.1.17f1, 2020.2.2f1, 2021.1.0b1
Could not test with: 2018.4.30f1 (due to the option to build for Linux IL2CPP not being available on this version)
Notes:
- To import the Toolchain package, include this line in the manifest.json file within the project directory:
"com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.17-preview"
- Linux and macOS don't have the option to name the user profile folder with a space in the name, so the issue is not reproducible on those systems
Comments (4)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
F11B0T
Nov 07, 2025 13:56
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 (the path created before)
- Reboot computer.
Now try to build again and it should work!!
Hope this helps someone!
ouyanglinxin
Jun 26, 2024 11:40
2021.3.31f1 也遇见了
z0code0z
Feb 01, 2023 00:12
This is still an issue
mylastggeast
Oct 25, 2022 00:09
I still get this error. This is the environment:
- Unity 2021.3.11f1
- Windows11 with user folder with a white space between words like "ABC DEF"
- Toolchain Version 2.0.2