Mile Modic
Mile Modic

Reputation: 91

Apple Mach-O Linker error after updating to Parse 1.8.4 pod

Aftre updating to latest Parse pod (1.8.4) I get Apple Mac-O linker error only when I build for device. Simulator works fine

Ld /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos/ParseCrashReporting.framework/ParseCrashReporting normal arm64
    cd "/Users/mile/Projects/Nanusim Xcode/nanusim_obejctiveC/Nanuism/Pods"
    export IPHONEOS_DEPLOYMENT_TARGET=8.4
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -L/Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos -L/Users/mile/Projects/Nanusim\ Xcode/nanusim_obejctiveC/Nanuism/Pods/ParseCrashReporting -F/Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos -filelist /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Intermediates/Pods.build/Debug-iphoneos/ParseCrashReporting.build/Objects-normal/arm64/ParseCrashReporting.LinkFileList -install_name @rpath/ParseCrashReporting.framework/ParseCrashReporting -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -ObjC -lParseCrashReportingLib -lsqlite3 -lstdc++.6 -lz -framework CFNetwork -framework Foundation -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.4 -framework Bolts -framework CFNetwork -framework Foundation -framework Parse -framework Security -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1.8.4 -Xlinker -dependency_info -Xlinker /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Intermediates/Pods.build/Debug-iphoneos/ParseCrashReporting.build/Objects-normal/arm64/ParseCrashReporting_dependency_info.dat -o /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos/ParseCrashReporting.framework/ParseCrashReporting



ld: 14 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Upvotes: 3

Views: 452

Answers (2)

levigroker
levigroker

Reputation: 2136

This is an issue with the ParseCrashReporting library. Version 1.8.2 does not have this issue. At time of writing, the issue is present in 1.8.3, 1.8.4, and 1.8.5 (current).

If you can upgrade to Xcode 7 from 6.4 this issue does not present itself.

If you still must use 6.4, it appears to be related to including the Pods.xcconfig in the test target, and when building for device.

Specifically, the linker errors are:

duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(GTMLogger.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(GTMLogger.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(HTTPMultipartUpload.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(HTTPMultipartUpload.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(uploader.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(uploader.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(BreakpadController.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(BreakpadController.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(ParseCrashReporting.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(ParseCrashReporting.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReportingAnalytics.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReportingAnalytics.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReport.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReport.o)
ld: 14 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Which are all related to the libParseCrashReportingLib.a

I've filed an issue with Parse here https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/271 which includes a link to a sample project to reproduce it. However, the steps are simple:

  1. In Xcode 6.4 create a new single view iOS application project.
  2. Create a Podfile which includes ParseCrashReporting:

     source 'https://github.com/CocoaPods/Specs.git'
     platform :ios, '8.0'
     pod 'ParseCrashReporting', '~> 1.8'
    
  3. Perform a pod install

  4. Open the resulting xcworkspace and add the Pods.xcconfig to the test target. configuration screenshot
  5. Build for device.
  6. The build fails with the above linker errors for the test target.

Upvotes: 2

Jessy Naus
Jessy Naus

Reputation: 54

Please have a look at the signature from the findObjectsInBackgroundWithBlock method. Change AnyObject to PFObject should do the trick.

Upvotes: -1

Related Questions