【转】Mojave + Xcode 10 build fails on glog config.h, gflags/gflags.h

原文网址:https://stackoverflow.com/questions/50896834/mojave-xcode-10-build-fails-on-glog-config-h-gflags-gflags-h

I'm testing React Native 0.56.0-rc.2 on Mac OS Mojave and Xcode 10.

Running:

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

Which generated some long errors.

Entering Xcode gave me a failure on missing config.h for glog, which I found could be built manually:

cd ./node_modules/react-native/third-party/glog-0.3.4
./configure && make && make install

Which passed that stage, but got me on yet another issue

(...)/node_modules/react-native/third-party/glog-0.3.4/src/glog/logging.h:85:10:
'gflags/gflags.h' file not found

I can't find anything related to RN and this on Google or Stack Overflow, only references to other packages and instructions to install those on a Debian-based system.

Is this a known issue?

Running this from the project directory fixed it for me:

cd ./node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh

This manually triggers the config script

猜你喜欢

转载自www.cnblogs.com/wi100sh/p/12102561.html