I have encontered an error while installing watchman on ubuntu 19, can someone give me a solution for this?

Viewed 1634

I have followed the watchman official guide to clone watchman and followed the given commands

$ cd watchman

$ ./autogen.sh

$ ./configure

$ make 

after $ make command its caused a error like following

  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

anybody know what is going on here

1 Answers

Adding these flags to configure (before make) did it for me:

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