Skip to content

Instantly share code, notes, and snippets.

@grenade
Forked from davidmason/install-watchman.bash
Last active June 17, 2020 10:08
Show Gist options
  • Save grenade/5aa3894695ead8f4f840c0bfa6e2be34 to your computer and use it in GitHub Desktop.
Save grenade/5aa3894695ead8f4f840c0bfa6e2be34 to your computer and use it in GitHub Desktop.
To install watchman on Fedora 28, these are all the hoops I had to jump through.
# The following packages are needed during `make`
# - openssl-devel so you don't get:
# ContentHash.cpp:13:10: fatal error: openssl/sha.h: No such file or directory
# - redhat-rpm-config so you don't get:
# gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
# - python-devel so you don't get:
# pywatchman/bser.c:31:10: fatal error: Python.h: No such file or directory
sudo dnf install openssl-devel redhat-rpm-config python-devel libtool
# The rest is just instructions from
# https://codeyarns.com/2015/02/10/how-to-install-and-use-watchman/
git clone https://github.com/facebook/watchman.git ~/git/facebook/watchman
cd ~/git/facebook/watchman
./autogen.sh
./configure --enable-lenient
make
sudo make install
sudo bash -c 'echo 524288 > /proc/sys/fs/inotify/max_user_watches'
sudo bash -c 'echo 524288 > /proc/sys/fs/inotify/max_queued_events'
sudo bash -c 'echo 524288 > /proc/sys/fs/inotify/max_user_instances'
watchman shutdown-server
@KevinAtSesam
Copy link

On Fedora 30:

make  all-am
make[1]: Entering directory '/home/kevin/Projects/watchman'
  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[1]: *** [Makefile:4445: scm/watchman-Mercurial.o] Error 1
make[1]: Leaving directory '/home/kevin/Projects/watchman'
make: *** [Makefile:1263: all] Error 2

You also need make, gcc, and g++, althought that is more common to have.

Copy link

ghost commented Dec 9, 2019

On Fedora 31:

Error: Unable to find a match: libdouble-conversion-dev libssl-dev libboost-all-dev libevent-dev libgoogle-glog-dev libkrb5-dev libsnappy-dev libsasl2-dev libnuma-dev libcurl4-gnutls-dev libpcap-dev libdb5.3-dev python-dev

@hasbifadilah
Copy link

hasbifadilah commented Jan 14, 2020

@sorinnnn follow this step : https://facebook.github.io/watchman/docs/install.html#buildinstall

and use stable version of watchman
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1

@fpauser
Copy link

fpauser commented Feb 12, 2020

I also stumbled across build errors - ./configure --enable-lenient fixed it for me! (using Fedora 31)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment