Search Unity

ios build error on macos "UnityLinker.exe did not run properly!"

Discussion in 'Editor & General Support' started by lefermier, Aug 2, 2017.

  1. lefermier

    lefermier

    Joined:
    Aug 2, 2017
    Posts:
    2
    Hello,

    Since Unity 2017 release and beta, i cannot build to ios.

    I got this exceptions :

    Failed running /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe --api=NET_2_0_Subset -out="/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/tempStrip" -l=none -c=link --link-symbols -x="/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f="/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/UnityEngine.xml" -x "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/AI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/AR.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Accessibility.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Animation.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Audio.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Cloth.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/CrashReporting.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Director.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/GameCenter.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Grid.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/IMGUI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ImageConversion.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Input.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/JSONSerialize.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ParticleSystem.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ParticlesLegacy.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/PerformanceReporting.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Physics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Physics2D.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/ScreenCapture.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/SpriteMask.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/StyleSheets.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Terrain.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/TerrainPhysics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/TextRendering.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Tilemap.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UI.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UIElements.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UNET.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityAnalytics.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityConnect.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequest.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequestAudio.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequestTexture.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequestWWW.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/VR.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Vehicles.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Video.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Web.xml" -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Wind.xml" -x "/Users/xxxx/Documents/unityClient/2_QuattroClient/Assets/Quattro/-RenderTests/link.xml" -d "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed" -a "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a "/Users/xxxx/Documents/unityClient/2_QuattroClient/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"

    stdout:
    Fatal error in Unity CIL Linker
    Mono.Cecil.ResolutionException: Failed to resolve System.CodeDom.Compiler.TempFileCollection
    at UnityLinker.AddUnresolvedStubsStep.Process () [0x000b2] in <45d6c350b6254bd09f03f35ad7e3bea6>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00018] in <09bca01fd71241c7a07af8c71eb6ae1a>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00020] in <09bca01fd71241c7a07af8c71eb6ae1a>:0
    at UnityLinker.UnityDriver.Run () [0x00086] in <45d6c350b6254bd09f03f35ad7e3bea6>:0
    at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in <45d6c350b6254bd09f03f35ad7e3bea6>:0
    at UnityLinker.UnityDriver.RunDriver () [0x00002] in <45d6c350b6254bd09f03f35ad7e3bea6>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114)
    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)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    And then i got :

    Exception: /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe did not run properly!
    UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:130)
    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:73)
    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:89)
    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:82)
    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:204)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114)
    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:730)
    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:593)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:552)
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:37)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:271)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    It looks like you project might have the Api Compatibility Level (in the Player Settings) set to a value of ".NET 2.0 Subset". However, one of the assemblies in the project is using the System.CodeDom.Compiler.TempFileCollection type, which is not in the .NET 2.0 Subset profile.

    Try changing the Api Compatibility Level value to ".NET 2.0" instead. That might fix this issue.
     
    lefermier likes this.
  3. lefermier

    lefermier

    Joined:
    Aug 2, 2017
    Posts:
    2
    Hey,

    Yup, and the xcode project need to be delete and recreate too.

    Thanks
     
  4. viktouille

    viktouille

    Joined:
    Jul 19, 2017
    Posts:
    9
    Hi,

    It didn't worked for me..

    Do you have any ideas? What do you do with xcode?
     
  5. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    97
    Installed patch 2017.2.0p2 and it's still happening!

    With 2017.2.0p1 I could just change the directory name but now is not fixing the issue :(

    Edit: After a few test disabling/enabling Unity IAP, update Unity IAP, change directory etc now is working on that project and others too... so no idea what was happening.
     
    Last edited: Nov 15, 2017
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    Does this happen to be a FAT32 file system, like a USB thumb drive? We had a bug on FAT32 only that looks similar to this.
     
  7. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    Are you seeing the same error as @viktouille reported? Or is this a different issue?
     
  8. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    97
    It was the second error @lefermier reported. "Exception: /Applications/Unity/Unity.app/Contents/il2cpp/build/UnityLinker.exe did not run properly!"

    The first time I tried just changing the project folder as suggested here (https://answers.unity.com/questions/1394481/ios-build-error-after-update-to-201710f3.html), and then disabling/enabling and updating unity IAP as suggested here (https://forum.unity.com/threads/unity2017-2-build-error-unitylinker-exe-did-not-run-properly.485006/) and it worked.
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    Hmm, maybe something is wrong with IAP and code stripping. Can you submit a bug report for this issue? It is something which should work properly.
     
  10. viktouille

    viktouille

    Joined:
    Jul 19, 2017
    Posts:
    9
    I'm on Exfat, does it changes something?
     
  11. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    I've not tried Exfat, but it sounds similar enough to FAT32 that it might be subject to the same bug. Let me know if you are still hitting this issue. If so, I'll track down the original bug report and determine when it will land in a patch release.
     
  12. viktouille

    viktouille

    Joined:
    Jul 19, 2017
    Posts:
    9
    I'm still hitting this issue but I gived up trying to resolve it, so I recoded my project from a blank project, and the problem disappeared.
    This is the only solution I found and this is what Unity support advised me.
     
    JoshPeterson likes this.
  13. NoZain

    NoZain

    Joined:
    Jul 12, 2016
    Posts:
    4
    There might still have a file called linker.xml at your Asset folder. When I removed this file, it solved all the issues.
     
    rponnie_unity and matt_ciq like this.
  14. matt_ciq

    matt_ciq

    Joined:
    Oct 30, 2017
    Posts:
    2
    Can confirm, I was having this issue and it turned out to be a link.xml in Assets that was related to Vuforia...I had been working with Vuforia but then deleted the folder and plugins but missed the link.xml file.
     
  15. unity_hMpo8Vscxzgpfg

    unity_hMpo8Vscxzgpfg

    Joined:
    Jan 31, 2018
    Posts:
    1
    had the same problem while building to iOS.
    prior to this i was migrating project from older version of vuforia to newer one (to 2017.2), and seems some excess files left in the Assets folder as well as "link.xml". Removing "link.xml" file from project solved this issue for me. also i had set Compatibility level from .NET Subset 2.0 to .NET 2.0. no any service in my project was enabled (nor IAP). thanks for help
     
  16. Russel

    Russel

    Joined:
    Oct 12, 2011
    Posts:
    40
    deleting Library folder from your project folder helps :)
     
  17. rponnie_unity

    rponnie_unity

    Joined:
    Apr 10, 2018
    Posts:
    12
    great ! Had the same error and deleting the linker.xml solved it, thanks !!
     
  18. zippro

    zippro

    Joined:
    Dec 13, 2013
    Posts:
    7
    I have found a solution. Just reimport Unity IAP
     
  19. 1028795420

    1028795420

    Joined:
    Jul 28, 2014
    Posts:
    1
    Windows>Services>Unity IAP>Reimport
     
  20. NortalNeis

    NortalNeis

    Joined:
    Mar 5, 2014
    Posts:
    3
    Delete all *.js scripts from your project folder. IL2CPP cant compile JavaScript to C++
     
  21. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    It is possible to IL2CPP to compile UnityScript .js files to C++. The UnityScript compiler first compiles them to IL bytecode, then IL2CPP will convert them to C++.
     
  22. danielgamar

    danielgamar

    Joined:
    Jun 13, 2019
    Posts:
    5
    I want to build from a FAT32 FS and I get this error in unity 2019.1.6f1. Found the bug report and it said it's fixed but it doesn't work...
     
  23. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    4,242
    It may be worth submitted a new bug report. Maybe the cause of the problem is different.
     
  24. Emirk

    Emirk

    Joined:
    Nov 26, 2012
    Posts:
    13
    I couldn't build either when running the project from a Samsung X5 external SSD. Copied it over to my internal disk, worked perfectly. Sitting on MacOS and Unity 2018.3.14.
     
unityunity