Search Issue Tracker

Won't Fix

Votes

13

Found in

4.6.1p2

Issue ID

671154

Regression

Yes

IL2CPP Regression: Projects with Ionic Zlib assembly fail to build in 4.6.2p1

Scripting

-

Reproduction steps:
1) Open attached "ZlibIL2CPP" project in the Unity Editor.
2) Switch to iOS build configuration
3) Open Player Settings
4) Ensure build is set to use IL2CPP, Universal Platform
5) Hit build
6) (EXPECTED) Unity IL2CPP build process generates a project and successfully transpiles the Ionic ZLib assembly.
6) (OBSERVED) Build fails with the following error:

Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed" -a "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/ncoderre/Downloads/ZlibIL2CPP/Temp/StagingArea/Data/Managed/Ionic.Zlib.dll"

stdout;
Fatal error in Mono CIL Linker
System.Exception: Error processing method: 'System.Void Ionic.Zlib.ParallelDeflateOutputStream::TraceOutput(Ionic.Zlib.ParallelDeflateOutputStream/TraceBits,System.String,System.Object[])' in assembly: 'Ionic.Zlib.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void System.Console::set_ForegroundColor(System.ConsoleColor)
at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0

Comments (7)

  1. ThePayneX

    Jun 15, 2015 13:04

    i still get in version 4.6.5p4

  2. Flippinpony

    Mar 27, 2015 19:25

    I hit the same issues in 5.0.0f4 making a WebGL build. Bailywick's solution worked for me, thanks!

  3. songdo

    Mar 27, 2015 05:46

    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/moon/Work/Unity/test/Vikings_Olg/Assets/link.xml" -d "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/ICSharpCode.SharpZipLib.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/P31RestKit.dll" -a "/Users/moon/Work/Unity/test/Vikings_Olg/Temp/StagingArea/Data/Managed/SharpCompress.3.5.dll"

    stdout;
    Fatal error in Mono CIL Linker
    System.Exception: Error processing method: 'System.Void SharpCompress.Compressor.Deflate.ParallelDeflateOutputStream::TraceOutput(SharpCompress.Compressor.Deflate.ParallelDeflateOutputStream/TraceBits,System.String,System.Object[])' in assembly: 'SharpCompress.3.5.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void System.Console::set_ForegroundColor(System.ConsoleColor)
    at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String)
    UnityEditorInternal.IL2CPPBuilder:Run()
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
    UnityEditor.HostView:OnGUI()

  4. bradr

    Mar 25, 2015 17:30

    Still happens for me in v 4.6.3p4

  5. nems808

    Mar 19, 2015 19:47

    Persist on 4.6.3p3 as well. Here are errors that I get

    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed" -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/nems808/ZombieBunnyProject/Assets/link.xml" -d "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed" -a "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a "/Users/nems808/ZombieBunnyProject/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"

    stdout;
    Fatal error in Mono CIL Linker
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'U3DXTCore, Culture=neutral, PublicKeyToken=null'
    at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String)
    UnityEditorInternal.IL2CPPBuilder:Run()
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
    UnityEditor.HostView:OnGUI()

  6. Bailywick

    Mar 12, 2015 10:54

    I believe this may be due to more accurate linking by the compiler - I came across this similar issue for when searching for information: http://mono-for-android.1047100.n5.nabble.com/Linker-crashing-quot-Failed-to-resolve-System-Console-setforegroundcolor-quot-td5712071.html

    I managed to resolve my issue by using the Compact Framework build of DotNetZipLib (Ionic.Zip.CF.dll - and there is one for zlib too).

  7. ingridhib

    Mar 06, 2015 20:27

    This issue happens also in the version 4.6.3p2

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.