• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

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

[复制链接]
菜鸟教程小白 发表于 2022-12-11 20:27:26 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

在 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)



Best Answer-推荐答案


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

关于ios - 由于重复符号错误,GoogleAnalytics 无法在 Xcode 10 beta 5 上编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51814145/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap