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. Dismiss Notice

Fatal error in Unity CIL Linker 2017.2.0f3

Discussion in 'Unity Build Automation' started by Baraphor, Oct 16, 2017.

  1. Humulo

    Humulo

    Joined:
    May 8, 2019
    Posts:
    4
    We are seeing a similar issue - building to Oculus Quest. Was there any solution to this found!?

    Failed running C:\Unity\2019.3.3f1\Editor\Data\il2cpp\build/deploy/net471/UnityLinker.exe -out=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/tempStrip -x=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/../platform_native_link.xml -x=C:/Users/alien/AppData/Local/Temp/tmp7fa90b09.tmp -x=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/TypesInScenes.xml -d=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed --include-unity-root-assembly=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp-firstpass.dll --include-unity-root-assembly=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/Assembly-CSharp.dll --include-unity-root-assembly=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/UnityEngine.UI.dll --include-unity-root-assembly=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/Oculus.VR.dll --dotnetruntime=il2cpp --dotnetprofile=unityaot --use-editor-options --include-directory=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed --rule-set=Conservative --editor-data-file=E:/Humulo_VR/Temp/StagingArea/assets/bin/Data/Managed/EditorToUnityLinkerData.json --platform=Android --enable-engine-module-stripping --engine-stripping-flag=EnableUnityConnect --engine-stripping-flag=EnableCrashReporting --engine-stripping-flag=EnableVR --engine-modules-asset-file=C:/Unity/2019.3.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/Whitelists/../modules.asset

    stdout:
    Fatal error in Unity CIL Linker
    System.InvalidOperationException: No action for the assembly TinCan, Version=1.3.0.0, Culture=neutral, PublicKeyToken=7e2d97554f738180 defined
    at Mono.Linker.AnnotationStore.GetAction(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.IsFullyPreserved(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.MarkNeededFields(TypeDefinition type)
    at Unity.Linker.Steps.Marking.MonoBehaviourMarking.DoAdditionalTypeProcessing(TypeDefinition type)
    at Unity.Linker.Steps.UnityMarkStep.DoAdditionalTypeProcessing(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
    at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
    at Mono.Linker.Steps.MarkStep.Initialize()
    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
    at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
    at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Unity.Linker.UnityDriver.Run()
    at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling()
    at Unity.Linker.UnityDriver.RunDriver()
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String&, String&, IEnumerable`1, UnityLinkerRunInformation)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(UnityLinkerRunInformation)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, BaseUnityLinkerPlatformProvider, IIl2CppPlatformProvider, RuntimeClassRegistry, ManagedStrippingLevel)
    UnityEditorInternal.IL2CPPBuilder:Run()
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    This is not an error that I've seen before. Can you submit a bug report with a project that causes this?
     
  3. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    26
    Hello,

    I think we may have something relevant too :

    stdout:
    Fatal error in Unity CIL Linker
    System.ArgumentException: Member ‘System.Void System.Runtime.CompilerServices.NullableAttribute::.ctor(System.Byte)’ is declared in another module and needs to be imported


    Or can this be fixed with updating some linking ?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    I'm not sure about the cause of this issue. Is this something you can submit to us with a bug report?
     
  5. PacoLabs

    PacoLabs

    Joined:
    Jun 29, 2017
    Posts:
    31
    Hi, I also have the same problem when building for iOS on my computer (Unity 2019.4.1):
    Fatal error in Unity CIL Linker System.ArgumentException: Member 'System.Void System.Runtime.CompilerServices.NullableAttribute::.ctor(System.Byte)' is declared in another module and needs to be imported

    It is related to the usage of Remote Config 1.2.3.
    With Remote Config 1.0.9, the error is gone.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    We do not yet have a bug report on this issue. If you can provide a project that reproduces it, please submit a bug report. We would love to investigate it. Thanks!
     
  7. PacoLabs

    PacoLabs

    Joined:
    Jun 29, 2017
    Posts:
    31
    Sorry but I can't submit my main project, and I cannot reproduce the problem on a simple sample project.
    There might be a conflict with another package. I don't know.
    In case it helps, here are attached my packages:
    Capture d’écran 2020-07-08 à 21.13.40.png
    I don't have the problem with Remote Config 1.0.9, but If I update to any higher version, the compilation error is triggered when building for iOS.
    Downgrading back to 1.0.9 removes the compilation error.
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    Ok, that is fine. What is Remote Config (sorry, I'm unfamiliar with it). Is that a package Unity publishes? If so I'll track who develops it and talk with them directly.
     
  9. PacoLabs

    PacoLabs

    Joined:
    Jun 29, 2017
    Posts:
    31
    Yes, it is an official package, as far as I know.
    They have a dedicated forum:
    https://forum.unity.com/forums/unity-remote-config.371/

    And here is the documentation :
    https://docs.unity3d.com/Packages/com.unity.remote-config@latest

    According to the package manager, the higher versions are not Unity 2019.4 verified (only 1.0.9 is), so this might be the problem (although I cannot reproduce it on a clean project)

    Note that, even if I have the same error on my computer, the real problem might not be the exact same one as the one of the users in this post.
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,773
    Thanks, I've contacted our Remote Config team about this. Hopefully we can work together to track this down.
     
    PacoLabs likes this.
  11. networm

    networm

    Joined:
    Sep 15, 2015
    Posts:
    8
    It seems that you are using Windows 7. And the problem is that you didn't install the latest .Net Framework.
    I installed .Net Framework 4.8 on Windows 7 and then Unity build Android IL2CPP successfully.

    Environments:

    - Windows 7
    - .Net Framework 4.8
    - Unity 2018.4.25f1
     
  12. reintjerein07

    reintjerein07

    Joined:
    Aug 23, 2020
    Posts:
    1
  13. phong-genix

    phong-genix

    Joined:
    Oct 28, 2015
    Posts:
    140
    I've just encountered this error as well. And it turns out that Unity Remote Config is the cause in my case (tried with both 1.2.3 and 1.4.0 preview 1). Removing Unity Remote Config and successfully built Android APK.

    macOS Catalina
    Unity 2019.4.10f1
    Unity Remote Config (1.2.3 / 1.4.0 preview 1)
     
  14. PNUMIA-Rob

    PNUMIA-Rob

    Joined:
    Jan 7, 2015
    Posts:
    33
    I was experiencing the same error with or without Remote Config, setting the Managed Stripping Level from High to Medium was the solution for me.
     
    vandos and Racines like this.
  15. vandos

    vandos

    Joined:
    Dec 8, 2013
    Posts:
    1
    Yes! Thanks.
     
  16. atifmahmood29

    atifmahmood29

    Joined:
    Nov 23, 2014
    Posts:
    8
    I was facing this linker error when using Remote config with Managed Stripping Level High and it was working fine with Stripping Level Medium.
    If want to use with managed Stripping Level High with Remote config then create link.xml file in Assets folder and paste these lines in link.xml to tell linker preserve this library.

    Code (CSharp):
    1. <linker>
    2.   <assembly fullname="Newtonsoft.Json" ignoreIfMissing="1">
    3.     <namespace fullname="System.Runtime.CompilerServices" preserve="all" />
    4.   </assembly>
    5. </linker>
     
  17. e_meehan

    e_meehan

    Joined:
    Feb 9, 2022
    Posts:
    1
    This was a great tip to resolve it for me - I had nothing in my link.xml file. Deleting it did the trick - thanks!