dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.06k stars 1.73k forks source link

IOS Compiling Error #10907

Closed SantosVictorero closed 1 year ago

SantosVictorero commented 1 year ago

Description

Severity Code Description Project File Line Suppression State Error clang++ exited with code 1: Undefined symbols for architecture x86_64: "_gprsharp_convert_clock_type", referenced from: -u command line option "_gprsharp_free", referenced from: -u command line option "_gprsharp_inf_future", referenced from: -u command line option "_gprsharp_inf_past", referenced from: -u command line option "_gprsharp_now", referenced from: -u command line option "_gprsharp_sizeof_timespec", referenced from: -u command line option "_grpcsharp_auth_context_peer_identity_property_name", referenced from: -u command line option "_grpcsharp_auth_context_property_iterator", referenced from: -u command line option "_grpcsharp_auth_context_release", referenced from: -u command line option "_grpcsharp_auth_property_iterator_next", referenced from: -u command line option "_grpcsharp_batch_context_create", referenced from: -u command line option "_grpcsharp_batch_context_destroy", referenced from: -u command line option "_grpcsharp_batch_context XXX.xxx (Apps\XXX.xxx) C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.1271-rc.2-xcode14\targets\Xamarin.Shared.Sdk.targets 1230

Steps to Reproduce

  1. Select IOS Simulator or Device
  2. Rebuild

Link to public reproduction project repository

N/A

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

IOS 14

Did you find any workaround?

No

Relevant log output

Severity    Code    Description Project File    Line    Suppression State
Error       clang++ exited with code 1:
Undefined symbols for architecture x86_64:
  "_gprsharp_convert_clock_type", referenced from:
     -u command line option
  "_gprsharp_free", referenced from:
     -u command line option
  "_gprsharp_inf_future", referenced from:
     -u command line option
  "_gprsharp_inf_past", referenced from:
     -u command line option
  "_gprsharp_now", referenced from:
     -u command line option
  "_gprsharp_sizeof_timespec", referenced from:
     -u command line option
  "_grpcsharp_auth_context_peer_identity_property_name", referenced from:
     -u command line option
  "_grpcsharp_auth_context_property_iterator", referenced from:
     -u command line option
  "_grpcsharp_auth_context_release", referenced from:
     -u command line option
  "_grpcsharp_auth_property_iterator_next", referenced from:
     -u command line option
  "_grpcsharp_batch_context_create", referenced from:
     -u command line option
  "_grpcsharp_batch_context_destroy", referenced from:
     -u command line option
  "_grpcsharp_batch_context XXX.xxx (Apps\XXX.xxx)  C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.0.1271-rc.2-xcode14\targets\Xamarin.Shared.Sdk.targets   1230
SantosVictorero commented 1 year ago

BTW, this app works fine with Android and Windows.

ghost commented 1 year ago

Hi @SantosVictorero. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

lnaie commented 1 year ago

I've just hit this wall with something similar in VS 2022 and VS 2022 preview on macos Monteray. Used the simulator iPhone 14 Pro iOS 16.0 and Andoid Emulator.

/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error : clang++ exited with code 1:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error : Undefined symbols for architecture x86_64:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :   "_xamarin_UIApplicationMain", referenced from:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :      -u command line option
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :   "_xamarin_invoke_conforms_to_protocol", referenced from:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[MessageUI_Mono_MFMailComposeViewControllerDelegate conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[MessageUI_Mono_MFMessageComposeViewControllerDelegate conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[HomeKit_HMAccessorySetupManager conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[GameKit_GKPeerPickerControllerDelegate conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[GameKit_GKPeerPickerController conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[GameKit_Mono_GKSessionDelegate conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       -[Foundation_NSDispatcher conformsToProtocol:] in Microsoft.iOS.registrar.a
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error :       ...
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error : ld: symbol(s) not found for architecture x86_64
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/16.0.523/targets/Xamarin.Shared.Sdk.targets(1222,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)
ghost commented 1 year ago

Hi @SantosVictorero. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

SantosVictorero commented 1 year ago

I have not been able to pair to my Mac either since I updated to Ventura: See https://github.com/dotnet/maui/issues/10979

Also as you can see from my post this is a Grpc issue of .NET Maui and iOS.

I have been using Grpcweb with Blazor WebAssembly without any problems for a while.

Also as I said before, this app works fine with Android and Windows. Although I have not been able to use Windows with authentication do to another issue: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/communication/authentication?tabs=windows

Hopefully all those issues are addressed ASAP.

SantosVictorero commented 1 year ago

Finally I was able to pair to my Mac and I created a repro of this bug at: https://github.com/SantosVictorero/Maui-Practice/tree/master

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

eskaufel commented 1 year ago

Is there any known workaround for this? I understand the implementation of the GRPC library causes this, but it is very problematic not to have any known way to support GRPC in MAUI on macos.

AramMar commented 1 year ago

the same issue in my side, Is there any known workaround for this?

AramMar commented 1 year ago

hi @SantosVictorero, did you find any workaround for this issue?

samhouts commented 1 year ago

@rolfbjarne Any advice here?

rolfbjarne commented 1 year ago

Grpc is deprecated: https://grpc.io/blog/grpc-csharp-future/

Use Grpc.Net.Client instead: https://github.com/grpc/grpc-dotnet

See also https://learn.microsoft.com/en-us/aspnet/core/grpc/?view=aspnetcore-7.0

SantosVictorero commented 1 year ago

hi @SantosVictorero, did you find any workaround for this issue?

Sorry @AramMar, I just saw your post. I never found a workaround, I had to postpone that project.

SantosVictorero commented 1 year ago

Grpc is deprecated: https://grpc.io/blog/grpc-csharp-future/

Use Grpc.Net.Client instead: https://github.com/grpc/grpc-dotnet

See also https://learn.microsoft.com/en-us/aspnet/core/grpc/?view=aspnetcore-7.0 @rolfbjarne, thanks for the late reply! :-)

AramMar commented 1 year ago

thanks for your reply, i am using Grpc.Net.Client, unfortunately the same issue for that one also

rolfbjarne commented 1 year ago

thanks for your reply, i am using Grpc.Net.Client, unfortunately the same issue for that one also

In that case, please file a new issue and provide a test project we can use to reproduce the problem.