Completed
Last Updated: 15 Nov 2023 08:59 by ADMIN
Release 6.5.0
Julius
Created on: 07 Sep 2023 10:00
Category: UI for .NET MAUI
Type: Bug Report
6
clang++ exited with code 1 error in TelerikUI.a when building for iOS Arm64 simulator

Error clang++ exited with code 1:

ld: in /Users/.../Library/Caches/Xamarin/mtbs/builds/SDKBrowserMaui/.../obj/x64/Debug/net7.0-ios/iossimulator-arm64/linker-cache/TelerikUI.a(TKChartAnnotation.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../Library/Caches/Xamarin/mtbs/builds/SDKBrowserMaui/.../obj/x64/Debug/net7.0-ios/iossimulator-arm64/linker-cache/TelerikUI.a'

clang: error: linker command failed with exit code 1 (use -v to see invocation) SDKBrowserMaui C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7089\targets\Xamarin.Shared.Sdk.targets 1274

 

Steps to reproduce:

Run the SDKBrowser example from the Telerik UI for .NET MAUI 6.1.0 package following this instruction: https://www.telerik.com/blogs/running-ios-simulator-windows-net-maui

The paired Mac needs to have an Apple silicon (M1 or M2) chip.
10 comments
ADMIN
Didi
Posted on: 07 Nov 2023 17:26

The status of the item is In Development. When the fix is available the status will be changed. 

If passing testing the fix is expected in the next release - scheduled for the middle of November 2023.

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Chris
Posted on: 07 Nov 2023 17:21

For me, this did not work.

<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'"> <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE> </PropertyGroup>

I had to add the

<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>

This is a workaround, when is there going to be a fix?

ADMIN
Didi
Posted on: 28 Sep 2023 12:46

Workarounds for net 8:

1. Edit the csproj with the following:

<PropertyGroup Condition="'$(TargetFramework)'=='net8.0-ios'">
      <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
</PropertyGroup>

If this does not help when remove the force simulator and add runtime identifier: 

 

<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>

 

2. Another option is to use the .NET MAUI CLI: https://learn.microsoft.com/en-us/dotnet/maui/ios/cli   and execute the following command: 

 

dotnet build -t:Run -f net8.0-ios -p:_DeviceName=:v2:udid=your_device_id_number_here -p:runtimeidentifier="iossimulator-x64"

 

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
ADMIN
Didi
Posted on: 19 Sep 2023 07:45

Hello Sascha,

Thank you for the update and shared resources.

I am glad to hear the suggested workaround by Nico was of help. I can assure you the team is researching this and when there is an update it will be addressed in the item.

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Sascha
Posted on: 18 Sep 2023 11:16
Hello Didi,

we came across the same issue, developing on our Win10 machines with VS 2022 17.7.3/4 paired to our Mac Mini (M1) machine and debugging using "Remote Simulator to Windows".

We could resolve the issues for "e_sqlite" and "skiasharp" by updating to latest versions, which added "arm64"-support. The only one that is left is "TelerikUI". 

As a workaround for now we use the "<ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>"-flag, as already mentioned by Nico.

Doing research, I came across this thread, which might be helpfull (or at least give ideas what to look for?) for adding a "arm64"-support to libraries:
https://developer.apple.com/forums/thread/666335 

Hope it helps.

Would be great if you guys could add "arm64"-support soon as well.

Kind regards,
Sascha
ADMIN
Didi
Posted on: 13 Sep 2023 10:31

Hello all,

I have changed the bug report status to Unplanned. The issue is an issue in the native TelerikUI dll. The dll is not build for arm64 architecture. This is the reason why the exception occurs. 

Nico, thank you for the provided links and workaround. Regarding to the Skia Sharp issue, they provided a support for arm64 in version 2.88.4 https://github.com/mono/SkiaSharp/pull/2468 If you do not use this version in the app update to it. 

Julius, thank you for the provided details. Could you please share whether the suggested workaround from Nico fixed the behavior on your side? Looking forward to your reply. 

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com
Nico
Posted on: 11 Sep 2023 17:55
<PropertyGroup Condition="'$(TargetFramework)'=='net7.0-ios'">

   <ForceSimulatorX64ArchitectureInIDE>true</ForceSimulatorX64ArchitectureInIDE>
</PropertyGroup>

 

... :-)

Nico
Posted on: 11 Sep 2023 07:51

same here with 6.1.0

6.0.0 is giving erros too, but different

1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7098\targets\Xamarin.Shared.Sdk.targets(1274,3): error : clang++ exited with code 1:
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7098\targets\Xamarin.Shared.Sdk.targets(1274,3): error : ld: building for iOS Simulator, but linking in dylib built for iOS, file '/Users/../Library/Caches/Xamarin/mtbs/builds/../4120c1027d393bac872f57364a3ca621e039d991c7b68d66ae3b9f2fe97dbae1/C:/Users/../.nuget/packages/skiasharp.nativeassets.ios/2.88.1/runtimes/ios/native/libSkiaSharp.framework/libSkiaSharp' for architecture arm64
1>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\16.4.7098\targets\Xamarin.Shared.Sdk.targets(1274,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)
1>    9 Warning(s)

 

not me, but look at this:

https://github.com/dotnet/maui/issues/17236#issuecomment-1712735667

 

if I remember correctly it startet using VS 17.7.1 or 17.7.2

Julius
Posted on: 08 Sep 2023 09:15

Hello Didi,

I can't test version 6.0.0 because I don't have access to it. I can only download the latest version.

I don't have a Mac with an Intel chip, but I'm pretty sure it would work.

Building on a physical Mac works just fine, as VS for Mac on a M2 chip defaults to the x64 simulator running on Rosetta.

When building on a paired Mac with iossimulator-x64 specified as the RuntimeIdentifier it works as well, but I have to use hacks to make the VS MAUI tooling work, and the feature 'Remote Simulator to Windows' doesn't work.
ADMIN
Didi
Posted on: 07 Sep 2023 11:21

Hello Julius,

Could you please share whether the behavior occurs with Telerik .NET MAUI 6.0.0 version? Whether the behavior happens only when mac chip is M1 or M2, not intel? I am asking these questions as with Telerik 6.1.0 version we have added support for .NET 8 preview and somehow the behavior could be related to this. 

In addition, I am not using remote mac for building iOS applications. I am using physical mac machine and using VS for Mac or .NET CLI to build for iOS, Android and MacCatalyst. I cannot reproduce issues when building on physical mac. 

Looking forward to your reply.

Regards,
Didi
Progress Telerik

A brand new .NET MAUI course was just added to the Virtual Classroom. The training course is developed to help you get started with the Telerik UI for .NET MAUI components and features. It aims to put you in the shoes of an engineer who adds new features to an existing application. You can check it out at https://learn.telerik.com