Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I get the following errors in the build log.
using link-all but no llvm for a debug build.
ServiceStack.Text.MonoTouch.dll.armv7.s:459535:branch out of range (repeated many times with different addresses)
Error MT3001: Could not AOT the assembly 'ServiceStack.Text.MonoTouch.dll' (MT3001) (MobileBullet.MT)
For a release build with link-all it works with llvm(no thumb) or no llvm.
This can be reproduced with the attachment on bug #8875 (switch to release build) which use LLVM/Thumb2 and "Link SDK".
Is this related to the fact that SS makes heavy use of generics? I read somewhere that the AOT has to produce code for every value type for each generic. Is it possible to have a AOT control file that explicitly specifies which types to generate specified generic types for? This would also make it easier to workaround types that the AOT misses (rather than putting dummy code in the source).
The generated files are huge, the ServiceStack.Text.MonoTouch.dll assembly itself being 144kb, but this seems different from the other reports (e.g. bug #9628) where the error is about a 24 bits address encoding limit.
E.g. when building for armv7 / debug (works)
-rw-r--r-- 1 sebastienpouliot staff 122083419 22 Jan 19:33 ServiceStack.Text.MonoTouch.dll.armv7.s
E.g. when building for armv7 / llvm / thumb2 (fails)
-rw-r--r-- 1 sebastienpouliot staff 60004384 22 Jan 19:37 ServiceStack.Text.MonoTouch.dll.armv7.s
So half the .s file size (but thumb addressing could be an issue) in my test case (but it seems to occur too without llvm, so without thumb).
Where can I get that assembly ?
Created attachment 3265 [details]
The ServiceStack assembly is attached.
The first original description has a link to the bug with a full solution (not sure if the link is still active).
This is an AOT compiler problem, the original assembly has about 1k methods, while we AOT 27k.
The assembly contains a RegisterForAot method, which basically forces the generation of all these methods.
yep, that's what I described in https://bugzilla.xamarin.com/show_bug.cgi?id=9628#c4
*** Bug 18433 has been marked as a duplicate of this bug. ***
*** Bug 5093 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 1102 ***