Closed
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:
rm -rf ~/.rncache/
rm -rf $PROJECT/node_modules/react-native/third-party/
- Build on Xcode 9.4, passes. Quit Xcode.
- 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.