请问关于cocoapod与libffi的问题

请问大家谁用过libffi这个东西,现在发现创建自定义的pod时,libffi无法通过验证(pod spec lint)。目前公司很多项目用到BlocksKit这个库,它本身使用libffi。因此弄得现在无法更新这些项目了。一时找不到解决方案。

以下就是基本的控制台输出:
ricols-MacBook-Pro:MyPodExample ricolwang$ cat MyPodExample.podspec 
Pod::Spec.new do |s|
  s.name         = "MyPodExample"
  s.version      = "0.0.1"
  s.platform     = :ios, "6.1"
  s.summary      = "This is an example to show how to create a cocoapod"
  s.description  = <<-DESC
                   A longer description of MyPodExample in Markdown format.

                   * Think: Why did you write this? What is the focus? What does it do?
                   * CocoaPods will be using this to generate tags, and improve search results.
                   * Try to keep it short, snappy and to the point.
                   * Finally, don't worry about the indent, CocoaPods strips it!
                   DESC
  s.homepage     = "https://bitbucket.org"
  s.license      = { :type => "RMIT", :text => "this is a test!" }
  s.author             = { "Ricol Wang" => "wangxinghe1983@gmail.com" }
  s.source       = { :git => "https://wangxinghe@bitbucket.org/wangxinghe/mypodexample.git", :tag => "0.0.1" }
  s.source_files  = "MyPodExample/MyObject.{h,m}"
  s.requires_arc = true
  s.dependency 'libffi'
end
ricols-MacBook-Pro:MyPodExample ricolwang$ pod spec lint MyPodExample.podspec 

 -> MyPodExample (0.0.1)
    - NOTE  | [xcodebuild]  libffi/ios/src/arm/ffi.c:325:21: warning: ambiguous expansion of macro 'alloca' [-Wambiguous-macro]
    - NOTE  | [xcodebuild]  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/include/alloca.h:39:9: note: expanding this definition of 'alloca'
    - NOTE  | [xcodebuild]  libffi/ios/include/ffi_common.h:24:10: note: other definition of 'alloca'
    - NOTE  | [xcodebuild]  libffi/ios/src/arm/ffi.c:332:21: warning: ambiguous expansion of macro 'alloca' [-Wambiguous-macro]
    - NOTE  | [xcodebuild]  libffi/ios/src/arm/ffi.c:381:26: warning: ambiguous expansion of macro 'alloca' [-Wambiguous-macro]
    - ERROR | [xcodebuild]  libffi/ios/include/ffi_common.h:77:1: error: unknown type name 'ffi_status'
    - ERROR | [xcodebuild]  libffi/ios/include/ffi_common.h:77:33: error: unknown type name 'ffi_cif'
    - ERROR | [xcodebuild]  libffi/ios/include/ffi_common.h:78:1: error: unknown type name 'ffi_status'
    - ERROR | [xcodebuild]  libffi/ios/include/ffi_common.h:78:37: error: unknown type name 'ffi_cif'
    - ERROR | [xcodebuild]  libffi/ios/include/ffi_common.h:84:3: error: unknown type name 'ffi_cif'
    - ERROR | [iOS] [xcodebuild]  libffi/ios/src/debug.c:50:20: error: unknown type name 'ffi_type'

Analyzed 1 podspec.

[!] The spec did not pass validation.
ricols-MacBook-Pro:MyPodExample ricolwang$ 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
如果您想使用pip安装libffi库,可以使用以下命令: pip install libffi 但是,如果您需要下载libffi以及其他依赖库的离线安装包,可以按照以下步骤进行操作: 1. 确保您已经安装了pip,并将其升级到最新版本。 2. 使用以下命令下载所需的依赖库以及libffi库: pip3 download -r requirements.txt -d /tmp/packages/ 这将会将requirements.txt中列出的所有依赖库下载到/tmp/packages/目录中。如果requirements.txt中没有列出libffi库,您可以手动下载该库并将其放入/tmp/packages/目录中。 3. 然后,您可以使用以下命令安装libffi库: pip3 install --no-index --find-links=/tmp/packages/ libffi 这将会从/tmp/packages/目录中安装libffi库,而不是从默认的PyPI源安装。确保替换"/tmp/packages/"为您实际下载的离线安装包的目录路径。 请注意,在安装离线包时,可能会涉及到其他依赖库的安装。如果遇到缺少其他依赖库的情况,您可以手动下载并安装这些依赖库,或者将它们添加到requirements.txt文件中,然后再次运行下载命令。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [离线安装Python3和离线安装第三方模块](https://blog.csdn.net/qq_32613771/article/details/122160440)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值