Xcode 15 linking error

Hi, I am getting a linking error when building my app to run against an iOS17 device, using Xcode15. Same project builds and runs fine with Xcode 14 and iOS16. The linking error just says:

clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation)

Not sure what I should try to overcome this. I can't run my app on an iOS17 device. It builds, links and runs just fine on a simulator.

Working now after I added "-ld64" to "Other linker Flags". Thank you @songme

Adding, "-ld64" to "Other linker Flags" worked for me too. Thank you all.

We have same problem.

We had the same problem and adding -ld64 “Other linker flags” fixed in in Xcode 15 beta 2. Thanks!!!

The question is: will adding the -ld64 flag be disturbing once the big is fixed?

will adding the -ld64 flag be disturbing once the big is fixed?

Ultimately you’ll want to remove that flag and switch back to the default of ld_prime [1].

When you add a workaround like this, my general advice is that you make a note to retest on each new beta release of Xcode as they get seeded. Indeed, at least some of the bugs referenced in this thread have been fixed in 15.0b4.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] If history is anything to go by, ld64 support will be removed at some point.

Thanks. adding -ld64 flag also fixed our deploy issue. 👍🏻

But could somebody please explain what this flag is and what it does?

But could somebody please explain what this flag is and what it does?

It disables ld_prime. “What’s ld_prime?”, I hear you ask! Well, I discuss that in An Apple Library Primer.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is this fixed? I can't add "-ld64" to the project settings because CI uses Xcode 14 and Xcode 14 does not recognise the flag.

Is this fixed?

The issue here is that there isn’t a single issue. Xcode 15 includes a new linker and various have discovered various problems with it. With specific details as to what problem you’re hitting, it’s hard to say whether it’s been fixed.

If you want to drive a fix for your specific problem, I encourage you to file a bug with your problem’s details. I offer specific advice on that front in my posts on this thread.

CI uses Xcode 14

Using different Xcode versions at your desk versus in your CI is going to lead to all sorts of weird problems. I strongly recommend that you either move your CI forward or your desk back.

Moreover, I can't go back to Xcode 14 because macOS Sonoma does not work with Xcode 14 anymore.

Indeed. If you decide to move your desk back then you’ll need to go back to macOS 13 as well.

Having said that, it is possible to conditionalise your linker flags such that you apply -ld_classic (note that flag has been renamed) only when building with the latest SDK, and thus with the latest Xcode.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Updating Firebase from 10.2 to 10.16 resolved the issue for me. The previously used BoringSSL-GRPC dependency, which caused the error for me, is now also gone.

I'm using Xcode14.3.1, and added '-ld64' in other linker flags too, but it still gets wrong "library not found for -ld64". Could somebody help me!!!

You can enable Rosetta in Xcode as a destination for the simulators. After enabling these in Product > Destination > Destination Architectures > Show Rosetta Destinations you can choose those in Xcode and the builds start working again.

Xcode 15 linking error
 
 
Q