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

Xcode 10.1 : node_modules/react-native/third-party/glog-0.3.5/src/base/mutex.h:105:10: 'config.h' file not found #22521

Closed
3 tasks done
lmyl opened this issue Dec 5, 2018 · 12 comments
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@lmyl
Copy link

lmyl commented Dec 5, 2018

Environment

React Native Environment Info:
System:
OS: macOS 10.14.1
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 65.37 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.14.1 - /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.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5014246
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.1 => 16.6.1
react-native: 0.57.7 => 0.57.7
npmGlobalPackages:
react-native-cli: 2.0.1

Description

When I use Xcode to build this project, I meet the error('config.h' file not found) .
Follow the steps below to reproduce the problem.

  1. Input react-native init newRN In Terminal.
  2. Use Xcode to build this project.
  3. Problem occurred .
  4. image
  5. 'config.h' file not found
  6. Open node_modules/react-native/third-party/glog-0.3.5/src/ By Finder
  7. 2018-12-05 15 39 56
  8. Then I use Terminal in this project , input cd node_modules/react-native/third-party/glog-0.3.5
  9. input ../../scripts/ios-configure-glog.sh In Terminal
  10. we wait for the command to finish ,we will see this
  11. 2018-12-05 15 45 48
  12. Open node_modules/react-native/third-party/glog-0.3.5/src/ By Finder
  13. 2018-12-05 15 48 12
  14. Open this project By Xcode
  15. 2018-12-05 15 50 24
  16. It seems to have fixed this problem, but don't be happy, it will make you unexpected later.
  17. Clean Xcode and use Xcode to build this project.
  18. The problem still exists.
  19. image
  20. image
  21. Open node_modules/react-native/third-party/glog-0.3.5/src/ By Finder
  22. 2018-12-05 15 57 30
  23. I think this file will be deleted when compiling this project, but this is not what I want. I have read a lot of materials and tried many methods, but I can't solve this problem. I hope everyone can help me solve this problem. Thank you very much!
  24. When I use react-native 0.57.4 , the problem will not happen. I think the latest React Native release includes some bugs.
@hramos hramos added the Platform: iOS iOS applications. label Dec 5, 2018
@Akash35pasupathi
Copy link

same issue ... please give any solutions ... I am using react native upgrade version like react-native v0.57.7

@sunnylqm
Copy link
Contributor

It's weird but this may be caused by white space character in your path. It is a good habit to always avoid special characters like Chinese characters or white spaces in any file/folder/variable naming.

@dzpt

This comment has been minimized.

@hramos

This comment has been minimized.

kelset pushed a commit that referenced this issue Dec 12, 2018
Summary:
Fixes #22521

The current approach has an issue with white spaces when compiling in Xcode 10.1

![space](https://user-images.githubusercontent.com/615282/49782648-07836f80-fd52-11e8-952f-b93f8c593c60.png)

Change back to relative path fixes this issue
Pull Request resolved: #22598

Differential Revision: D13421446

Pulled By: hramos

fbshipit-source-id: 688157b2e951399059cb6c95e2a6ce8d176e9b9c
grabbou pushed a commit that referenced this issue Dec 17, 2018
Summary:
Fixes #22521

The current approach has an issue with white spaces when compiling in Xcode 10.1

![space](https://user-images.githubusercontent.com/615282/49782648-07836f80-fd52-11e8-952f-b93f8c593c60.png)

Change back to relative path fixes this issue
Pull Request resolved: #22598

Differential Revision: D13421446

Pulled By: hramos

fbshipit-source-id: 688157b2e951399059cb6c95e2a6ce8d176e9b9c
@pengcao1
Copy link

I have a resolved this issue in my side, here is the steps:

  1. copy node_modules/react-native/script to node_modules/react-native/glog-0.3.5 or node_modules/react-native/glog-0.3.4
  2. go to node_modules/react-native/glog-0.3.5 to run the ios-install-xxxxx.sh
  3. run ios-configure-xxxx.sh --> this script try to build the glog and genterate some configure file(eg: config.h)
  4. try to build again

@sunnylqm
Copy link
Contributor

@pengcao1 This should already be fixed in 0.57.8. Try that version first. If the issue persists please open a new issue and give more detailed information.

@lmyl
Copy link
Author

lmyl commented Dec 23, 2018

Thank you for your suggestion. After research, I found that I can solve this problem by the following methods.
cd node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd glog-0.3.5 && ./configure && cd ../../../../

@pengcao1
Copy link

@sunnylqm yes, maybe you're right. but, I think nobody would upgrade to 0.57.8 for resolving only this issue. that make risks...

@sunnylqm
Copy link
Contributor

sunnylqm commented Dec 28, 2018

@pengcao1 Patch version is quite safe to update, which I think is a common sense. Otherwise how people fix things? And what do people update for? If not for resolving issues?

@ajijoyo
Copy link

ajijoyo commented Jan 11, 2019

Even on react native 0.57.8 this issue still appear, when successfull ./configure then run react-native run-ios and that config.h suddenly disappear

@sunnylqm
Copy link
Contributor

@ajijoyo Open a new issue with detailed information

@fkalai
Copy link

fkalai commented Jan 18, 2019

check if any folder has a space between the names. For example if your folder of your project is "My Projects" the config.h file can not be regreat when run-ios or run on the Xcode. Also make sure that your command line tools on the Preferences->Locations is the latest Xcode. This works for me perfect

@facebook facebook locked as resolved and limited conversation to collaborators Jan 19, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this issue Jun 17, 2019
Summary:
Fixes facebook#22521

The current approach has an issue with white spaces when compiling in Xcode 10.1

![space](https://user-images.githubusercontent.com/615282/49782648-07836f80-fd52-11e8-952f-b93f8c593c60.png)

Change back to relative path fixes this issue
Pull Request resolved: facebook#22598

Differential Revision: D13421446

Pulled By: hramos

fbshipit-source-id: 688157b2e951399059cb6c95e2a6ce8d176e9b9c
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants