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

'glog/logging.h' file not found #22703

Closed
3 tasks done
MoKhajavi75 opened this issue Dec 19, 2018 · 24 comments
Closed
3 tasks done

'glog/logging.h' file not found #22703

MoKhajavi75 opened this issue Dec 19, 2018 · 24 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@MoKhajavi75
Copy link

MoKhajavi75 commented Dec 19, 2018

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz
      Memory: 6.74 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.13.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.58.0-rc.1 => 0.58.0-rc.1
    npmGlobalPackages:
      react-native-cli: 2.0.1

Description

I just tried to create a new project using react-native init --version=react-native@0.58.0-rc.1 for testings about this issue but i face this problem! I guess this is a regression!

Reproducible Demo

  1. react-native init MyTestingProject --version=react-native@0.58.0-rc.1
  2. cd MyTestingProject/ios
  3. open MyTestingProject.xcodeproj
  4. File / Project Settings... / Build System => Legacy Build System / Done
  5. Product / Clean
  6. Product / Clean Build Folder
  7. Build
@EdwardDrapkin
Copy link

Did you try the ole rm -rf ~/.rncache node_modules/react-native/third-party/*?

@MoKhajavi75
Copy link
Author

Did you try the ole rm -rf ~/.rncache node_modules/react-native/third-party/*?

Yep but no result!

@hramos hramos added the Platform: iOS iOS applications. label Dec 19, 2018
@MoKhajavi75
Copy link
Author

MoKhajavi75 commented Dec 29, 2018

Well, i know this is a weird solution but it works!

I edited ../node_modules/react-native/scripts/ios-install-third-party.sh and deleted these lines:

fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""
fetch_and_unpack double-conversion-1.1.6.tar.gz https://github.com/google/double-conversion/archive/v1.1.6.tar.gz 1c7d88afde3aaeb97bb652776c627b49e132e8e0
fetch_and_unpack boost_1_63_0.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz c3f57e1d22a995e608983effbb752b54b6eab741
fetch_and_unpack folly-2016.10.31.00.tar.gz https://github.com/facebook/folly/archive/v2016.10.31.00.tar.gz fb8cdf8962d8c9d0c20a150b6ec3b75d1fa50696

then i copied the whole third-party folder from another project which is "react-native": "0.57.7" and its working!

Please consider that i ran ./configure and make in the project of "react-native": "0.57.7" too!

I guess there's a problem in the GitHub files!

@hramos (BTW, Happy New Year 😁 🎉 )

@MoKhajavi75
Copy link
Author

MoKhajavi75 commented Jan 27, 2019

I can confirm this issue is resolved in Xcode 10.1 but exist in Xcode 10

@kelset
Copy link
Contributor

kelset commented Jan 28, 2019

thanks for reporting, I feel that we can close this then.

@kelset kelset closed this as completed Jan 28, 2019
@thecodecafe
Copy link

@MohamadKh75 Using Xcode 10.1 and experiencing this.

@MoKhajavi75
Copy link
Author

🤔🤔🤔
So maybe we should reopen this, @kelset?

@kelset
Copy link
Contributor

kelset commented Feb 1, 2019

I'd prefer to have some repro steps before reopening.

@guruparan
Copy link

guruparan commented Feb 20, 2019

I fixed it by deleting the podlock file and doing a pod install, sharing here so that it might help someone

@sagargondaliya
Copy link

Well, i know this is a weird solution but it works!

I edited ../node_modules/react-native/scripts/ios-install-third-party.sh and deleted these lines:

fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""
fetch_and_unpack double-conversion-1.1.6.tar.gz https://github.com/google/double-conversion/archive/v1.1.6.tar.gz 1c7d88afde3aaeb97bb652776c627b49e132e8e0
fetch_and_unpack boost_1_63_0.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz c3f57e1d22a995e608983effbb752b54b6eab741
fetch_and_unpack folly-2016.10.31.00.tar.gz https://github.com/facebook/folly/archive/v2016.10.31.00.tar.gz fb8cdf8962d8c9d0c20a150b6ec3b75d1fa50696

then i copied the whole third-party folder from another project which is "react-native": "0.57.7" and its working!

Please consider that i ran ./configure and make in the project of "react-native": "0.57.7" too!

I guess there's a problem in the GitHub files!

@hramos (BTW, Happy New Year 😁 🎉 )

You saved my day!!! Thanks

@rainytooo
Copy link

I have solved this problem today
#24990 (comment)

@KushalDesai1
Copy link

I have tried all the above solutions.

config.h & loggin.h files are also generated.

But when I run 'react-native run-ios' in the terminal OR when I build the project from Xcode 10.1, config.h file, logging.h file are somehow deleted.

I don't know what's going on.

How are you guys able to solve everything? I am trying every solution that I possible could since many months.

Please help.

@alouiseq
Copy link

alouiseq commented Jul 7, 2019

@KushalDesai1 I've also encountered this issue and could not get any of the proposed solutions to work. However, I did find one that did. I copied ios-configure-glog.sh from the react-native@0.57.7 project to my current project react-native@0.59. It turns out that in my case it wasn't a corrupted install of glog or double-conversion. The issue was with the following code in the script:

# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

Try removing that if it exists in your current project. Hopefully that works for you.

@RafikiTiki
Copy link

Same issue happened to me after cancelling build in xcode and running it again (xcode v10.2.1, rn 0.59.10). I used Product->Clean Build Folder and puff, it fixed the problem.

@cinder92
Copy link

same issue with RN 0.60.5 and Xcode 3 any update?

@madeinquant
Copy link

Hope this help.

info Fetching system and libraries information...
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
Memory: 680.81 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.8.1 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.10.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
IDEs:
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-macos-cli: 2.0.1

=====================================

  1. rm -rf node_modules/ && yarn cache clean && yarn install
  2. rm -rf ~/.rncache
  3. cd node_modules/react-native/scripts
  4. ./ios-install-third-party.sh (install folly-2016.10.31.00 double-conversion glog)
  5. cd /node_modules/react-native/third-party/glog*
  6. ./configure
  7. Xcode clean (Cmd + Shift + K) and build (react-native run-ios).

@hungdev
Copy link

hungdev commented Aug 24, 2019

thanks @guruparan it works for me.
just delete the podlock file, and run pod install

@thisisablock
Copy link

thisisablock commented Sep 2, 2019

fix here #26300

if you get 'glog/logging.h' the third party libraries are failing to install.
the podspec script launcher is not throwing any error.

if you are on appcenter you need to update the pods on pre-build
https://gist.github.com/thisisablock/b57185cc3657d4e0252960a0bd7cf0a9

@gopherios
Copy link

Just run "ios-configure-glog.sh" from glog dir.

After comment all 4 last lines - fetch_and_unpack ... in "ios-install-third-party.sh"

And run in XCode or rn cli.

@thisisablock
Copy link

@AlexArtisan yep it’s workaround but it didn’t fix the origin. The issue is that the ios-install fails to install glog because it’s calling the the installer from a wrong workdir. On pod install it not throwing any error because cocoapods sadly is not able to throw an exception here.

But it’s not safe because on every fresh npm install (for example on appcenter) the dependencies are not downloaded and will not be included inside pod install.

@marcin-modestowicz
Copy link

In my case the root cause was the space in "Xcode 10.1" app name. Maybe it will help someone.

@artechventure
Copy link

@marcin-modestowicz Could you tell what space you mean exactly? And how did you fix it?

@marcin-modestowicz
Copy link

@artechventure I installed Xcode in Applications under XCode 10.1 directory (with space) and it broke compilation process. Renaming to XCode10.1 fixed the issue.

@artechventure
Copy link

@marcin-modestowicz thanks. saved my time

@facebook facebook locked as resolved and limited conversation to collaborators Jan 28, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests