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

Fresh project, pod try 'RealmSwift' fails; also pod install fails. #3985

Closed
ashokds opened this issue Aug 18, 2016 · 13 comments
Closed

Fresh project, pod try 'RealmSwift' fails; also pod install fails. #3985

ashokds opened this issue Aug 18, 2016 · 13 comments
Labels

Comments

@ashokds
Copy link

ashokds commented Aug 18, 2016

Goals

To get a project started with Realm (or SugarRecord).

Expected Results

'pod install' results in successful generation of xcworkspace file.

Actual Results

Getting following error

$ /bin/bash -c  set -e sh build.sh cocoapods-setup
[!] /bin/bash -c 
set -e
sh build.sh cocoapods-setup

(output of pod install --verbose)

pod install --verbose
  Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Realm_101`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-Realm_101Tests`:
  (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-Realm_101UITests`: (``)

Fetching external sources
-> Pre-downloading: `Realm` from `https://github.com/realm/realm-cocoa.git`, branch `master`, submodules `true`
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/realm/realm-cocoa.git
     /var/folders/m3/rrsgdbg16sx4gn19qpy497nrhg335x/T/d20160818-68761-v3payo
     --template= --single-branch --depth 1 --branch master
     Cloning into '/var/folders/m3/rrsgdbg16sx4gn19qpy497nrhg335x/T/d20160818-68761-v3payo'...
     $ /usr/local/bin/git submodule update --init --recursive
     Submodule 'Realm/ObjectStore' (https://github.com/realm/realm-object-store.git) registered for path 'Realm/ObjectStore'
     Cloning into '/private/var/folders/m3/rrsgdbg16sx4gn19qpy497nrhg335x/T/d20160818-68761-v3payo/Realm/ObjectStore'...
     Submodule path 'Realm/ObjectStore': checked out '6a47d44fa8562e1c998eea57ce8a01eea7d11031'
     Submodule 'external/catch' (https://github.com/philsquared/Catch) registered for path 'Realm/ObjectStore/external/catch'
     Submodule 'external/pegtl' (https://github.com/ColinH/PEGTL) registered for path 'Realm/ObjectStore/external/pegtl'
     Cloning into '/private/var/folders/m3/rrsgdbg16sx4gn19qpy497nrhg335x/T/d20160818-68761-v3payo/Realm/ObjectStore/external/catch'...
     Cloning into '/private/var/folders/m3/rrsgdbg16sx4gn19qpy497nrhg335x/T/d20160818-68761-v3payo/Realm/ObjectStore/external/pegtl'...
     Submodule path 'Realm/ObjectStore/external/catch': checked out 'f294c9847272b1b92c5119a6f711e57113b5f231'
     Submodule path 'Realm/ObjectStore/external/pegtl': checked out '3c4128a7e7e1288eb746418ea60c41477358f26a'
 > Running prepare command
   $ /bin/bash -c  set -e sh build.sh cocoapods-setup
[!] /bin/bash -c 
set -e
sh build.sh cocoapods-setup



/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/executable.rb:69:in `execute_command'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/executable.rb:27:in `block in executable'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/pod_source_preparer.rb:66:in `block (2 levels) in run_prepare_command'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/pod_source_preparer.rb:60:in `chdir'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/pod_source_preparer.rb:60:in `block in run_prepare_command'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/pod_source_preparer.rb:59:in `run_prepare_command'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/pod_source_preparer.rb:37:in `prepare!'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:201:in `copy_and_clean'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:158:in `block (2 levels) in uncached_pod'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:156:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:156:in `block in uncached_pod'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:180:in `in_tmpdir'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:152:in `uncached_pod'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/downloader.rb:39:in `download'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/external_sources/abstract_external_source.rb:114:in `block in pre_download'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:84:in `titled_section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/external_sources/abstract_external_source.rb:112:in `pre_download'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:479:in `fetch_external_source'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:455:in `block (2 levels) in fetch_external_sources'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:454:in `each'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:454:in `block in fetch_external_sources'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:453:in `fetch_external_sources'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer/analyzer.rb:73:in `analyze'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:227:in `analyze'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:151:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/user_interface.rb:63:in `section'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:150:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/installer.rb:114:in `install!'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command/install.rb:37:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Steps to Reproduce

Start an empty project using XCode 8 beta 6

Code Sample

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'SugarRecord_101_XCode7' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for SugarRecord_101_XCode7
  pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', :submodules => true

  target 'SugarRecord_101_XCode7Tests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'SugarRecord_101_XCode7UITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

Version of Realm and Tooling

In the CONTRIBUTING guidelines, you will find a script,
which will help determining these versions.

Realm version: 1.0.2

Xcode version: XCode 8 beta 6

iOS/OSX version: El Capitan

Dependency manager + version: Cocoapods 1.0.1

@ashokds
Copy link
Author

ashokds commented Aug 18, 2016

@jpsim Continuing the #1022

@jpsim
Copy link
Contributor

jpsim commented Aug 19, 2016

If you're specifying a custom version of the RealmSwift pod, you'll need to mirror those settings for the Realm pod:

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'SugarRecord_101_XCode7' do
  # Comment this line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for SugarRecord_101_XCode7
  pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', :submodules => true
  pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: 'master', :submodules => true

  target 'SugarRecord_101_XCode7Tests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'SugarRecord_101_XCode7UITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

@jpsim
Copy link
Contributor

jpsim commented Aug 22, 2016

@ashokds did my suggestion work for you?

@ashokds
Copy link
Author

ashokds commented Aug 22, 2016

@jpsim, Just tried the mirrored settings based on podfile edit you did, i.e. use both pods as per your comment. It's not working yet. Same error:

[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup

@jpsim
Copy link
Contributor

jpsim commented Aug 22, 2016

@ashokds, what's the error? sh build.sh cocoapods-setup is a normal part of the installation process.

@raphaelcruzeiro
Copy link

raphaelcruzeiro commented Sep 14, 2016

I have just stumbled upon this issue today. Can't install Realm with CocoaPods anymore:

-> Pre-downloading: `Realm` from `https://github.com/realm/realm-cocoa.git`, submodules `true`
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/realm/realm-cocoa.git /var/folders/dw/xjhttl6x3px6qqq1r184s7z40000gn/T/d20160914-8433-zpl201 --template= --single-branch
     --depth 1
     Cloning into '/var/folders/dw/xjhttl6x3px6qqq1r184s7z40000gn/T/d20160914-8433-zpl201'...
     $ /usr/local/bin/git submodule update --init --recursive
     Submodule 'Realm/ObjectStore' (https://github.com/realm/realm-object-store.git) registered for path 'Realm/ObjectStore'
     Cloning into 'Realm/ObjectStore'...
     Submodule path 'Realm/ObjectStore': checked out '7922710805950c353f00c4ba5146e2ff98aa8aa9'
     Submodule 'external/catch' (https://github.com/philsquared/Catch) registered for path 'external/catch'
     Submodule 'external/pegtl' (https://github.com/ColinH/PEGTL) registered for path 'external/pegtl'
     Cloning into 'external/catch'...
     Submodule path 'Realm/ObjectStore/external/catch': checked out 'f294c9847272b1b92c5119a6f711e57113b5f231'
     Cloning into 'external/pegtl'...
     Submodule path 'Realm/ObjectStore/external/pegtl': checked out '3c4128a7e7e1288eb746418ea60c41477358f26a'
 > Running prepare command
   $ /bin/bash -c  set -e sh build.sh cocoapods-setup
[!] /bin/bash -c
set -e
sh build.sh cocoapods-setup



/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/executable.rb:69:in `execute_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/executable.rb:27:in `block in executable'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/pod_source_preparer.rb:66:in `block (2 levels) in run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/pod_source_preparer.rb:60:in `chdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/pod_source_preparer.rb:60:in `block in run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/pod_source_preparer.rb:59:in `run_prepare_command'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/pod_source_preparer.rb:37:in `prepare!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:202:in `copy_and_clean'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:159:in `block (2 levels) in uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:157:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:157:in `block in uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:181:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/downloader.rb:42:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/external_sources/abstract_external_source.rb:114:in `block in pre_download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:85:in `titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/external_sources/abstract_external_source.rb:112:in `pre_download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/external_sources/downloader_source.rb:13:in `fetch'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:609:in `fetch_external_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:585:in `block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:584:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:584:in `block in fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:583:in `fetch_external_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/analyzer.rb:73:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:236:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:110:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command/update.rb:60:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

@raphaelcruzeiro
Copy link

I have tried to install it both from the master branch and from the Podspecs with no success.

@raphaelcruzeiro
Copy link

Narrowed it down to a Github instability.

@obrhoff
Copy link

obrhoff commented Sep 15, 2016

Fighting with the same issue. Is there somekind of workaround?

@jpsim
Copy link
Contributor

jpsim commented Sep 15, 2016

We've maintained support for Realm Swift across Xcode 8 betas since WWDC, making adjustments to continue compiling and passing tests for Swift 2.2, 2.3 and 3.0 as new betas came out.

However, due to the amount of churn Swift 3 has seen in the last 3 months, we held off on thoroughly reviewing all our Swift 3 API changes and accommodating both Xcode 7.3.1 and Xcode 8 into our continuous integration, testing, docs and release packaging processes.

With Xcode 8 GM last week, we decided to make a push to finalize our Swift 3 APIs along with the other integration points mentioned above.

That work is now mostly complete and we're preparing a 1.1.0 release for tomorrow, at which point our Swift 3 APIs will be final, binaries will be made available for Swift 2.3 and 3.0 in our release zips, and docs will be updated to reflect the new APIs.

Thanks for your patience.
JP

@SandyChapman
Copy link
Contributor

Just started seeing this same issue happen on my build machine. Was working just a couple days ago. Not sure what's wrong.

@DenTelezhkin
Copy link

It's also failing when linting another pod, that depends on Realm.

Here's how dependency looks in podspec: https://github.com/DenHeadless/DTModelStorage/blob/master/DTModelStorage.podspec#L20

And here is Travis CI job, that's failing the lint:
https://travis-ci.org/DenHeadless/DTModelStorage/jobs/160638956

Output from linter:

-> Installing Realm (1.1.0)
 > Git download
 > Git download
     $ /Applications/Xcode.app/Contents/Developer/usr/bin/git clone https://github.com/realm/realm-cocoa.git /var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/d20160917-1857-c2sx0x --template= --single-branch --depth 1 --branch v1.1.0
     Cloning into '/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/d20160917-1857-c2sx0x'...
     Note: checking out '5fbb4ce86b0679c2ced0babd2f1cfaf33f5dd68f'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b <new-branch-name>

     $ /Applications/Xcode.app/Contents/Developer/usr/bin/git submodule update --init --recursive
 > Running prepare command
   $ /bin/bash -c  set -e sh build.sh cocoapods-setup
   sh: build.sh: No such file or directory
 -> DTModelStorage (3.0.0-beta.1)
    - ERROR | [iOS] [DTModelStorage/Realm] unknown: Encountered an unknown error (/bin/bash -c 
set -e
sh build.sh cocoapods-setup
sh: build.sh: No such file or directory

@adriandewitts
Copy link

adriandewitts commented Nov 23, 2016

Workaround can be found here: #4112

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

9 participants