react-native - 我在 ubuntu 19 上安装 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
推荐阅读
- c - 不能按字母顺序排列(排序)字符串?
- laravel - 使用 laravel 路由传递数组
- pytorch - 如何有效地从成对距离矩阵中确定邻域?
- r - 如何从 R 中的两个不同数据框中添加两列,其中一列仅具有另一列的唯一值的子集
- angular - @ngrx/effects :在单独的 Angular 库中正确组织效果
- php - 自动完成给出 codeigniter3 404 错误
- node.js - 使用 NodeJS 和 Mongoose 在 EJS 中查询数据
- spring-boot - 使用 spring webflux 和 hystrix 的并发调用
- json - 如何检查 JSON 数据是否与 React js 中的特定字符串匹配?
- finite-automata - 非确定性有限自动机接受和拒绝