Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug Building with IL2CPP gives 'Fatal error in Unity CIL Linker'

Discussion in 'Linux' started by MostHated, Dec 11, 2023.

  1. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,236
    Every time I try and build using IL2CPP I get the error below. Building with Mono is fine, but it's a DOTS project. I have tried DOTS 1.2.pre-4, 1.2.exp-3, 1.0.16, and a few editor version to see if it made a difference (2022.3.15-13-and 10) but had the same result in all tests.

    Code (CSharp):
    1.  
    2. // This keeps going on after --allowed-assembly for dozens of assembly paths
    3. Building Library/Bee/artifacts/LinuxPlayerBuildProgram/ManagedStripped failed with output:
    4. /home/mosthated/Unity/Hub/Editor/2022.3.10f1/Editor/Data/il2cpp/build/deploy/UnityLinker --allowed-assembly=/home/mosthated/Unity/Hub/Editor/2022.3.10f1/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/Variations/il2cpp/Managed/UnityEngine.AIModule.dll ...
    5.  
    6. Fatal error in Unity CIL Linker
    7. System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 9, position 18.
    8.    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    9.    at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
    10.    at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
    11.    at System.Xml.XmlTextReaderImpl.ParseAttributes()
    12.    at System.Xml.XmlTextReaderImpl.ParseElement()
    13.    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    14.    at System.Xml.XmlTextReaderImpl.Read()
    15.    ....
    I tried adjusting the managed stripping level from minimal to low, just to see as well, but no change. I also tried setting C++ Compiler Config, and adjusting the IL2CPP code gen setting, but so far, none of them seem to make any difference.

    I am really not sure what else to try?

    Current setup outside of testing the other versions:
    Ubuntu 22.04
    Unity 2022.3.15
    DOTS 1.2.pre-4

    ---
    Edit. At least some good news, I tried a different project with the same Unity packages installed and it built, so I guess it is just something in my current project. That makes me feel somewhat better. Just gotta keep digging.
     
    Last edited: Dec 11, 2023
  2. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,236
    I tried to match up the working project with my current project, and somehow... it was the scene that caused this? I created an empty scene and did a build and it worked. Doing it with my test scene, it gives the linker error. I am not sure what is up with that, but at least it's progress.