由于重复的符号错误,GoogleAnalytics 无法在 Xcode 10 beta 5 上编译



在Xcode 10 beta 5上构建包含GoogleAnalytics库的项目在链接期间失败,因为GoogleAnalytics库的重复符号错误。

这不是CocoaPods的问题,手动集成GoogleAnalytics也会失败并出现相同的错误。同样的问题也发生在其他二进制分布式库(CardIO,Crashlytics,Fabric(上。根据Apple的链接器工程师的说法,这不是一个错误,而是在Xcode 10 beta 5中修复的错误。该修复程序无法与使用 10b5 之前的旧 Xcode 构建的损坏静态库互操作,在可能的情况下,最佳解决方案是使用较新版本的 Xcode 编译这些库(我在 CardIO 上遇到了同样的问题,并且仅通过使用 Xcode 10b5 重新编译它就成功修复了它(。

由于GoogleAnalytics是闭源的,我无法对它做任何事情。GoogleAnalytics维护者中的任何人都可以使用最新的Xcode重新编译它并分发新版本吗?

https://forums.developer.apple.com/thread/106694 https://github.com/CocoaPods/CocoaPods/issues/7965 https://twitter.com/crashlytics/status/1024359450436685824 https://twitter.com/steipete/status/1024905104191901698

错误日志:

Ld /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Products/Debug-iphoneos/DuplicateSymbolError.app/DuplicateSymbolError normal arm64 (in target: DuplicateSymbolError)
cd /Users/redacted/DuplicateSymbolError
export IPHONEOS_DEPLOYMENT_TARGET=12.0
/Applications/Xcode-10.beta.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode-10.beta.5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -L/Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Products/Debug-iphoneos -L/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries -F/Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Products/Debug-iphoneos -filelist /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Intermediates.noindex/DuplicateSymbolError.build/Debug-iphoneos/DuplicateSymbolError.build/Objects-normal/arm64/DuplicateSymbolError.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=12.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Intermediates.noindex/DuplicateSymbolError.build/Debug-iphoneos/DuplicateSymbolError.build/Objects-normal/arm64/DuplicateSymbolError_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-link-runtime -L/Applications/Xcode-10.beta.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Intermediates.noindex/DuplicateSymbolError.build/Debug-iphoneos/DuplicateSymbolError.build/Objects-normal/arm64/DuplicateSymbolError.swiftmodule -ObjC -lGoogleAnalytics -lsqlite3 -lz -framework CoreData -framework SystemConfiguration -lc++ -weak_framework CoreMedia -weak_framework AudioToolbox -weak_framework Accelerate -weak_framework AVFoundation -weak_framework MobileCoreServices -lPods-DuplicateSymbolError -Xlinker -dependency_info -Xlinker /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Intermediates.noindex/DuplicateSymbolError.build/Debug-iphoneos/DuplicateSymbolError.build/Objects-normal/arm64/DuplicateSymbolError_dependency_info.dat -o /Users/redacted/Library/Developer/Xcode/DerivedData/DuplicateSymbolError-hdngfzrxvqtekrbpcrcqnsfnwsys/Build/Products/Debug-iphoneos/DuplicateSymbolError.app/DuplicateSymbolError
duplicate symbol l022 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUtil.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIError.o)
duplicate symbol l023 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUtil.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIError.o)
duplicate symbol l024 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUtil.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIError.o)
duplicate symbol l066 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAICoreDataUtil.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIHitUtil.o)
duplicate symbol l071 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIHitUtil.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIStringUtil.o)
duplicate symbol l160 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerImpl.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
duplicate symbol l161 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerImpl.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
duplicate symbol l162 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerImpl.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
duplicate symbol l163 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerImpl.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
duplicate symbol l036 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackedViewController.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIEcommercePromotion.o)
duplicate symbol l037 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackedViewController.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIEcommercePromotion.o)
duplicate symbol l038 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIExceptionParser.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIEcommercePromotion.o)
duplicate symbol l039 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIExceptionParser.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIEcommercePromotion.o)
duplicate symbol l129 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIDictionaryBuilder.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUsageTracker.o)
duplicate symbol l130 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIDictionaryBuilder.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAIUsageTracker.o)
duplicate symbol l151 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l152 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l153 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l154 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l155 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l156 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l157 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l158 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
duplicate symbol l159 in:
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAITrackerModel.o)
/Users/redacted/DuplicateSymbolError/Pods/GoogleAnalytics/Libraries/libGoogleAnalytics.a(GAISqlStore.o)
ld: 24 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我自己也有同样的问题。Xcode 10 beta 6(几天前发布(修复了这个问题。

相关内容

  • 没有找到相关文章

最新更新