React-native: glog/logging.h' file not found

Created on 15 Mar 2019  路  15Comments  路  Source: facebook/react-native

Hello Guys i just started to learn about React Native.
Mac OS Mojave (10.14)
Xcode 10.1

  • node --version -> v11.10.0
  • npm --version -> 6.7.0
  • react-native --version
    'react-native-cli: 2.0.1
    react-native: 0.59.1
  • yarn --version -> 1.13.0

I enter below command in my terminal

  • react-native init reactTutorialApp
    then cd reactTutorialApp
  • then react-native run-ios

I also tried it with run from xcode

i also did

  • ./configure for glog-0.3.5 file
    I am getting error like below.
  • /configure:-1: in `/Users/pareshpatel/Desktop/ReactNativeDemos/reactTutorialApp/node_modules/react-native/third-party/glog-0.3.5':
  • /configure:-1: C compiler cannot create executables

  • Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

  • /Users/pareshpatel/Desktop/ReactNativeDemos/reactTutorialApp/node_modules/react-native/third-party/folly-2018.10.22.00/folly/detail/RangeCommon.h:22:10: 'glog/logging.h' file not found

Waiting for help.

Ran Commands Locked Question

Most helpful comment

This happened to me while trying out a new xcode version. I named the new xcode application "Xcode 11" and put it beside the old one. This caused the problem for me.

Naming the new one (Xcode 11) "Xcode" and removing the old one from the Application folder resolved the issue.

All 15 comments


We are automatically closing this issue because it does not appear to follow any of the provided issue templates.

馃憠 Click here if you want to report a reproducible bug or regression in React Native.

Same issue here. Any news?

In my case it was cause by manually interrupting the first react-native run-ios run and then running it again.

I resolved this with rm -rf ./node_modules && yarn && react-native run-ios.

Same issue here. Any news?

did you resolve?
I have the same issue

even I trying this not working too

In my case it was cause by manually interrupting the first react-native run-ios run and then running it again.

I resolved this with rm -rf ./node_modules && yarn && react-native run-ios.


React Native Environment Info

React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
      Memory: 70.13 MB / 8.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - /usr/local/Cellar/node/10.9.0/bin/node
      npm: 6.7.0 - ~/.npm-packages/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.0, 28.0.3
        System Images: android-23 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.1 AI-173.4907809
      Xcode: 10.2/10E125 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.8.6 
      react-native: ^0.59.9 => 0.59.9 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Same problem, any solution?

in my case ./configure && make && make install on glog directory
and make sure your xcode name without space you can check using xcode-select -p
I face issue beacuse i have xcode name with space and it make install failure

hey @VitorBrangioni @ajijoyo, I've added this to my package.json scripts section:

"ios:start": "cd node_modules/react-native/scripts && sudo ./ios-install-third-party.sh && cd third-party/glog-0.3.5/ && sudo ./configure && sudo ../../../scripts/ios-configure-glog.sh && cd ../../../../../ && sudo react-native run-ios --simulator \"iPhone 6s\""

You may have to adapt to your glog version (mine is 0.3.5)

in my case ./configure && make && make install on glog directory
and make sure your xcode name without space you can check using xcode-select -p
I face issue beacuse i have xcode name with space and it make install failure

That's Right.

the solution that worked for me was:
make sure your xcode name without space you can check using xcode-select -p

nothing more just remove space.

thanks @ajijoyo

having this issue with a brand new project using Xcode 10.3, any help?

This happened to me while trying out a new xcode version. I named the new xcode application "Xcode 11" and put it beside the old one. This caused the problem for me.

Naming the new one (Xcode 11) "Xcode" and removing the old one from the Application folder resolved the issue.

Whut? Thank @loveaurellu. Did the same just renamed new XCode to "XCode GM 11" and got this error. Renaming back again to "XCode" and build succeeded :-D

Hmm... hitting the same error. I am indeed also trying to build using Xcode that is named differently.

Yep @loveaurellu that's _exactly_ what I did.

@loveaurellu thanks, it solved! o/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

axelg12 picture axelg12  路  3Comments

DreySkee picture DreySkee  路  3Comments

anchetaWern picture anchetaWern  路  3Comments

TrakBit picture TrakBit  路  3Comments

oney picture oney  路  3Comments