- Home /
Unity 5.6 iOs-Build Bug? Unable to create iOs Build with IL2CPP result in empty build folder
Hello Guys,
so I switched to Unity 5.6, building for Android works fine. But since the Update I'm getting this error on building for iOs devices:
Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b true -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/preserved_derived_types.xml" -d "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed" -a "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"
stdout:
SweepReport:
Mono.Cecil.MethodDefinition (10218) => System.Void .ctor(System.String,System.Object[]), System.Void CallStatic(System.String,System.Object[]), FieldType Get(System.String), System.Void Set(System.String,FieldType), FieldType GetStatic(System.String), ...
Mono.Cecil.TypeDefinition (2120) => UnityEngine.WeakListenerBindings, UnityEngine.NetworkReachability, UnityEngine.UserAuthorization, UnityEngine.ApplicationInstallMode, UnityEngine.ApplicationSandboxType, ...
Mono.Cecil.FieldDefinition (739) => AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback, UnityEngine.Application/LogCallback modreq(System.Runtime.CompilerServices.IsVolatile) s_RegisterLogCallbackDeprecated, System.String unsupportedIdentifier, System.Byte kIsVisibleMask, System.Byte kDistanceMask, ...
Fatal error in Mono CIL Linker
System.IO.IOException: Sharing violation on path /Volumes/Elements/UnityProjekte/BlocktapVersions/BlockTap-128/Temp/StagingArea/Data/Managed/tempStrip/UnityEngine.dll.mdb
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <5d83a8d54e334cdc853a0dba68082096>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <5d83a8d54e334cdc853a0dba68082096>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <5d83a8d54e334cdc853a0dba68082096>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (System.Guid guid) [0x0004a] in <0cbcfecdac344780973531df0acacf83>:0
at Mono.Cecil.Mdb.MdbWriter.Dispose () [0x00000] in <0cbcfecdac344780973531df0acacf83>:0
at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000fd] in <0304696c64424476882bed0a697f98eb>:0
at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <0304696c64424476882bed0a697f98eb>:0
at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <0304696c64424476882bed0a697f98eb>:0
at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x0004d] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00031] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00019] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Driver.Run (System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x003e2] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00002] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
stderr:
UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.HostView:OnGUI()
Exception: /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:768)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:586)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:546)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()
When I create the build with Mono2x and Stripped ByteCode Xcode can't Install project due to Apple Mach-O linker error.
Any idea what the problem is?
Thanks
Hey,
i found a solution for this. I went back to Unity 5.5.3 and created a new project with exact same attributes as my the project with the current problem. I copied the asset folder and inserted it. Depending on the size of your project this can take a while. I linked the project to the old one in Unity Services and imported the IAP again. After all this the build was successfull, tho its is very time consu$$anonymous$$g.
$$anonymous$$e too! I Unity 5.5.0f3 was O$$anonymous$$. After upgrade to 5.6 it wouldn't build to iOS.
Answer by Javaisland · May 03, 2017 at 08:43 AM
Hey,
to explain my solution, its a bit unconvetional but worked fine for me. I just went back to Unity 5.5.3 created a new porject with the same attributes as my own and copied the assets folder. It can take a while to set all settings back but I had no time to try finding other solutions. After all that it worked again for me. For now I dont use any of the new functions of Unity 5.6 so I will be okay.
Answer by viktouille · Aug 28, 2017 at 08:23 PM
Hi,
I'm running the same problem as you, and your solution didn't worked to me... So it will be great if you could help me :D
Thanks in advance,
Victor
Answer by dreamlistic · Aug 29, 2017 at 12:12 AM
The above suggestions are correct. Except I didn't even have to rollback to version 5.5.3. Just create a new project and copy your assets over. ( BTW I'm using 5.6.1f1 ).
I contacted unity support and was told this is due to some file corruption in the Unity's project files. They suggested the same solution and it worked for me.