首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cocoapods 0.39.0推送podspec时链接器错误

Cocoapods 0.39.0推送podspec时链接器错误
EN

Stack Overflow用户
提问于 2015-11-30 09:39:42
回答 2查看 824关注 0票数 1

当试图推动最新的集群podspec时,链接出现故障。规范不变,但Cocoapods被更新为0.39.0。毫无疑问,Xcode也发生了变化,这可能是罪魁祸首,但我无法解释错误。

代码语言:javascript
复制
 -> Ensembles (1.4.3)
- ERROR | [Ensembles/Dropbox] xcodebuild: Returned an unsuccessful exit code.
- NOTE  | [Ensembles/Dropbox] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)
- NOTE  | [iOS] [Ensembles/Dropbox] xcodebuild:  fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/i386/Ensembles (No such file or directory)
- NOTE  | [iOS] [Ensembles/Dropbox] xcodebuild:  error: cannot parse the debug map for "/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator/Ensembles.framework/Ensembles": No such file or directory

我不确定是链接失败导致了其他错误,还是lipo错误导致了链接失败。我找不到更多关于链接器退出故障的信息。

有谁知道是什么原因造成的,以及解决办法是什么?

更新

我确实找到了我认为的根本错误:

Ld /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles normal x86_64 cd /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/Pods export IPHONEOS_DEPLOYMENT_TARGET=6.0 ... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk -L/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator -F/var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Release-iphonesimulator -filelist /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles.LinkFileList -install_name @rpath/Ensembles.framework/Ensembles -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -mios-simulator-version-min=6.0 -Xlinker -objc_abi_version -Xlinker 2 -framework CoreData -fobjc-arc -fobjc-link-runtime -framework CoreData -framework Foundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles_dependency_info.dat -o /var/folders/73/p30wh95r8xjgmv001s6rxw080000gr/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Ensembles.build/Objects-normal/x86_64/Ensembles ld: warning: embedded dylibs/frameworks only run on iOS 8 or later Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_DBRestClient", referenced from: objc-class-ref in CDEDropboxCloudFileSystem.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

看起来Cocoapods正在尝试创建一个动态库,但这在某种程度上不适用于iPhone模拟器体系结构中的旧Dropbox库。有人知道这方面的变化,也许是防止Cocoapods使用动态库的一种方法吗?

EN

回答 2

Stack Overflow用户

发布于 2015-11-30 19:06:52

我发现了问题: Cocoapods似乎已经开始构建动态框架,而不是默认的静态库。显然,连接到我正在使用的旧Dropbox吊舱是一个问题。

要使用静态库,只需将--use-libraries传递给正在运行的pod trunk pushpod lib lint命令。

票数 0
EN

Stack Overflow用户

发布于 2016-09-03 09:18:57

pod lib lint命令将检查*.podspec文件中的选项。就我而言,问题表现如下:

代码语言:javascript
复制
->  MySDK git:(master) ✗ pod lib lint --allow-warnings
 -> MySDK (0.0.1)
    - WARN  | description: The description is shorter than the summary.
    - ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | [OSX] xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

[OSX]标志显示pod lib lint命令试图根据您的*.podspec文件构建一个项目,但是当在OSX中构建项目时,发生了一些错误。

我的解决方案是在podspec文件中添加s.platform = :ios, "5.0"

在那之后,运行pod lib lint,一切都没问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33995469

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档