Skip to content

Problems with glog (config.h missing) and gflags/gflags.h on Xcode 10 #19772

Closed
@WesSouza

Description

Trying to build the initial React Native project is not working on Xcode 10 on Mojave, tested on two machines and had slightly different issues both while compiling glog.

react-native init TestProject --version="0.56.0-rc.2"
cd TestProject
npm run start
react-native run-ios

Fails because 'config.h' file not found on mutex.h. Manually configuring and making glog from node_modules/react-native/third-party/glog-0.3.4 works, but then fails because 'gflags/gflags.h' file not found.

If I try to compile on Xcode 9.4, it also fails. The only thing that enabled me to build on either was:

  1. rm -rf ~/.rncache/
  2. rm -rf $PROJECT/node_modules/react-native/third-party/
  3. Build on Xcode 9.4, passes. Quit Xcode.
  4. Build on Xcode 10, passes.

It is very unstable though, stops working as soon as I reopen Xcode.


I've tested on another machine and had another issue with glog build:

checking for arm-apple-darwin-gcc... /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch undefined_arch -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk
checking whether the C compiler works... no
configure: error: in `(..._/node_modules/react-native/third-party/glog-0.3.4':
configure: error: C compiler cannot create executables
See `config.log' for more details

config.log: https://pastebin.com/8M4ybuEp

This machine did not have Xcode installed before. I did install the Command Line Utils.

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions