question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Included GLog.podspec broken on case sensitive file system

See original GitHub issue

Resolution

Fixed in 0.54, update your podfile:

pod 'glog', :podspec => 'node_modules/react-native/third-party-podspecs/glog.podspec'

Original Bug Report

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

Environment: OS: macOS High Sierra 10.13 Node: 8.6.0 Yarn: 1.1.0 npm: 5.3.0 Watchman: 4.9.0 Xcode: Xcode 9.0 Build version 9A235 Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed) react: 16.0.0-alpha.12 => 16.0.0-alpha.12 react-native: ^0.48.2 => 0.48.3

Target Platform: iOS (10.3)

Steps to Reproduce

  1. Place your the source of your react-native based project on a case sensitive file system on macOS (HFS+ or APFS).
  2. Manage your dependencies using cocoapods instead of react-native link.

Here is a minimal Podfile:

platform :ios, '10.3'
inhibit_all_warnings!

target 'MyiOSProject' do
  # React dependencies
  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
  
  # React and its submodules
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge',
    'DevSupport',
    'RCTPushNotification',
    'RCTText',
    'RCTImage',
    'RCTAnimation',
    'RCTNetwork'
  ]
end
  1. pod install

  2. Try to build the resulting xcworkspace using Xcode.

Expected Behavior

When opening the xcworkspace and press build it should build without errors.

Actual Behavior

I get a build error saying .../Pods/Folly/folly/Range.h:33:10: 'glog/logging.h' file not found

screen shot 2017-10-03 at 12 56 07

How to fix

Just fix your supplied GLog.podspec to have spec.name = ‘glog’ instead of spec.name = ‘GLog’. The name of the library is glog not GLog. Because of this misspelling cocoapods names the subdirectory in the Headers folder wrongly and therefore the inclusion error on case sensitive systems.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:18
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

15reactions
sumanlamsalcommented, Apr 19, 2018

If you are using React Native <0.54, you will get the following error:

“The name of the given podspec GLog doesn’t match the expected one glog

Use the following line instead:

#pod ‘GLog’, :podspec => “#{rn_path}/third-party-podspecs/GLog.podspec”

7reactions
yasinugrlcommented, Sep 5, 2018

I get this issue in RN: 0.55.4 and fixed it by:

pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'

Read more comments on GitHub >

github_iconTop Results From Across the Web

Case-sensitive path collisions on case-insensitive file system ...
Solution for windows OS · Open a command prompt as an administrator. · Go to the directory where you intend to clone your...
Read more >
Are pods case sensitive? - Google Groups
Yes, CocoaPods is case sensitive. You may upload it as a new pods, and update the old pods with "deprecated" and "deprecated_in_favor_of" flag....
Read more >
Per-directory case sensitivity and WSL
The Windows NT family of operating systems (including Windows 10) has always had the ability to perform case sensitive file system operations.
Read more >
Git is case-sensitive and your filesystem may not be
I was working on DasBlog Core (an .NET Core cross-platform update of the ASP.NET WebForms-based blogging software that runs this blog) with ...
Read more >
Realm: Create reactive mobile apps in a fraction of the time
Run pod repo update to make CocoaPods aware of the latest available Realm versions. In your Podfile, add pod 'Realm' to your app...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found