Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Could not find a valid clang executable at clang

Discussion in 'Editor & General Support' started by Kettle3D, Sep 16, 2020.

  1. Kettle3D

    Kettle3D

    Joined:
    Jun 2, 2020
    Posts:
    2
    Hello,

    I'm having problems with Unity when building on Linux, meaning I can't compile my game.

    The issue I'm having is that I changed the scripting backend to il2cpp (Mono was dysfunctionally slow), but it can't build because of an error. The log message I'm getting is this:
    Code (CSharp):
    1. Failed running /home/kettle/Unity/Hub/Editor/2019.3.15f1/Editor/Data/il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Linux" --architecture="x64" --configuration="Release" --outputpath="/home/kettle/Programming/Kettle3D.dev/Kettle3D/game/Temp/StagingArea/Data/Native/GameAssembly.so" --cachedirectory="/home/kettle/Programming/Kettle3D.dev/Kettle3D/game/Assets/../Library/il2cpp_cache" --profiler-report --map-file-parser="/home/kettle/Unity/Hub/Editor/2019.3.15f1/Editor/Data/Tools/MapFileParser/MapFileParser" --directory="/home/kettle/Programming/Kettle3D.dev/Kettle3D/game/Temp/StagingArea/Data/Managed" --generatedcppdir="/home/kettle/Programming/Kettle3D.dev/Kettle3D/game/Temp/StagingArea/Data/il2cppOutput"
    2.  
    3. stdout:
    4. il2cpp.exe didn't catch exception: System.InvalidOperationException: C++ code builder is unable to build C++ code for Linux: Could not find valid clang executable at clang
    5.  at Unity.IL2CPP.Building.CppProgramBuilder.ThrowIfCannotBuildInCurrentEnvironment () [0x00051] in <248b4a691c5d4e1b965d90f17ea422c0>:0
    6.  at Unity.IL2CPP.Building.CppProgramBuilder.Build (Unity.IL2CPP.Building.Statistics.IBuildStatistics& statistics) [0x00001] in <248b4a691c5d4e1b965d90f17ea422c0>:0
    7.  at Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner (Unity.IL2CPP.Building.CppProgramBuilder builder, Unity.IL2CPP.Building.Statistics.IBuildStatistics& statistics) [0x00001] in <248b4a691c5d4e1b965d90f17ea422c0>:0
    8.  at il2cpp.Program.DoRun (System.String[] args, System.Collections.Generic.List`1[T] foundAssemblies) [0x005bc] in <3d7b04f5e89e4d189194b279bc8abf31>:0
    9.  at il2cpp.Program.Run (System.String[] args, System.Boolean setInvariantCulture) [0x00042] in <3d7b04f5e89e4d189194b279bc8abf31>:0
    10.  at il2cpp.Program.Main (System.String[] args) [0x00002] in <3d7b04f5e89e4d189194b279bc8abf31>:0
    I've seen other threads that have similar errors with this, but none of the solutions work.

    The first solution I got:
    Yes, I've done that.

    The next solution:
    Yes, it is.

    I'm not sure why Unity can't find clang, but it's in plain sight.

    I'm running a fresh installation of Linux Mint (20 Cinnamon) on an AMD A6 64-bit.
     
  2. OneSketchyGuy

    OneSketchyGuy

    Joined:
    Oct 27, 2016
    Posts:
    14
    My unity found my clang installation, but now it says that it has no input files... Building on Linux is kind of a nightmare huh?