microsoft / plcrashreporter

Reliable, open-source crash reporting for iOS, macOS and tvOS
Other
2.88k stars 537 forks source link

Xcode 15 build error #284

Closed abdulalim closed 1 year ago

abdulalim commented 1 year ago

Description

While trying build in Xcode 15 beta, the library gives this build error:

Null objc class data for '_OBJCMETACLASS$_PLCrashHostInfo' in '/Users/username/Library/Developer/Xcode/DerivedData/Appname-fcjusjfuhxkoaxgadychxkraboie/Build/Products/Debug-iphoneos/CrashReporter.o'

Repro Steps

  1. Install XCode 15 beta
  2. Try building the project

Details

  1. Which SDK version are you using? Version 4.x.x or 5.x.x
  2. Which OS version did you experience the issue on? iOS 16, iOS 17
  3. Which CocoaPods/Carthage/Xcode version are you using? it's Swift Package Manager
  4. What device version did you see this error on? Were you using an emulator or a physical device? Real devices and simulators all iPhones
  5. What language are you using?
    • [ X] Objective C
    • [ X] Swift
  6. What third party libraries are you using? App center
AvdLee commented 1 year ago

I've been experiencing the same!

AvdLee commented 1 year ago

Alright, so this seems to be related to a new linker introduced in beta 3 of Xcode 15.0. For now, we can solve this by adding -ld64 to the 'Other Linker Flags' build setting. However, it would be great if the new linker supported building this project.

Related: https://github.com/firebase/firebase-ios-sdk/issues/11516

futuretap commented 1 year ago

Seeing the same issue. Filed FB12592304 (ld-prime linker error when building PLCrashReporter).

abdulalim commented 1 year ago

Alright, so this seems to be related to a new linker introduced in beta 3 of Xcode 15.0. For now, we can solve this by adding -ld64 to the 'Other Linker Flags' build setting. However, it would be great if the new linker supported building this project.

Related: firebase/firebase-ios-sdk#11516

Thanks, yes looks this works. But hope it will be fixed soon here

MikhailSuendukov commented 1 year ago

Thank you for contacting us. Apparently this error is in the new version of the linker, so I think that we will wait for this fix in the next versions of XCode.

MikhailSuendukov commented 1 year ago

With the release of XCode 15 beta 5, this linker error has been fixed, so I'm closing this issue. If you have any other questions, feel free to ask them.