Bug 30873 - Error MT3001: Could not AOT the assembly '.../RestSharp.Portable.dll' (MT3001)
Summary: Error MT3001: Could not AOT the assembly '.../RestSharp.Portable.dll' (MT3001)
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.10
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2015-06-07 05:37 UTC by VitoA
Modified: 2015-09-03 15:42 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Compilation log (292.11 KB, application/octet-stream)
2015-06-16 14:04 UTC, Seifer
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description VitoA 2015-06-07 05:37:55 UTC
After the last update, I have this error during Ad-Hoc build.
Comment 1 Sebastien Pouliot 2015-06-08 09:28:53 UTC
`MT3001` errors means to AOT compiler could not complete it’s job. Without a full build log (one done with `-v -v -v -v) it’s not possible to guess why it happened, nor to suggest potential workaround.

The best way to get this resolved is to attach the assembly that resulted in the `MT3001` error. Ideally a full, self-contained test case is much better. Also having all the versions* information is required.

`*` 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).
Comment 2 Manuel Mayr 2015-06-14 16:06:59 UTC
HI,

i have the same problem by during release on my iphone device.
By using Simulator everything is working fine.

This is the Build Output:

MTOUCH: error MT3001: Could not AOT the assembly '/Users/mmayr/Projects/Livitas/Git/Sportcall/Sportcall/obj/iPhone/Release/mtouch-cache/64/Build/RestSharp.Portable.dll'
		  at MonoTouch.AOTTask.Build () [0x00000] in <filename unknown>:0 
		  at MonoTouch.BuildTask.Execute () [0x00000] in <filename unknown>:0 
		  at MonoTouch.Target+<Compile>c__AnonStorey0.<>m__0 (MonoTouch.BuildTask v) [0x00000] in <filename unknown>:0 
		  at System.Threading.Tasks.Parallel+<ForEachWorker>c__AnonStorey6`2[MonoTouch.BuildTask,System.Object].<>m__0 (Int32 i) [0x00000] in <filename unknown>:0 
		  at System.Threading.Tasks.Parallel+<ForWorker>c__AnonStorey3`1[System.Object].<>m__1 () [0x00000] in <filename unknown>:0 
	Task "MTouch" execution -- FAILED
	Done building target "_CompileToNative" in project "/Users/mmayr/Projects/Livitas/Git/Sportcall/Sportcall/SportcallAPP_iOS.csproj".-- FAILED
	
Done building project "/Users/mmayr/Projects/Livitas/Git/Sportcall/Sportcall/SportcallAPP_iOS.csproj".-- FAILED

Build FAILED.
Comment 3 Seifer 2015-06-16 14:00:02 UTC
Hi, I have the same error when compiling for device (even Debug configuration).

I do see the same trace in output (with -v -v -v -v) as Manuel Mayr.

Any updates or hints on this? We really need to prepare a new build for release.
Comment 4 Sebastien Pouliot 2015-06-16 14:03:06 UTC
Please attach the build log (with the -v -v -v -v) so we can get all the details (not just mtouch reporting the AOT compiler failed).
Comment 5 Seifer 2015-06-16 14:04:57 UTC
Created attachment 11624 [details]
Compilation log
Comment 6 Seifer 2015-06-17 07:20:29 UTC
The log has been attached. Any additional info I can provide?
Comment 7 Sebastien Pouliot 2015-06-17 09:04:05 UTC
That's all I needed for now. Thanks, I'll be looking into it asap.
Comment 8 Keni 2015-06-22 15:53:11 UTC
Hi, 

I too am having a the same problem on a Mac Mini...
Comment 9 Sebastien Pouliot 2015-06-22 20:23:45 UTC
@Keni, it might be a different issue. Would it be possible to see if you can create a test case and file a separate bug report ?

What's happening is that recent AOT compiler (8.10.1+) started to report more errors than before and this cause the MT3001 errors. As such going back to 8.10.0.x can be a workaround.

We're looking into silencing those errors asap and, in parallel, fix them (in future releases). Having test cases, that we can reproduce, would be helpful for this - as those error conditions (even if not all severe) needs to be fixed properly. Thanks!
Comment 10 Sebastien Pouliot 2015-06-23 11:19:22 UTC
The recent MT3001 errors comes from additional checks done by the AOT compiler [1]. 

That spotted a bug in the linker where an assembly could be invalid (e.g. peverify would not be happy) but that did not affect most application (it never was reported before). 

However that new check nows prevent a successful build. As such it's being, temporarily, disabled for 8.10.2.x. You can download it from [2], it's identical to the beta being released today - but it also removes the check.


[1] the check is new in XI 8.10.1.x, going back to 8.10.0.x should be fine (or the issue is different) using https://kb.xamarin.com/customer/portal/articles/1699777-how-do-i-downgrade-to-an-older-version

[2] http://storage.bos.internalx.com/macios-mac-macios-cycle5-c5sr2/ef/ef8c2f7734c2f1702dec51766aff1de1bed1c5db/monotouch-8.10.2.37.pkg
Comment 11 Keni 2015-06-23 12:32:59 UTC
Installing {2} worked :) 

thank you!!! I was getting worried!
Comment 12 Ian 2015-06-25 02:25:40 UTC
I got this error too. Unified, with the RestSharp nuget package
Comment 13 Ian 2015-06-25 11:53:23 UTC
{2} Worked for me too.

Does this package though contain the fix to allow apps to run in iOS 9?
Comment 14 Sebastien Pouliot 2015-09-03 15:42:11 UTC
Beside the workaround in the 8.10 service releases the root cause is also fixed in XI 8.99 previews.