Search Issue Tracker
Fixed
Votes
13
Found in
2022.2.0b12
2023.1.0b11
Issue ID
UUM-18303
Regression
No
[Linux] Build fails with "clang not found" errors when building an IL2CPP Android project with ARMv7 and ARM64 Target Architectures
Reproduction steps:
1. Create a new Android 3D project
2. Click File > Build Settings > Add Open Scenes
3. In Build Settings window, click Player Settings
4. Under Other Settings, change Scripting Backend to IL2CPP
5. Under Other Settings, select “ARMv7” and “ARM64” Target Architectures
6. Click File > Build Settings > Build
Expected result: The project is built successfully
Actual result: Build fails with multiple “…bin/clang++: 1: clang: not found” errors
Reproducible with: 2022.2.0b1, 2022.2.0b12
Not reproducible with: 2022.2.0b13, 2023.1.0a17
Couldn’t test with: 2020.3.41f1, 2021.3.12f1, 2022.1.21f1, 2022.2.0a1 (Couldn’t build because of “Gradle build failed” error), 2022.2.0a19 (Couldn’t build because Android SDK Build-tools component is not found)
Reproducible on: Ubuntu 20.04.5
Not reproducible on: Windows 11 Pro 21H2
---------------
A similar issue reported by Google
I'm testing out some Unity Android builds and running into build errors with an empty project on IL2CPP. I'm trying to build using the Unity Editor on Linux (Debian). Builds succeed when I switch to Mono. IL2CPP Android builds fail on Unity 2022.2.14f1 and 2023.1.0b11, but succeed on 2021.3.22f1. These are about 100 errors in the console similar to this:
{quote}{color:#0747a6}Building Library/Bee/artifacts/Android/x6ly2/q45r_osix2.lump.o failed with output: clang: error: no input files {color}
{color:#0747a6}UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /home/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189){color}
{quote}
I also run into similar issues with slightly different errors trying to export the project instead of building.
-
CrandellWS
Jan 28, 2024 22:25
I had same issue and looked at things based on @PUZZLEPAINT comments and well I saw the samething text files where what should be a symbolic link.
for my Linux system to compile Android App with Unity I had to fix those links but once done it all worked.
-
vandebop
Sep 05, 2023 05:01
cd Unity/Hub/Editor/2022.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin
for i in `wc -l * | grep " 0 " | tr -s " " | cut -f 3 -d " "`; do ln -sf `cat $i` $i; done
-
afshin_a_1
Jul 17, 2023 08:26
please come and vote in here, as mentioned unity above:
https://issuetracker.unity3d.com/product/unity/issues/guid/HUBX-912 -
afshin_a_1
Jul 17, 2023 08:10
note that this issue isn't resolved !!!
i also have this issue using unity 2022.3.x latest version on ubuntu latest LTS.
what is ndk version for unity 2022.3? it's not mentioned here:
https://docs.unity3d.com/Manual/android-sdksetup.html
if it's r23b, then r23b isn't here to download:
https://github.com/android/ndk/wiki/Unsupported-Downloads
what should we do?last but not least unity should care more about linux, because many developers prefer to use Linux instead of Windows.. nowdays even amateur users are using linux thanks to ubuntu and it's community is going bigger and bigger.
-
Tomas1856
May 08, 2023 09:01
If you're hit by this issue, download the necessary NDK and manually extract it, and tell Unity to use your custom NDK location, this should solve this issue.
-
puzzlepaint
May 04, 2023 00:49
I had the same issue "…bin/clang++: 1: clang: not found" with Unity 2022.2.17 and Ubuntu 22.04.2. It seems that the only problem is that some files that are supposed to be symbolic links are instead text files, containing the name of the link target. After manually fixing some of the files, I was able to build my app successfully:
cd /home/<username>/Unity/Hub/Editor/2022.2.17f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/
mv clang clang_old
mv clang++ clang++_old
mv ld.lld ld.lld_old
mv ld64.lld ld64.lld_old
mv lld-link lld-link_old
mv llvm-strip llvm-strip_oldln -s clang-12 clang
ln -s clang clang++
ln -s lld ld.lld
ln -s lld ld64.lld
ln -s lld lld-link
ln -s llvm-objcopy llvm-stripThis only fixes a subset of the broken files, so you may have to fix more of them in case your build tries to use more of them.
-
srodrigodev
Mar 31, 2023 10:48
Having the same issue with 2022.2.12f1.
Com'on guys...
-
beomsik
Mar 19, 2023 01:53
I'm having the same issue with 2022.2.11f1 on Ubuntu 20.04.5
It works fine with 2021 and I noticed that clang files in 2021 are binary while 2022's files looks like a text file or alias to clang++/clang-12?
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
- Crash on EditorApplication:Internal_CallUpdateFunctions when pushing property block by index to SpriteShapeRenderer
- Depth Texture Mode "After Opaques" breaks when "Full Screen Pass Renderer Feature" is added
- The Code Previews panel is initially opened in a slightly minimized state
- Dropdown search icon is used next to the UI Builders Library search when the search has no dropdown functionality
- UI Builders library selection buttons tooltips are not in accordance with the Editors foundations
Resolution Note:
Fixed by another internal issue: HUBX-912: [Linux] Build fails with "clang not found" errors when building an IL2CPP Android project with ARMv7 and ARM64 Target Architectures