2015-09-16 27 views
3

將Aftre更新爲最新的Parse pod(1.8.4)僅當我爲設備構建時纔得到Apple Mac-O鏈接器錯誤。模擬器正常工作更新到Parse 1.8.4 pod後的Apple Mach-O Linker錯誤

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) 
+0

我也看到了這一點。具體而言,問題是直接使用'ParseCrashReporting'而不是'Parse'。我測試過'ParseCrashReporting 1.8.2'(鏈接很好)。 1.8.3和1.8.4似乎對我有這個問題。我已經提交了一個錯誤:https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/271 – levigroker

+0

是的確切我有問題與ParseCrashReporting(1.8.4) 和ParseFacebookUtilsV4(1.8.4) –

回答

2

這是ParseCrashReporting庫的問題。 1.8.2版本沒有這個問題。撰寫本文時,問題出現在1.8.3,1.8.4和1.8.5(當前)。

如果您可以從6.4升級到Xcode 7,則不會出現此問題。

如果您仍然必須使用6.4,它似乎與將Pods.xcconfig包含在測試目標中以及構建設備時相關。

特別地,接頭錯誤是:

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) 

這些都是關係到libParseCrashReportingLib.a

我已提出一個問題與解析這裏https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/271,其中包括一個鏈接到一個示例項目,以重現。然而,步驟很簡單:

  1. 在Xcode中6.4創建一個新的單一視圖的iOS應用程序項目。
  2. 創建Podfile包括ParseCrashReporting

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

  4. 打開結果xcworkspace並添加Pods.xcconfig到測試目標。 configuration screenshot
  5. 構建設備
  6. 構建失敗,出現以上針對測試目標的鏈接器錯誤。
-1

請查看findObjectsInBackgroundWithBlock方法的簽名。將AnyObject更改爲PFObject應該可以做到。

+0

更新到Xcode 7已修復問題 –

+0

@Gomines我不知道你在說什麼......'PFQuery.h'是其中' - (void)findObjectsInBackgroundWithBlock:(PF_NULLABLE PFQueryArrayResultBlock)block;'是聲明的。沒有定義「AnyObject」符號。另外,至少在我的情況下,至少在我的情況下,所有鏈接器錯誤都是'libParseCrashReportingLib.a'中的重複符號_llvm.cmdline(不是'Parse'(PFQuery'已定義,但在ParseCrashReporting'庫中)。 。 – levigroker