`pod update` Folly can't find GLog

#1

Trying to upgrade from Expo 25 to 26, I’ve already changed GLog to glog in the Podfile but pod install is still giving me this error:

~/Documents/Projects/Apollos/ios (upgrade-expo *%) $ pod install
Analyzing dependencies
Pre-downloading: `ExpoKit` from `http://github.com/expo/expo.git`, tag `ios/2.4.4`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] Unable to find a specification for `GLog` depended upon by `Folly`

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
#2

Hey @michael.neeley,

Have you tried the suggested action of running pod repo update and then pod install?

Cheers,
Adam

#3

Yes I have. Here’s the output.

~/Documents/Projects/Apollos/ios (upgrade-expo) $ pod repo update
Updating spec repo `master`
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master fetch origin --progress
  remote: Enumerating objects: 1192, done.        
  remote: Counting objects: 100% (1192/1192), done.        
  remote: Compressing objects: 100% (127/127), done.        
  remote: Total 2285 (delta 1094), reused 1133 (delta 1057), pack-reused 1093        
  Receiving objects: 100% (2285/2285), 307.03 KiB | 7.87 MiB/s, done.
  Resolving deltas: 100% (1501/1501), completed with 527 local objects.
  From https://github.com/CocoaPods/Specs
     c52153374c1..e832ea075f6  master     -> origin/master
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at e832ea075f6 [Add] SlidingDatePicker 0.2.0

CocoaPods 1.7.0.beta.3 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.7.0.beta.3

~/Documents/Projects/Apollos/ios (upgrade-expo) $ pod install
Analyzing dependencies
Pre-downloading: `ExpoKit` from `http://github.com/expo/expo.git`, tag `ios/2.4.4`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] Unable to find a specification for `GLog` depended upon by `Folly`

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
#4

@adamjnav I’m another dev on @michael.neeley team. We resolved this issue by removing the Podfile.lock and running pod install.

#5

@adamjnav @isaachardy …but are still getting this error

~/Documents/Projects/Apollos/ios (upgrade-expo) $ rm Podfile.lock 
~/Documents/Projects/Apollos/ios (upgrade-expo *) $ pod install --repo-update
Updating local specs repositories
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master fetch origin --progress
  remote: Enumerating objects: 62, done.        
  remote: Counting objects: 100% (62/62), done.        
  remote: Compressing objects: 100% (19/19), done.        
  remote: Total 44 (delta 29), reused 36 (delta 22), pack-reused 0        
  From https://github.com/CocoaPods/Specs
     696a6f15def..d005bd35e52  master     -> origin/master
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  master
  $ /usr/local/bin/git -C /Users/michael.neeley/.cocoapods/repos/master reset --hard origin/master
  HEAD is now at d005bd35e52 [Add] VietThucSwift 0.1.4

CocoaPods 1.7.0.beta.3 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.7.0.beta.3

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Pre-downloading: `ExpoKit` from `http://github.com/expo/expo.git`, tag `ios/2.4.4`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `React` from `../node_modules/react-native`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
Removing GLog
Removing boost
Downloading dependencies
Using Amplitude-iOS (3.14.1)
Installing Analytics 3.6.10 (was 3.6.9)
Installing AppAuth 0.95.0 (was 0.92.0)
Using Bolts (1.9.0)
Using Branch (0.14.12)
Using CocoaLumberjack (3.2.1)
Installing Crashlytics 3.12.0 (was 3.10.1)
Using DoubleConversion (1.1.5)
Installing ExpoKit 2.4.4 (was 2.3.3)
Installing FBAudienceNetwork 4.99.3 (was 4.28.0)
Installing FBSDKCoreKit 4.44.1 (was 4.31.1)
Installing FBSDKLoginKit 4.44.1 (was 4.31.1)
Installing FBSDKShareKit 4.44.1 (was 4.31.1)
Installing Fabric 1.9.0 (was 1.7.6)
Installing Folly 2016.09.26.00
Using GPUImage (0.1.7)
Using Google-Mobile-Ads-SDK (7.22.0)
Using GoogleAppUtilities (1.1.2)
Using GoogleAuthUtilities (2.0.2)
Using GoogleMaps (2.2.0)
Using GoogleNetworkingUtilities (1.2.2)
Using GoogleSignIn (3.0.0)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleUtilities (1.3.2)
Using JKBigInteger2 (0.0.5)
Installing React 0.54.2 (was 0.52.0)
Installing boost-for-react-native (1.63.0)
Installing glog (0.3.4)

[!] Error installing glog

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod install --repo-update

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

   CocoaPods : 1.6.1
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.3 (18D109)
       Xcode : 10.2 (10E125)
         Git : git version 2.20.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ d005bd35e52d1d837d92e87c579f2fc5222fded1

### Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

### Podfile

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'newspring' do
  pod 'ExpoKit',
    :git => "http://github.com/expo/expo.git",
    :tag => "ios/2.4.4",
    :subspecs => [
      "Core",
      "CPP",
      "GL"
    ]

  pod 'React',
    :path => "../node_modules/react-native",
    :subspecs => [
      "Core",
      "ART",
      "RCTActionSheet",
      "RCTAnimation",
      "RCTCameraRoll",
      "RCTGeolocation",
      "RCTImage",
      "RCTNetwork",
      "RCTText",
      "RCTVibration",
      "RCTWebSocket",
      "DevSupport",
      "CxxBridge"
    ]
  pod 'yoga',
    :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'DoubleConversion',
    :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec",
    :inhibit_warnings => true
  pod 'Folly',
    :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec",
    :inhibit_warnings => true
  pod 'glog',
    :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec",
    :inhibit_warnings => true


  post_install do |installer|
    installer.pods_project.main_group.tab_width = '2';
    installer.pods_project.main_group.indent_width = '2';

    installer.pod_targets.each do |target|

    if target.pod_name == 'ExpoKit'
      target.native_target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'

        # needed for GoogleMaps 2.x
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= []
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Base/Frameworks'
        config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Maps/Frameworks'
      end
    end


    if ['Amplitude-iOS','Analytics','AppAuth','Branch','CocoaLumberjack','FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit','GPUImage','JKBigInteger2'].include? target.pod_name
      target.native_target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
      end
    end
    # Build React Native with RCT_DEV enabled
    next unless target.pod_name == 'React'
    target.native_target.build_configurations.each do |config|
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
    end

    end
  end
end

### Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/michael.neeley/Documents/Projects/Apollos/ios/Pods/Local Podspecs/glog.podspec.json
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-core-1.6.1/lib/cocoapods-core/specification.rb:568:in `read'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-core-1.6.1/lib/cocoapods-core/specification.rb:568:in `checksum'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader/request.rb:62:in `slug'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader/cache.rb:114:in `path_for_spec'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader/cache.rb:140:in `cached_spec'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader/cache.rb:125:in `cached_pod'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/downloader.rb:42:in `download'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/pod_source_installer.rb:104:in `download_source'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/pod_source_installer.rb:62:in `install!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:426:in `install_source_of_pod'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:377:in `block (2 levels) in install_pod_sources'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:376:in `block in install_pod_sources'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:359:in `each'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:359:in `install_pod_sources'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:189:in `block in download_dependencies'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:188:in `download_dependencies'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:137:in `install!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.
#6

For future Googlers, I got through this error by removing my Podfile.lock and deleting the Pods/ folder, then running pod install again. I also had to downgrade to cocoapods version 1.5.3. Good luck!