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

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šŸ‘Ž in `/Users/pareshpatel/Desktop/ReactNativeDemos/reactTutorialApp/node_modules/react-native/third-party/glog-0.3.5ā€™:

  • /configurešŸ‘Ž 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.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 15

Most upvoted comments

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.

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

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 šŸ˜„

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.

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

Same problem, any solution?

@loveaurellu thanks, it solved! o/

Yep @loveaurellu thatā€™s exactly what I did.

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

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)