watchman builds on Linux require OpenSSL, but isn't clearly stated in the docs

Created on 9 Sep 2017  路  11Comments  路  Source: facebook/watchman

seen on a Ubuntu 14.04.5 LTS build image:

+ make
make: Warning: File `watcher/.deps/watchman-kqueue.Po' has modification time 3.9e+02 s in the future
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /vagrant_data/watchman_build.2017-09-08T22:41:55Z/watchman/missing autoheader)
rm -f stamp-h1
touch config.h.in
make  all-am
make[1]: Entering directory `/vagrant_data/watchman_build.2017-09-08T22:41:55Z/watchman'
make[1]: Warning: File `watcher/.deps/watchman-kqueue.Po' has modification time 3.9e+02 s in the future
  CXX      thirdparty/libtap_a-tap.o
  AR       libtap.a
  CC       thirdparty/wildmatch/wildmatch.o
  AR       libwildmatch.a
  CXX      thirdparty/jansson/libwmanjson_a-dump.o
  CXX      thirdparty/jansson/libwmanjson_a-error.o
  CXX      thirdparty/jansson/libwmanjson_a-load.o
  CXX      thirdparty/jansson/libwmanjson_a-memory.o
  CXX      thirdparty/jansson/libwmanjson_a-pack_unpack.o
  CXX      thirdparty/jansson/libwmanjson_a-strbuffer.o
  CXX      thirdparty/jansson/libwmanjson_a-strconv.o
  CXX      thirdparty/jansson/libwmanjson_a-utf.o
  CXX      thirdparty/jansson/libwmanjson_a-value.o
  AR       libwmanjson.a
  CXX      watchman-ChildProcess.o
  CXX      watchman-ContentHash.o
ContentHash.cpp:13:25: fatal error: openssl/sha.h: No such file or directory
 #include <openssl/sha.h>
                         ^
compilation terminated.
make[1]: *** [watchman-ContentHash.o] Error 1
make[1]: Leaving directory `/vagrant_data/watchman_build.2017-09-08T22:41:55Z/watchman'
make: *** [all] Error 2

however the docs at https://facebook.github.io/watchman/docs/install.html#installing-from-source don't mention this dependency.

Most helpful comment

Running sudo apt install libssl-dev and then manually changing the Makefile to have LIBS = -lpthread -lssl -lcrypto fixed this issue for me. I don't know enough about autogen/configure/etc. to know the more kosher fix.

All 11 comments

I've also been having issues installing Watchman from source on my Mint 18.2 (Ubuntu 16.04 based) installation, due to OpenSSL-related issues. Not sure how to fix it. =(

Running sudo apt install libssl-dev and then manually changing the Makefile to have LIBS = -lpthread -lssl -lcrypto fixed this issue for me. I don't know enough about autogen/configure/etc. to know the more kosher fix.

more discussion on the build issues (vs the doc issue covered in this issue) over here: https://github.com/facebook/watchman/issues/528

I just followed @stephenh way ,, and yes it works for me. I just running sudo apt install libssl-dev without makefile. Thank you

I had the same problem and luckily @stephenh's suggestion helped. However, I got this error instead: util_pcre.c:104: undefined reference to `pcre_free'.

make clean (plus ./autogen.sh && ./configure) fixed that for me, so that make && sudo make install succeeded.

sudo apt install libssl-dev worked for me running Ubuntu 17.10 artful. Also needed to increase the amount of inotify watchers, see...

sudo apt-get install libssl-dev worked for me running Ubuntu server 16.04. @stephenh : Thanks so much.

On CentOS 7 I had to "sudo yum install openssl-devel" to get past this.

In my case I also needed to add python-dev

I just followed @stephenh way on Kali Linux and it's working fine now. I just running sudo apt install libssl-dev.
Thank you!!

Was this page helpful?
0 / 5 - 0 ratings