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

Compile error: strip exited with code 139 #3620

Open
tipa opened this issue Sep 20, 2024 · 19 comments
Open

Compile error: strip exited with code 139 #3620

tipa opened this issue Sep 20, 2024 · 19 comments
Labels

Comments

@tipa
Copy link

tipa commented Sep 20, 2024

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.8

OS

iOS

SDK Version

4.10.2

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Install Xcode 16 using Xcodes
  2. Set Xcode 16 active (sudo xcode-select -s /Applications/Xcode-16.0.0.app/Contents/Developer)
  3. Install .NET 8 tools with Xcode 16 support (see here)
  4. Create new iOS app (dotnet new ios)
  5. Add latest Sentry SDK (v4.10.2) from NuGet
  6. dotnet publish

Expected Result

The app builds

Actual Result

Error while building:
/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk.net8.0_18.0/18.0.8287-xcode16/tools/msbuild/iOS/Xamarin.Shared.targets(2848,3): error : strip exited with code 139

This issue has been discussed previously here and a PR was created here (but not accepted yet).

For some reason, I was successful building my app successfully yesterday with the same tooling & Sentry version, but not today. It now consistently fails with every test project if I have the Sentry SDK added to, and it succeeds consistently when I remove it.

@jamescrosswell
Copy link
Collaborator

@tipa do you have your Sentry version pinned? A 4.11.0 release was made a few hours ago.

This is odd though as both the bug and the solution that you linked to seem to be part of a dotnet workload rather than part of Sentry.

@tipa
Copy link
Author

tipa commented Sep 23, 2024

The issue also happens for me with 4.11.0.
I agree that this totally looks like a problem of dotnet or the Apple tooling - I opened this issue because you perhaps could or would want to workaround the issue since since the it can be reproduced so easily and reliably (at least in my dev environment now, with Xcode 16). Perhaps, as more users .NET users update to Xcode 16, more people could be affected. Are you able to reproduce the problem with the steps I provided?

@bitsandfoxes
Copy link
Contributor

There are a couple of new issues regarding Cocoa and Xcode 16 as well so I don't expect this to be the last of our problems.

@bitsandfoxes bitsandfoxes added Bug Something isn't working iOS labels Sep 23, 2024
@jamescrosswell
Copy link
Collaborator

Are you able to reproduce the problem with the steps I provided?

I haven't had a chance to try this yet. I'm a bit nervous about installing XCode 16, at least until we can get all the groundwork in for Sentry working smoothly with net9.0... I'm trying to change as few things as possible, at once.

@tipa
Copy link
Author

tipa commented Sep 23, 2024

@jamescrosswell You can install XCode side-by-side with Xcode 15 - I explained the steps in my first post

@jamescrosswell
Copy link
Collaborator

You like living on the bleeding edge eh @tipa 😜 ?

Thanks for the tip re xcodes.

In this issue it looks like XCode 16 support will come with the net9.0 release in November.

I see in the NSTextList issue that there might be a preview coming in RC2 (~3 weeks away). Once RC2 is available, I'll see if I can reproduce. Even if we can't fix the problem, potentially we can research a workaround.

@dotMorten
Copy link

I'm also seeing this issue is back again with xcode16

@jamescrosswell
Copy link
Collaborator

I'm also seeing this issue is back again with xcode16

Until dotnet/maui supports XCode 16, I think the only practical workaround is to install Xcode 15.4 also/instead.

@dotMorten
Copy link

The latest MAUI workload requires XCode 16

@jamescrosswell
Copy link
Collaborator

The latest MAUI workload requires XCode 16

You mean if you target net9.0? We're working on net9.0 support. For MAUI, in particular, it's pretty challenging so it might take a while... hoping to have a pre-release available shortly after Microsoft release net9.0.

@bitsandfoxes
Copy link
Contributor

We're forced to bump to Xcode 16 in CI now as well: #3635
Microsoft.iOS 18.0.8303 requires Xcode 16.0 or later. See this run

@dotMorten
Copy link

No even for net8

@krobotics
Copy link

I ran into this issue yesterday while trying to run a pipeline on devops (about the time that 18.0.8303 was released) got an error telling me to use xcode 16. This gave the code 139 error. Removing sentry from my code allowed the build on iOS.
I can still build from Visual Studio but have not figure out how to get the pipeline to use xcode 15.4 and Microsoft.iOS.Sdk 17.5.8030.

@jamescrosswell
Copy link
Collaborator

jamescrosswell commented Sep 27, 2024

We're forced to bump to Xcode 16 in CI now as well: #3635
Microsoft.iOS 18.0.8303 requires Xcode 16.0 or later. See this run

Aha - I see a new net8.0 release has been made to support XCode 16 👍🏻

@UsherNet
Copy link

UsherNet commented Sep 30, 2024

Tried to update to latest CommunityToolkit.Maiu with requested updated workload then meant switching to Xcode 16, now facing the same "strip exited with code 139" error, which is preventing new builds from being produced for production. Now at a standstill until we can make sense of what is going on. I've tried different settings but continue to get the error. :(

@angularsen
Copy link

A workaround is to downgrade maui-ios workload by specifying the version:

dotnet workload install maui-ios --version 8.0.402

or if you build MAUI for both iOS and Android:

dotnet workload install maui --version 8.0.402

xamarin/xamarin-macios#19157 (comment)

@bitsandfoxes
Copy link
Contributor

Thanks @angularsen for providing a workaround!

We're working on resolving this as soon as possible.

@bitsandfoxes
Copy link
Contributor

bitsandfoxes commented Oct 1, 2024

Good news is: I cannot reproduce this anymore with the steps provided in the issue description in my local environment.
Bad news is: I don't know what changed. Because there are no changes to the SDK that I'm aware of that could have fixed the issue. Is this just all in the dependencies?

@dotMorten
Copy link

I'm finding the issue occurs randomly. I can often build it at few times and sometimes it fails and others it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Status: Waiting for: Product Owner
Development

No branches or pull requests

7 participants