-
Notifications
You must be signed in to change notification settings - Fork 518
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
MAUI ios application build fails with clang error code 137 #21649
Comments
Issue moved from dotnet/maui#25607
From @similar-issues-ai[bot] on Wednesday, October 30, 2024 12:56:49 PM We've found some similar issues:
If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.
|
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Wednesday, October 30, 2024 1:05:46 PM Attached build diagnostic and binary logs. |
Issue moved from dotnet/maui#25607
From @jfversluis on Wednesday, October 30, 2024 2:55:35 PM |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Wednesday, October 30, 2024 3:19:25 PM This is strange, every invocation of Does this also happen if you try with a new project created from a template? |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Friday, November 1, 2024 11:59:25 AM Hello, When building the same project from visual studio I get a different error complaining about missing install_name_tool. Attached the build log from vs visual_studio_build_log.zip |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Monday, November 4, 2024 5:49:51 PM @Abhirasmanu-Trimble do you have this file on your Mac:
and if you do, can you try deleting it to see if that fixes the problem? |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Monday, November 4, 2024 6:22:42 PM Hello @rolfbjarne, I do not have this file on my mac. |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Tuesday, November 5, 2024 11:24:26 AM @Abhirasmanu-Trimble can you run the following in a terminal on your Mac, and paste the output here: xcode-select -p
sudo xcode-select -s /Applications/Xcode.app and then try again? |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Tuesday, November 5, 2024 12:34:51 PM Hi @rolfbjarne, I still get the same clang error in build |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Tuesday, November 5, 2024 4:07:12 PM @Abhirasmanu-Trimble does the project build if you build it from the command line on the Mac? If not, can you attach the corresponding binlog? |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Wednesday, November 6, 2024 11:16:34 AM @rolfbjarne , the build does work when directly built form mac command line (ssh also works). I could not create binlog or daignostic log since the the parameters are not recognized. Detailed log is seems to be generated automatically (no idea why). I have attached the default msubild.log here.msbuild.zip |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Wednesday, November 6, 2024 6:35:56 PM @Abhirasmanu-Trimble does it still fail from Windows if you try with a new project from a template? |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Thursday, November 7, 2024 8:49:14 AM @rolfbjarne Template project build from windows machine still fails. |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Thursday, November 7, 2024 5:58:05 PM So this looks related to #3931, where Xcode's tooling gets confused because there are multiple versions of Xcode in play. Did you ever have more than one version of Xcode installed, or Xcode installed in any other location that |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Friday, November 8, 2024 7:08:40 PM One of the Macs I used for building the projects has multiple Xcode installations. However, I was able to reproduce the crash on another Mac with a single Xcode installation. Additionally, the issue first appeared on the Mac (which now has multiple Xcode versions) when it only had one Xcode installation. I installed multiple older Xcode versions (15.2 - 15.4) to see if using previous versions could resolve the problem. One additional note : We also have a xamarin ios project which we directly build in the Mac (Sonoma 14.5) and that also has a similar crash. In that case, first "pngcrush" crashed with 137 code. After disabling png optimization I get below error: |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Friday, November 8, 2024 9:23:16 PM
Can you get an MSBuild binlog for this build failure? That might be easier to diagnose, because Windows doesn't enter the picture. |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Monday, November 11, 2024 11:23:47 AM @rolfbjarne Xamarin build logs attached |
Issue moved from dotnet/maui#25607
From @rolfbjarne on Monday, November 18, 2024 9:10:47 AM I'm a bit stumped here, but I have a few more ideas: Can you try to open Xcode, create a new project and build that to see if that works? If it does, try the .NET/Xamarin project again, as sometimes Xcode auto-fixes problems. If it still doesn't work, please zip up and attach this directory from the Mac:
which should contain crash reports for the clang compiler. |
Project created using xcode is working. But the msbuild still fails. My ~/Library/Logs/DiagnosticReports is empty. Does this have to be enabled ? |
No, it doesn't have to be enabled, but it's where crash reports are stored, which makes it even stranger why there aren't any crash reports when clang is clearly crashing. The next step is to gather an extensive log for the system using the Console app: https://support.apple.com/en-in/guide/console/cnsl1012/mac Basically start streaming log messages in the Console app for the Mac, build (and reproduce the build breakage), then stop streaming, save the log and attach it here. |
Hi @PureWeen. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you. |
Issue moved from dotnet/maui#25607
From @Abhirasmanu-Trimble on Wednesday, October 30, 2024 12:56:35 PM
Description
I am unable to publish my application with latest dotnet workload and xcode 16.1. I moved to latest preview version to see if the bug is resolved there, with out much luck. The problem sarted to appear in 8.0.403 also.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.2.24503.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
No response
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
(TaskId:514)
Tool xcrun execution started with arguments: clang -g -mios-version-min=14.2 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.1.sdk -Xlinker -rpath -Xlinker @executable_path/ -Qunused-arguments -x assembler -D DEBUG -o /Users/xamarinbuild/Library/Caches/Xamarin/mtbs/builds/MAUISsiSample/241166cc9d9f5de6b41fd647e763c7a49c7c3831636823dc1d1b3224325db5ac/obj/Release/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/Trimble.Ssi.Core.dll.o -c /Users/xamarinbuild/Library/Caches/Xamarin/mtbs/builds/MAUISsiSample/241166cc9d9f5de6b41fd647e763c7a49c7c3831636823dc1d1b3224325db5ac/obj/Release/net8.0-ios/ios-arm64/nativelibraries/aot-output/arm64/Trimble.Ssi.Core.dll.s
(TaskId:514)
Tool xcrun execution finished (exit code = 137).
The text was updated successfully, but these errors were encountered: