在glog config.h,gflags/gflags.h上,Mojave + Xcode 10构建失败

Wes*_*uza 7 gflags glog react-native

我正在Mac OS Mojave和Xcode 10上测试React Native 0.56.0-rc.2.

运行:

react-native init TestProject --version="0.56.0-rc.2"
cd TestProject
npm run start
react-native run-ios
Run Code Online (Sandbox Code Playgroud)

这产生了一些长期错误.

输入Xcode让我失败config.h了glog,我发现可以手动构建:

cd ./node_modules/react-native/third-party/glog-0.3.4
./configure && make && make install
Run Code Online (Sandbox Code Playgroud)

通过那个阶段,但让我接下来的另一个问题

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

我无法在Google或Stack Overflow上找到任何与RN相关的内容,只能参考其他软件包以及在基于Debian的系统上安装这些软件包的说明.

这是一个已知的问题?

NM *_*ker 11

从项目目录运行它为我修复它:

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

这会手动触发配置脚本

  • 你是我的朋友,是未说出口的英雄! (5认同)

Wes*_*uza 2

更新

这是一个已知问题,跟踪如下:

https://github.com/facebook/react-native/issues/19774