Skip to content

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

Closed
@WesSouza

Description

@WesSouza

Environment

Scanning folders for symlinks in .../node_modules (21ms)

  React Native Environment Info:
    System:
      OS: macOS 10.14
      CPU: x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
      Memory: 1.00 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.3.0 - /usr/local/bin/node
      Yarn: 1.7.0 - /usr/local/bin/yarn
      npm: 6.1.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
    IDEs:
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.3.2 => 16.3.2 
      react-native: 0.56.0-rc.2 => 0.56.0-rc.2 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

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.

Reproducible Demo

On macOS Mojave with Xcode 10.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions