Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Clang++ exited with code 1 #211

Open
kklose23 opened this issue Nov 27, 2023 · 4 comments
Open

[iOS] Clang++ exited with code 1 #211

kklose23 opened this issue Nov 27, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@kklose23
Copy link

Describe the bug
When connecting to a remote Mac, attempting the run the application will give the following error:

2>clang: error: linker command failed with exit code 1 (use -v to see invocation)
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.0.8478\targets\Xamarin.Shared.Sdk.targets(1556,3): error : clang++ exited with code 1:
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.0.8478\targets\Xamarin.Shared.Sdk.targets(1556,3): error : ld: in /Users/kklose/Library/Caches/Xamarin/mtbs/builds/Mobile.Project/be694607f184f9d3161d9b97862b6101495b72529aa39a5488a5e6706878b158/C:/Users/kklose/AppData/Local/XamarinBuildDownloadCache/MLKVision-3.0.0/Frameworks/MLKitVision.framework/MLKitVision(aligned_new_bca0ac320467a2457b3e306bfed17856.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/kklose/Library/Caches/Xamarin/mtbs/builds/Mobile.Project/be694607f184f9d3161d9b97862b6101495b72529aa39a5488a5e6706878b158/C:/Users/kklose/AppData/Local/XamarinBuildDownloadCache/MLKVision-3.0.0/Frameworks/MLKitVision.framework/MLKitVision' for architecture arm64
2>C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\17.0.8478\targets\Xamarin.Shared.Sdk.targets(1556,3): error : clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using the new .NET 8 update

@kklose23 kklose23 added the bug Something isn't working label Nov 27, 2023
@Syed-RI
Copy link

Syed-RI commented Nov 30, 2023

Experiencing the same on Mac on Rider

ld: in ~Library/Caches/XamarinBuildDownload/MLImg-1.0.0beta2/Frameworks/MLImage.framework/MLImage(aligned_new_bca0ac320467a2457b3e306bfed17856.o), 
building for iOS Simulator, but linking in object file built for iOS,
file '~/Library/Caches/XamarinBuildDownload/MLImg-1.0.0beta2/Frameworks/MLImage.framework/MLImage' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)``` it seems the nuget doesnt include some native resources for iOS sim? I know its not possible to use the scanner in the sim but that means we cant continue building the project either if we cant build and deploy to simulator. It wasnt an issue with previous releases. Please have a look when u have a sec. Thank you for supporting the community!

@stepkillah
Copy link
Contributor

@JimmyPun610 Maybe it makes sense to migrate iOS implementation to https://developer.apple.com/documentation/vision (similar to this one https://github.com/afriscic/BarcodeScanning.Native.Maui), since it's a bit harder to work with MLKit for iOS

@Syed-RI
Copy link

Syed-RI commented Dec 7, 2023

attaching a repro, this repo will build on VS for Mac, but fails on Rider and VS Code @
MauiAppDotNet8.zip

If you remove the barcode scanner package, it builds everywhere :(

@rolfbjarne
Copy link

The problem is that this NuGet doesn't support the arm64 architecture in the simulator.

See https://github.com/xamarin/xamarin-macios/wiki/.NET-8-release-notes#default-runtimeidentifiers for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants