Score:1

Error when installing Watchman on Ubuntu 20.04

ng flag

Trying to install Watchman for React Native on a fresh install of Ubuntu 20.04.

I'm using the following steps (but if there's a better way of doing it - or if you can avoid using Watchman altogether I'd be interested to hear) ...

  git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
  cd watchman/
  git checkout 
  ./autogen.sh
  ./configure --without-python --without-pcre --enable-lenient
  make

I get the error shown below during the 'make' step.

I've seen a number of questions related to building watchman but I haven't seen this situation.

tests/integration/cppclient.cpp: In function ‘int main(int, char**)’:
tests/integration/cppclient.cpp:114:12: error: ‘TimedOut’ does not name a type
  114 |    } catch(TimedOut& e) {
      |            ^~~~~~~~
tests/integration/cppclient.cpp:120:12: error: ‘TimedOut’ does not name a type
  120 |    } catch(TimedOut& e) {
      |            ^~~~~~~~
tests/integration/cppclient.cpp:25:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
   25 |   system("rm -f hit");
      |   ~~~~~~^~~~~~~~~~~~~
tests/integration/cppclient.cpp:75:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
   75 |   system("touch hit");
      |   ~~~~~~^~~~~~~~~~~~~
tests/integration/cppclient.cpp:88:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
   88 |   system("rm hit");
      |   ~~~~~~^~~~~~~~~~
make[1]: *** [Makefile:2766: tests/integration/cppclient_t-cppclient.o] Error 1
make[1]: Leaving directory '/home/rshea/src/watchman'
make: *** [Makefile:1264: all] Error 2
in flag
One alternative would be to use [`iwatch`](http://manpages.ubuntu.com/manpages/focal/man1/iwatch.1.html). So long as you’re not watching a million files, it’s a pretty decent tool
Score:1
zw flag

Simply install the same watchman 4.9.0 package from official repository by using below commands (and maybe consult with official guide):

sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install watchman

If you are still sure about compilation - install dependencies and then compile the application using commands below:

sudo apt-get install git build-essential libtool libssl-dev pkg-config

cd ~/Downloads
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
cd watchman
./autogen.sh
./configure --without-python --without-pcre --enable-lenient
make -j$(nproc)
sudo make install
ng flag
Thanks for your reply. In reading the Watchman guide I had misunderstood. I had come to believe that the only way to install a binary release was by this approach https://facebook.github.io/watchman/docs/install.html#linux-and-macos (rather than just using apt). When I tried that approach it gave me problems, hence my attempts to install it manually. I have now used 'apt-get install watchman' and all seems to be well. Thanks again.
Score:0
pt flag

You can use these commands

sudo apt update

Then run

sudo apt -y install watchman

https://installati.one/ubuntu/20.04/watchman/

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.