I am using 2019.3.0b9
The target platform for my project is Linux, but I usually build from a Windows machine. On Windows, only the Mono scripting backend is available for Linux. I wanted to try a build with IL2CPP, so I moved my project over to a machine running Ubuntu and tried to build it in the Linux Editor.
The first error I ran into was the build failing and an error message complaining about not being able to run il2cpp.exe because there was no file located at usr/bin/clang (I don’t have the exact text of the error because it seemed to be resolved by the following). I installed Clang, and this seemed to resolve the issue.
After this, builds now complete successfully. However, whereas on Windows successful completion of a build opens the folder where that build is located, when a build finishes on Linux it opens the audio player “Audacious” with an error “No files found”. There is still a “Build completed with a result of ‘Succeeded’” message in the Editor console.
When I go to run the executable that has been generated, I get a lot of flashing garbage accompanied by some of the assets in my game in incorrect positions.
I see several errors like the following in the Player log:
NullReferenceException: Object reference not set to an instance of an object.
at System.Linq.Expressions.Interpreter.LightLambda.MakeRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
at System.Linq.Expressions.Interpreter.LightLambda.GetRunDelegateCtor (System.Type delegateType) [0x00000] in <00000000000000000000000000000000>:0
at System.Linq.Expressions.Interpreter.LightDelegateCreator.CreateDelegate (System.Runtime.CompilerServices.IStrongBox[] closure) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Utilities.ExpressionReflectionDelegateFactory.CreateParameterizedConstructor (System.Reflection.MethodBase method) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateObjectContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at System.Func`2[T,TResult].Invoke (T arg) [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].GetOrAdd (TKey key, System.Func`2[T,TResult] valueFactory) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <00000000000000000000000000000000>:0
at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.GameObject:AddComponent()
What can I do to get a working executable from building on Ubuntu with IL2CPP?