【问题标题】:I have encontered an error while installing watchman on ubuntu 19, can someone give me a solution for this?我在 ubuntu 19 上安装 watchman 时遇到错误,有人可以给我一个解决方案吗?
【发布时间】:2020-03-01 19:17:12
【问题描述】:

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

$ 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

有人知道这里发生了什么

【问题讨论】:

    标签: react-native ubuntu watchman


    【解决方案1】:

    添加这些标志来配置(在make 之前)为我做了这件事:

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

    【讨论】:

      猜你喜欢
      • 2022-10-18
      • 2012-08-24
      • 1970-01-01
      • 2021-07-10
      • 2016-07-09
      • 1970-01-01
      • 2022-12-07
      • 1970-01-01
      相关资源
      最近更新 更多