Duplicate Symbols when building.. PLCrashReporter
nhart12
Posted on
Jan 07 2016
I'm trying to use NewRelic for performance monitoring, but I prefer Raygun for exception reporting. They don't seem to play well together. I'm using: Cocoapods 0.39.0 Xcode 7.2
I keep getting a duplicate symbol errors when building for a device, it works fine on simulator. It looks like HockeySDK was plagued with similar issues for a while until they fixed.
https://github.com/bitstadium/HockeySDK-iOS/issues/190
I think Raygun4iOS needs to have their instance of PLCrashReporter in it's own namespace. There was also a similar issue with NewRelic/Crittercism SDK.
Any help or guidance would be greatly appreciated!
duplicate symbol binaryImageSort in: /Users/me/Documents/Work/Pods/NewRelicAgent/NewReliciOSAgent5.3.4/NewRelicAgent.framework/NewRelicAgent(PLCrashReportTextFormatter.o) /Users/me/Documents/Work/AeroCare/Pods/Raygun4iOS/Raygun4iOS.framework/Raygun4iOS(PLCrashReportTextFormatter.o) ld: 1 duplicate symbol for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Jason Fauchelle
Raygun
Posted on
Jan 07 2016
Hi nhart12,
Thanks for pointing this out. We can take a look into this when working on the next version of Raygun4iOS. We don't have a time frame of when this will be done, but will get back to you once available.
-Jason Fauchelle
nhart12
Posted on
Jan 23 2016
Thanks for taking a look!. I was going to make a pull request for you but I don't see the repo on the mindscapeHQ github https://github.com/MindscapeHQ
Jason Fauchelle
Raygun
Posted on
Feb 01 2016
Hi nhart12,
Please let me know if this is still an issue for you.
I've been looking into this now, but unfortunately haven't been able to reproduce this issue. I can have the latest version of Raygun4iOS and new relic compiling and working fine in the same application. I am also using CocoaPods 0.39.0, and XCode 7.2, and building for the device.
I don't think the cause of this issue is the same as hockey-app, as it looks like that was because of building with XCode 7 beta. The latest version of Raygun4iOS is built with XCode 7.x, though a slightly older version may have been built with the beta.
I don't think the cause of this issue is the same as crittercism either, as that sounds like it's related to being built as a dynamic library, but Raygun4iOS is static.
Raygun4iOS does apply a namespace prefix to PLCrashReporter files.
Currently Raygun4iOS is not open source, but this may change.
Make sure you are using the latest version of Raygun4iOS. Please let me know if this is still an issue for you.
-Jason Fauchelle
nhart12
Posted on
Feb 03 2016
Hi Jason,
Thanks for looking into this so quickly for me. I attached a sample project that replicates the issue. It's just a blank swift application with Raygun and NewRelic installed via CocoaPods. NewRelic needed to be added to the bridging header as per their documentation. Both are initialized in the AppDelegate.swift. It's only failing when attempting to run on the simulator.
Edit: The attachment wouldn't upload so here is a dropbox link: https://www.dropbox.com/s/pk975f71qflh2a5/RaygunNewrelic.zip?dl=0
Jason Fauchelle
Raygun
Posted on
Feb 04 2016
Hi nhart12,
Thanks for sending the repro project, it's been a huge help. I can reproduce the issue now. Some of the symbols are not picking up the prefix. I solved some of them, but the rest are proving to be tricky. I'll continue working on this and let you know how it goes.
-Jason Fauchelle
Jason Fauchelle
Raygun
Posted on
Feb 04 2016
Hi nhart12,
Looks like I've got it all working now. I'll do a bit more testing, and then let you know when a new version is available - should be within a week at most.
-Jason Fauchelle
nhart12
Posted on
Feb 05 2016
Thanks for looking into this so quickly. I appreciate the great support and look forward to the fix!
Jason Fauchelle
Raygun
Posted on
Feb 11 2016
Hi nhart12,
Raygun4iOS v2.2.0 has been released which contains the duplicate symbols fix. Please let me know how it goes.
Feel free to reply back to this post that it's fixed: https://discuss.newrelic.com/t/duplicate-symbols-when-using-crittercismsdk-and-newrelic-for-xcode-7-ios9/31792/2
-Jason Fauchelle
nhart12
Posted on
Feb 11 2016
Awesome, this fixed it Thanks for the help.
Jason Fauchelle
Raygun
Posted on
Feb 11 2016
No worries, great to hear!