Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: include of non-modular header inside framework module #3666

Closed
jamesweb1 opened this issue Jun 10, 2015 · 1 comment
Closed

error: include of non-modular header inside framework module #3666

jamesweb1 opened this issue Jun 10, 2015 · 1 comment

Comments

@jamesweb1
Copy link

I have the private repository, and create a .podspec for that. I want to use the repository from the another app so that I run pod install. But It shows the following error:

Command

/Users/james/.rvm/gems/ruby-2.2.1/bin/pod install

Stack

   CocoaPods : 0.37.2
        Ruby : ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
    RubyGems : 2.4.6
        Host : Mac OS X 10.10.3 (14D136)
       Xcode : 6.3.1 (6D1002)
         Git : git version 2.3.2 (Apple Git-55)
Ruby lib dir : /Users/james/.rvm/rubies/ruby-2.2.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ cb025e2d8d38a20b612efc0ae2bd872fcb45afd9

Plugins

cocoapods-deintegrate : 0.2.1
cocoapods-plugins     : 0.4.2
cocoapods-trunk       : 0.6.1
cocoapods-try         : 0.4.5

Podfile

platform :ios, '8.0'
link_with 'simpleApp', 'simpleAppTests'
pod 'myRepositoryName', :git => 'private repository URL'

Error

RuntimeError - unknown file type: /var/folders/kq/9kl_tphs0_dd29zkmxshlt6c0000gp/T/d20150610-6488-1qvh6zx
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1386:in `copy'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:471:in `block in copy_entry'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1497:in `call'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1497:in `wrap_traverse'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:468:in `copy_entry'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:443:in `block in cp_r'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1570:in `block in fu_each_src_dest'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1586:in `fu_each_src_dest0'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:1568:in `fu_each_src_dest'
/Users/james/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/fileutils.rb:442:in `cp_r'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/downloader.rb:42:in `block in download'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/user_interface.rb:140:in `message'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/downloader.rb:40:in `download'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/external_sources/abstract_external_source.rb:108:in `block in pre_download'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/user_interface.rb:80:in `titled_section'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/external_sources/abstract_external_source.rb:106:in `pre_download'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:358:in `fetch_external_source'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:335:in `block (2 levels) in fetch_external_sources'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:334:in `each'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:334:in `block in fetch_external_sources'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/user_interface.rb:59:in `section'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:333:in `fetch_external_sources'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer/analyzer.rb:62:in `analyze'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer.rb:196:in `analyze'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer.rb:114:in `block in resolve_dependencies'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/user_interface.rb:59:in `section'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer.rb:113:in `resolve_dependencies'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/installer.rb:93:in `install!'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/command/project.rb:101:in `run'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/lib/cocoapods/command.rb:46:in `run'
/Users/james/.rvm/gems/ruby-2.2.1@global/gems/cocoapods-0.37.2/bin/pod:44:in `<top (required)>'
/Users/james/.rvm/gems/ruby-2.2.1/bin/pod:23:in `load'
/Users/james/.rvm/gems/ruby-2.2.1/bin/pod:23:in `<main>'
/Users/james/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/Users/james/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

Podspec

Following is my xxx.podspec.json in my private repository:

{
  "name": "myRepositoryName",
  "version": "0.0.1",
  "summary": "skipped",
  "description": "skipped",
  "homepage": "homepage",
  "license": "none",
  "authors": "James",
  "platforms": {
    "ios": "8.0"
  },
  "source": {
    "git": "private repository URL"
  },
  "source_files": "myRepository",
  "libraries": [
    "z",
    "sqlite3"
  ],
  "requires_arc": false,
  "xcconfig": {
    "HEADER_SEARCH_PATHS": "myRepository"
  },
  "dependencies": {
    "ProtocolBuffers-Swift": [
      "~> 1.6"
    ],
    "Alamofire": [
      "~> 1.2"
    ]
  }
}

Actually I cannot pass pod spec lint xxx.podspec.json, it shows the following errors:

 -> myRepository (0.0.1)
    - WARN  | Git sources should specify a tag.
    - WARN  | Git SSH URLs will NOT work for people behind firewalls configured to only allow HTTP, therefore HTTPS is preferred.
    - WARN  | The description is equal to the summary.
    - WARN  | There was a problem validating the URL homepage.
    - ERROR | [iOS] Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  |  <module-includes>:1:9: note: in file included from <module-includes>:1:
    - NOTE  |  Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:3:9: note: in file included from Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:3:
    - ERROR |  myRepository/myRepository/FMDatabase.h:2:9: error: include of non-modular header inside framework module 'myRepository.FMDatabase'
    - NOTE  |  myRepository/myRepository/FMDatabase.h:3:9: note: in file included from myRepository/myRepository/FMDatabase.h:3:
    - ERROR |  myRepository/myRepository/FMResultSet.h:2:9: error: include of non-modular header inside framework module 'myRepository.FMResultSet'
    - NOTE  |  myRepository/myRepository/FMDatabase.h:4:9: note: in file included from myRepository/myRepository/FMDatabase.h:4:
    - ERROR |  myRepository/myRepository/FMDatabasePool.h:10:9: error: include of non-modular header inside framework module 'myRepository.FMDatabasePool'
    - NOTE  |  Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:6:9: note: in file included from Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:6:
    - ERROR |  myRepository/myRepository/FMDatabaseQueue.h:10:9: error: include of non-modular header inside framework module 'myRepository.FMDatabaseQueue'
    - NOTE  |  Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:9:9: note: in file included from Target Support Files/Pods-myRepository/Pods-myRepository-umbrella.h:9:
    - ERROR |  myRepository/myRepository/headers.h:9:10: error: include of non-modular header inside framework module 'myRepository.headers'
    - ERROR |  myRepository/myRepository/headers.h:10:10: error: include of non-modular header inside framework module 'myRepository.headers'
    - NOTE  |  <unknown>:0: error: could not build Objective-C module 'myRepository'
    - WARN  | [iOS] Unable to find a license file

Analyzed 1 podspec.

[!] The spec did not pass validation.

I'm not sure whether something I miss in the config. I think it's the problem I use objective-c(FMDB) and swift in the same time so that it seems not build successfully. Anyone can give me some suggestion or raise a bug?

@jamesweb1 jamesweb1 changed the title Error: unknown file type when using pod install error: include of non-modular header inside framework module Jun 11, 2015
@neonichu
Copy link
Member

FMDB includes SQLite for which the platform SDKs do not provide a Clang module, therefore its headers are classified as "non-modular". See also #3654 for more information on potential workarounds. Make sure to also file a radar with Apple, so that they might provide Clang modules for the whole breadth of the platform SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants