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.46k stars 511 forks source link

[ObjectiveSharpie] Unsupported clang availability platform: 'bridgeos' #3941

Closed dalexsoto closed 4 years ago

dalexsoto commented 6 years ago

From: https://developercommunity.visualstudio.com/content/problem/231426/latest-version-of-objective-c-sharpie-fails-to-bin.html

I'm guessing that the Sharpie Framework needs to be updated to use the latest Xcode and SDK 11.3. But it is failing on binding any framework or library. Here is the output snippet that may shed some light on the issue. This is HIGH priority since we are maintaining our own libraries that are used for payment processors and they just updated again and we are unable to proceed without the Sharpie library being updated.

Thanks

Parsing 10 header files...

Binding...

System.Exception: Unsupported clang availability platform: 'bridgeos'

at Sharpie.Bind.Attributes.AvailabilityBaseAttribute+<FromClang>d__6.MoveNext () [0x0037d] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs:192

at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x0006f] in <3fb92ec709f44a579da6a23087df403d>:0

at Sharpie.Bind.Massagers.AvailabilityMassager.Massage (ICSharpCode.NRefactory.CSharp.EntityDeclaration entity) [0x00092] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:55

at Sharpie.Bind.Massagers.AvailabilityMassager.VisitPropertyDeclaration (ICSharpCode.NRefactory.CSharp.PropertyDeclaration propertyDeclaration) [0x00000] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:29

at ICSharpCode.NRefactory.CSharp.PropertyDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0

at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0

at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0

at Sharpie.Bind.Massagers.AvailabilityMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00006] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:24

at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0

at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0

at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0

at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00015] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/DocumentSyntaxTree.cs:37

at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, Sharpie.Bind.BindingTarget bindingTarget) [0x00033] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingMassager.cs:103

at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) [0x000b5] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingFrontend.cs:61

at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) [0x0018b] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:164

at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:158

at Clang.Driver.HandleTranslationUnit (System.IntPtr translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:148

at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)

at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) [0x00177] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:139

at Sharpie.ParseTool.Run () [0x005c8] in /Users/builder/vsts/_work/2/s/Sharpie/ParseTool.cs:576

at Sharpie.BindTool.CoreRun () [0x00001] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:120

at Sharpie.BindTool.Run () [0x00026] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:98
dyeazel commented 6 years ago

Second this request. If it's due to iOS 11.3, it should be fixed ASAP.

Rickerss commented 6 years ago

Facing the same issue - any update on this?

jvannoord commented 6 years ago

I have the same issue; I was able to workaround the problem by downloading Xcode 8.3.3 and coping the iPhone10.3 sdk out of that bundle and putting it in to the Xcode 9.x bundle, and then referencing it explicitly:

sharpie -sdk iphoneos10.3 ...

jooleeanh commented 6 years ago

Similarly to jvannoord, here's what I did:

Downgraded to XCode 9.2:

You might be able to simply rename XCode 9.3 to xcode(9.3).app to have the two applications side by side (9.2 being named xcode.app) but I don't want to restart my computer just to test that.

trinnguyen commented 6 years ago

I found the updated Makefile contains the link to the new Objective Sharpie version 3.4.23 and it solved this problem on my machine.

Makefile: https://github.com/xamarin/xamarin-macios/blob/4ccd448205384e546e3c4556b48f584618c741e3/Make.config

Objective Sharpie link: https://bosstoragemirror.blob.core.windows.net/objective-sharpie/builds/4cde014216e8887375f9793d3a2607529833443b/440/76194/ObjectiveSharpie-3.4.23.pkg

Using stable channel so the sharpie update did not show any new update, but manually install 3.4.23.pkg works (latest stable version is 3.4.0)

volcano619 commented 6 years ago

Is this fixed ?

rolfbjarne commented 6 years ago

@volcano619 try using the package mentioned in the comment just before yours.

volcano619 commented 6 years ago

Yeah the above package seems fine!

fryette commented 6 years ago

Works great!

SangI762 commented 4 years ago

I found the updated Makefile contains the link to the new Objective Sharpie version 3.4.23 and it solved this problem on my machine.

Makefile: https://github.com/xamarin/xamarin-macios/blob/4ccd448205384e546e3c4556b48f584618c741e3/Make.config

Objective Sharpie link: https://bosstoragemirror.blob.core.windows.net/objective-sharpie/builds/4cde014216e8887375f9793d3a2607529833443b/440/76194/ObjectiveSharpie-3.4.23.pkg

Using stable channel so the sharpie update did not show any new update, but manually install 3.4.23.pkg works (latest stable version is 3.4.0)

That didn't work for me. I'm still getting error: Unsupported clang availability platform: 'driverkit'

rachael-ross commented 4 years ago

I'm getting the same Unsupported clang availability platform: 'driverkit' error. Any progress on this?

jingliancui commented 4 years ago

3.4.23 still not work for Mac OSX Catalina

Parsing 3 header files...

Binding...
System.Exception: Unsupported clang availability platform: 'macCatalyst'
  at Sharpie.Bind.Attributes.AvailabilityBaseAttribute+<FromClang>d__7.MoveNext () [0x003aa] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Attributes/AvailabilityBaseAttribute.cs:203 
  at System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () [0x0006f] in <3fb92ec709f44a579da6a23087df403d>:0 
  at Sharpie.Bind.Massagers.AvailabilityMassager.Massage (ICSharpCode.NRefactory.CSharp.EntityDeclaration entity) [0x00092] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:55 
  at Sharpie.Bind.Massagers.AvailabilityMassager.VisitMethodDeclaration (ICSharpCode.NRefactory.CSharp.MethodDeclaration methodDeclaration) [0x00000] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:35 
  at ICSharpCode.NRefactory.CSharp.MethodDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at Sharpie.Bind.Massagers.AvailabilityMassager.VisitTypeDeclaration (ICSharpCode.NRefactory.CSharp.TypeDeclaration typeDeclaration) [0x00006] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/Massagers/AvailabilityMassager.cs:24 
  at ICSharpCode.NRefactory.CSharp.TypeDeclaration.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitChildren (ICSharpCode.NRefactory.CSharp.AstNode node) [0x00010] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at ICSharpCode.NRefactory.CSharp.DepthFirstAstVisitor.VisitSyntaxTree (ICSharpCode.NRefactory.CSharp.SyntaxTree syntaxTree) [0x00000] in <d13506fb97ad43d4921602b66d9361a9>:0 
  at Sharpie.Bind.DocumentSyntaxTree.AcceptVisitor (ICSharpCode.NRefactory.CSharp.IAstVisitor visitor) [0x00015] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/DocumentSyntaxTree.cs:37 
  at Sharpie.Bind.BindingMassager.Massage (ICSharpCode.NRefactory.CSharp.AstNode astNode, Sharpie.Bind.BindingTarget bindingTarget) [0x00033] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingMassager.cs:136 
  at Sharpie.Bind.BindingFrontend.Bind (Clang.Ast.Decl decl) [0x0010d] in /Users/builder/vsts/_work/2/s/Sharpie.Bind/BindingFrontend.cs:93 
  at Sharpie.BindTool.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl decl) [0x0018d] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:166 
  at Clang.Driver.HandleTranslationUnit (Clang.Ast.TranslationUnitDecl translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:158 
  at Clang.Driver.HandleTranslationUnit (System.IntPtr translationUnit) [0x00000] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:148 
  at (wrapper managed-to-native) Clang.Driver:RunInternal (Clang.Driver,string[],string,Clang.Frontend.DiagnosticConsumer)
  at Clang.Driver.Run (System.String[] inputFiles, System.String[] clangArgs, Clang.Frontend.DiagnosticConsumer diagnosticConsumer) [0x00177] in /Users/builder/vsts/_work/2/s/Clang/Driver.cs:139 
  at Sharpie.ParseTool.Run () [0x005c8] in /Users/builder/vsts/_work/2/s/Sharpie/ParseTool.cs:581 
  at Sharpie.BindTool.CoreRun () [0x00001] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:117 
  at Sharpie.BindTool.Run () [0x00026] in /Users/builder/vsts/_work/2/s/Sharpie/BindTool.cs:95 

Done. Exiting with error code 1.
jingliancui commented 4 years ago

fixed by this thread https://github.com/xamarin/xamarin-macios/issues/7109

dalexsoto commented 4 years ago

Yeah latest objective-sharpie should have the fix for this, closing since this has been fixed!