1

When trying to build the popular library ICSharpCode.SharpZipLib.dll in debug mode for iPhone using Xamarin.iOS everything works fine. When I switch to Release mode, I get this error:

error MT3001: Could not AOT the assembly

When I turn on verbose output, here is what I get:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc      -miphoneos-version-min=4.3 -arch armv7  -std=c99 -I/Developer/MonoTouch/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -c /var/folders/kn/1j5jxvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.s -o /var/folders/kn/1j5jxvv131zcyqmgy3yj_xfw0000gn/T/tmp13a8fd89.tmp/System.Data.dll.armv7.o
error MT3001: Could not AOT the assembly '.../bin/iPhone/Release/ICSharpCode.SharpZipLib.dll'
  at MTouch.GetObjectFileForAssembly (System.String assemblyName, Abi abi) [0x00000] in <filename unknown>:0 
  at MTouch+<CompileAssemblies>c__AnonStoreyB.<>m__E (System.String s) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey36`1[System.String].<>m__34 (System.String e, System.Threading.Tasks.ParallelLoopState s, System.Object l) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Parallel+<ForEach>c__AnonStorey35`2[System.String,System.Object].<>m__32 () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.InnerInvoke () [0x00000] in <filename unknown>:0 
  at System.Threading.Tasks.Task.ThreadStart () [0x00000] in <filename unknown>:0 

This is with LLVM turned on and SGen turned on. When I turn off SGen as suggested in this (Mono ARMv7 and LLVM) post, I get the exact same MT3001 error.

When I turn off LLVM, then it works again. The problem is that I need LLVM.

How can I get this common library to build in Monotouch/Xamarin.iOS without turning off LLVM? Any help is greatly appreciated.

Community
  • 1
  • 1
jbro91837
  • 233
  • 3
  • 10
  • What you provided is `mtouch` reporting *most* compiler error. That tells us where it stopped (i.e. AOTing `ICSharpCode.SharpZipLib.dll`), but it not tell why. You should have, in the previous lines of your build logs, some details why it failed (i.e. the message from the AOT compiler itself).s You also did not provide the version of Xamarin.iOS you're using: I know a *similar* issue (with LLVM and the same .dll) was fixed a few months ago. – poupou Jun 23 '13 at 14:29
  • Thanks for the response -- I looked further up in the logs and I could not find any information relating to ICSharpCode.SharpZipLib.dll. Could you clarify what I am looking for? I did see some stuff about compiling other DLLs such as System.Data.dll for example, but there was no error per se. The version number is 3.1.1. Do you have any recommendations on how to proceed? – jbro91837 Jun 24 '13 at 05:07
  • Can you provide the entire build output? – Rolf Bjarne Kvinge Jun 24 '13 at 09:50
  • Are you using a Windows .Net DLL? this won't work unless you recompile for Xamarin.iOS. I normally download the source and link everything in, using a Xamarin.iOS class library project. – jonathanpeppers Jun 24 '13 at 12:22
  • I'm pretty sure it's not Xamarin.iOS (or MonoTouch) 3.1.1 ;-) The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button). You can pastebin that (and the full build log) and add links to them inside your question. – poupou Jun 24 '13 at 12:25
  • Thanks for the quick response. We tried the Windows .NET DLL at first, and we have also tried a new compilation of the DLL using a Monotouch class library project. They actually both produce exactly the same MT3001 problem. The versions are; Monodevelop 3.1.1, Monotouch 6.0.10, and Xcode 4.6. Could you private message me your email address? I can't post the full build log publicly on the Internet but I could email it. – jbro91837 Jun 25 '13 at 06:35
  • Any update on this issue? I have the exact same one without any clue. – Askolein Jul 16 '13 at 16:30

0 Answers0