watchman: Cannot Build

watchman-ContentHash.o: In function watchman::ContentHashCache::computeHashImmediate(watchman::ContentHashCacheKey const&) const': /home/akhan/watchman/ContentHash.cpp:65: undefined reference to SHA1_Init’ /home/akhan/watchman/ContentHash.cpp:78: undefined reference to SHA1_Update' /home/akhan/watchman/ContentHash.cpp:81: undefined reference to SHA1_Final’ collect2: error: ld returned 1 exit status Makefile:1566: recipe for target ‘watchman’ failed make[1]: *** [watchman] Error 1 make[1]: Leaving directory ‘/home/akhan/watchman’ Makefile:1101: recipe for target ‘all’ failed make: *** [all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

After installing libssl-dev I did ./autogen.sh and ./configure again. make is now working without error.

On Debian Jessie I needed to do all of the following

sudo apt-get install inotify-tools build-essential libssl-dev libcrypto++-dev pkg-config libtool python-dev automake autoconf
cd /tmp
git clone https://github.com/facebook/watchman.git
cd watchman
git checkout v4.9.0  # or whatever is now the latest stable release
./autogen.sh
./configure --enable-statedir=/tmp
sudo make
sudo make install
sudo mv watchman /usr/local/bin/watchman

I’m on Ubuntu 16.04 x64 and am unable to build Watchman.

I’ve installed libssl-dev and libcrypto+±dev as per other suggestions and I’m getting an error identical to @khansamad47 above, with references to SHA1_Init, SHA1_Update, and SHA1_Final. Not sure what I’m missing…

To install Watchman on Ubuntu 18.04 (Budgie) I did:

$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.9.0
$ sudo apt-get install -y autoconf automake build-essential python-dev libtool m4 pkg-config libssl-dev libcrypto++-dev
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && \
echo 999999 | sudo tee -a  /proc/sys/fs/inotify/max_queued_events && \
echo 999999 | sudo tee  -a /proc/sys/fs/inotify/max_user_instances && \
watchman shutdown-server

I am also using Ubuntu 16.04 x64 and when try to run $ make on my terminal I get the errors as

watchman-ContentHash.o: In function `watchman::ContentHashCache::computeHashImmediate(watchman::ContentHashCacheKey const&) const':
/home/anshulmittal/watchman/ContentHash.cpp:65: undefined reference to `SHA1_Init'
/home/anshulmittal/watchman/ContentHash.cpp:78: undefined reference to `SHA1_Update'
/home/anshulmittal/watchman/ContentHash.cpp:81: undefined reference to `SHA1_Final'
collect2: error: ld returned 1 exit status
Makefile:1566: recipe for target 'watchman' failed
make[1]: *** [watchman] Error 1
make[1]: Leaving directory '/home/anshulmittal/watchman'
Makefile:1101: recipe for target 'all' failed
make: *** [all] Error 2

Please help

Same problem (Ubuntu 17.04) I’ve installed libssl-dev, too. In the 4.7.0 version there was not this problem.

UPDATE I installed libcrypto+±dev and it works. I cloned the repository in /opt so I ran all commands as super user.

I am also using Ubuntu 16.04 x64 and when try to run $ make on my terminal I get the errors as

watchman-ContentHash.o: In function `watchman::ContentHashCache::computeHashImmediate(watchman::ContentHashCacheKey const&) const':
/home/anshulmittal/watchman/ContentHash.cpp:65: undefined reference to `SHA1_Init'
/home/anshulmittal/watchman/ContentHash.cpp:78: undefined reference to `SHA1_Update'
/home/anshulmittal/watchman/ContentHash.cpp:81: undefined reference to `SHA1_Final'
collect2: error: ld returned 1 exit status
Makefile:1566: recipe for target 'watchman' failed
make[1]: *** [watchman] Error 1
make[1]: Leaving directory '/home/anshulmittal/watchman'
Makefile:1101: recipe for target 'all' failed
make: *** [all] Error 2

Please help

OMG are you the dude who made the pewdiepie vs t series counter?

Same problem on Ubuntu 17.04 (Zesty Zapus)