react-native - 我在 ubuntu 19 上安装 watchman 时遇到错误,有人可以给我一个解决方案吗?

标签 react-native ubuntu watchman

我已经按照守望者官方指南克隆守望者并遵循给定的命令

$ cd watchman

$ ./autogen.sh

$ ./configure

$ make 

$ make 命令之后,它导致了如下错误

  CXX      scm/watchman-Mercurial.o
scm/Mercurial.cpp: In constructor ‘watchman::Mercurial::infoCache::infoCache(std::string)’:

scm/Mercurial.cpp:16:40: error: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct watchman::FileInformation’; use assignment or value-initialization instead [-Werror=class-memaccess]

   16 |   memset(&dirstate, 0, sizeof(dirstate));
      |                                        ^

In file included from scm/Mercurial.h:10,
                 from scm/Mercurial.cpp:3:
./FileInformation.h:18:8: note: ‘struct watchman::FileInformation’ declared here
   18 | struct FileInformation {
      |        ^~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:4446: scm/watchman-Mercurial.o] Error 1

谁知道这是怎么回事

最佳答案

将这些标志添加到配置(在 make 之前)为我完成了:

./configure --without-python  --without-pcre --enable-lenient

关于react-native - 我在 ubuntu 19 上安装 watchman 时遇到错误,有人可以给我一个解决方案吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60478843/

相关文章:

javascript - 在 ember-cli 中配置 watchman

javascript - 图标导致 View 中出现间隙 - React Native

javascript - 为什么我在尝试绘制 map 时收到独特的 "key"警告?

gradle - React Native gradlew clean 命令不起作用

ios - 守望者:Library/LaunchAgents/com.github.facebook.watchman.plist 用于写入:不是目录

macos - 如何将守望者触发器的输出定向到 OS X 上的终端而不是守望者日志文件

react-native - 使用 react-navigation 更改状态栏颜色

python-3.x - Python3-tk 已经安装,但是 python3.7 找不到模块 tkinter

oracle - Ubuntu ORA-24960 : the attribute OCI_ATTR_USERNAME is greater than the maximum allowable length of 255

Git卡在状态/添加/提交