Bug 46927 - MT4109: Failed to compile the generated registrar code
Summary: MT4109: Failed to compile the generated registrar code
Status: RESOLVED DUPLICATE of bug 40871
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 9.0 (iOS9)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-14 12:16 UTC by Bruno Caceiro
Modified: 2016-11-14 15:27 UTC (History)
3 users (show)

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

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 DUPLICATE of bug 40871

Description Bruno Caceiro 2016-11-14 12:16:19 UTC
When trying to deploy a Xamarin.Forms application into a physical device I get the following error:

Project.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets (_CompileToNative target) ->

    MTOUCH: error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com

     6 Warning(s)
     1 Error(s)

Time Elapsed 00:00:51.5040280
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-11-14 13:55:09 UTC
Please attach the complete build log, and if possible the registrar.m file the native compiler mentions there.
Comment 2 Bruno Caceiro 2016-11-14 14:46:25 UTC
                                                                                                                           ^ 
		/Users/bcaceiro/Traderline/traderline/TraderLine.iOS/obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6806:74: error: expected a type
		        -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1;
		                                                                                ^ 
		/obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6848:74: error: expected a type
		        -(BOOL) gestureRecognizer:(UIGestureRecognizer *)p0 shouldReceivePress:(UIPress *)p1
		                                                                                ^ 
		obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:6851:10: error: no matching function for call to 'native_to_managed_trampoline_37'
		                return native_to_managed_trampoline_37 (self, _cmd, &managed_method, p0, p1, "UIKit.UIGestureRecognizer, Xamarin.iOS", "UIKit.UIPress, Xamarin.iOS", "UIKit.UIGestureRecognizer+_UIGestureRecognizerDelegate, Xamarin.iOS", "ShouldReceivePress");
		                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj/iPhone/Debug/build-iphone8.1-10.1.1/mtouch-cache/registrar.m:1705:13: note: candidate function not viable: no known conversion from 'id' to 'int *' for 5th argument
		static BOOL native_to_managed_trampoline_37 (id self, SEL _cmd, MonoMethod **managed_method_ptr, UIGestureRecognizer * p0, UIPress * p1, const char *r0, const char *r1, const char *r2, const char *r3)
		            ^ 
		4 errors generated.

These are the generated errors
Comment 3 Rolf Bjarne Kvinge [MSFT] 2016-11-14 15:27:24 UTC
See https://bugzilla.xamarin.com/show_bug.cgi?id=40871#c4 for the fix.

*** This bug has been marked as a duplicate of bug 40871 ***