xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.49k stars 515 forks source link

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(777,3): error : Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com #3637

Closed slushpuppy closed 6 years ago

slushpuppy commented 6 years ago

1>------ Rebuild All started: Project: Car.iOS, Configuration: Debug iPhone ------ 1> Connecting to Mac server 192.168.0.111... 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1311,3): warning : Push segues are deprecated since iOS 8.0 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1198,3): warning : The app icon set "AppIcons" has an unassigned child. 1> Car.iOS -> J:\Projects\Autobahn\Mobile Application\Car\Car\Car.iOS\bin\iPhone\Debug\Car.iOS.exe 1> Detected signing identity: 1> Code Signing Key: "----- 1> Provisioning Profile: "---- 1> Bundle Id: ---.Car.iOS 1> App Id: ---.iOS 1> Process exited with code 1, command: 1> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Wno-receiver-forward-class -Wno-unguarded-availability-new -gdwarf-2 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.4/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -c -o /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/arm64/registrar.o -x objective-c++ -DDEBUG /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m 1> In file included from /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:3: 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.h:21:1: error: redefinition of 'UIButtonTypeCustom' as different kind of symbol 1> @class UIButtonTypeCustom; 1> ^ 1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h:20:5: note: previous definition is here 1> UIButtonTypeCustom = 0, // no button type 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2005:17: warning: cannot find interface declaration for 'UIButtonTypeCustom' 1> @implementation UIButtonTypeCustom { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2005:17: warning: class 'UIButtonTypeCustom' defined without specifying a base class [-Wobjc-root-class] 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2005:35: note: add a super class to fix this problem 1> @implementation UIButtonTypeCustom { 1> ^ 1> : NSObject 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2782:37: error: reference to 'UIButtonTypeCustom' is ambiguous 1> xamarin_class_map [68].handle = [UIButtonTypeCustom class]; 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2005:17: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @implementation UIButtonTypeCustom { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.h:55:12: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @interface UIButtonTypeCustom : UIButton { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.h:21:8: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @class UIButtonTypeCustom; 1> ^ 1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h:20:5: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> UIButtonTypeCustom = 0, // no button type 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/64/registrar.m:2782:56: warning: class method '+class' not found (return type defaults to 'id') [-Wobjc-method-access] 1> xamarin_class_map [68].handle = [UIButtonTypeCustom class]; 1> ^~~~~ 1> 3 warnings and 2 errors generated. 1> Process exited with code 1, command: 1> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -Wno-receiver-forward-class -Wno-unguarded-availability-new -gdwarf-2 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/11.6.1.4/SDKs/MonoTouch.iphoneos.sdk/usr/include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch armv7 -c -o /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/armv7/registrar.o -x objective-c++ -DDEBUG /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m 1> In file included from /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:3: 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.h:21:1: error: redefinition of 'UIButtonTypeCustom' as different kind of symbol 1> @class UIButtonTypeCustom; 1> ^ 1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h:20:5: note: previous definition is here 1> UIButtonTypeCustom = 0, // no button type 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2005:17: warning: cannot find interface declaration for 'UIButtonTypeCustom' 1> @implementation UIButtonTypeCustom { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2005:17: warning: class 'UIButtonTypeCustom' defined without specifying a base class [-Wobjc-root-class] 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2005:35: note: add a super class to fix this problem 1> @implementation UIButtonTypeCustom { 1> ^ 1> : NSObject 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2782:37: error: reference to 'UIButtonTypeCustom' is ambiguous 1> xamarin_class_map [68].handle = [UIButtonTypeCustom class]; 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2005:17: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @implementation UIButtonTypeCustom { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.h:55:12: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @interface UIButtonTypeCustom : UIButton { 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.h:21:8: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> @class UIButtonTypeCustom; 1> ^ 1> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIButton.h:20:5: note: candidate found by name lookup is 'UIButtonTypeCustom' 1> UIButtonTypeCustom = 0, // no button type 1> ^ 1> /Users/Lu/Library/Caches/Xamarin/mtbs/builds/Car.iOS/9bf9061fe036226b1d683450df958473/obj/iPhone/Debug/mtouch-cache/32/registrar.m:2782:56: warning: class method '+class' not found (return type defaults to 'id') [-Wobjc-method-access] 1> xamarin_class_map [68].handle = [UIButtonTypeCustom class]; 1> ^~~~~ 1> 3 warnings and 2 errors generated. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(777,3): error : Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Trying to compile from windows->iOS

mandel-macaque commented 6 years ago

Hello,

There is a lot of information missing. When you report a new issue you should see a template similar to the following:

Steps to Reproduce

Expected Behavior

Actual Behavior

Environment

Build Logs

Example Project (If Possible)

Can you please fill in the form so that we have all the required information to triage the issue.

slushpuppy commented 6 years ago

Thanks for the reply

Steps to Reproduce

  1. Connect to Xamarin Mac agent over localhost
  2. Project compiles fine in simulator mode
  3. Upon switching Project Settings to:
    • Debug - iPhone - Device
      1. Build project
  4. Above error is seen

Expected Behavior Successful compilation

Actual Behavior Error messages as shown above

Environment Win Environment: VS 15.5.7 Xamarin.iOS 11.6.1.14

Mac Environment: Xamarin.iOS Version 11.6.14 Mac VS 7.3.3

slushpuppy commented 6 years ago

Oh.. make sure there isn't a file with a class called "UIButtonTypeCustom".... that is a day well spent -.-

Thank you all for your helpo