ZeroMQ doesn't spot libsodium

Chrisky picture Chrisky · Apr 22, 2014 · Viewed 8.3k times · Source

I'm hoping to get the CurveCP functionality working within ZeroMQ ØMQ. I'm using CentOS as the underlying OS.

After downloading and running ZeroMQ, I've done the usual ./configure, make and sudo make install. Then running make check returned many test passes, but stated:

 libsodium not installed, skipping CURVE test

So sudo yum install libsodium and sudo ldconfig, then make clean, and the commands above. But next time I ran the make check, the CURVE test is skipped, again reporting no libsodium.

Looking at the tests, I see test_security_curve.cpp has #ifndef HAVE_LIBSODIUM and that preprocessor definition appears to be driving the 'no libsodium' skip.

./configure --with-libsodium as per this page reports libsodium is not installed

./configure --with-libsodium=/home/eng/work/libsodium-master --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64 reports libsodium is not installed.

Solution

In order to get this working, installing libsodium via YUM did not give a version of libsodium viable for a zeromq build. It needed a real build of libsodium, which in turn required a recent copy of autoconf.

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
sudo ldconfig  
cd ../libsodium-master
./autogen.sh
./configure
make 
sudo make install
cd ../libzmq-master
sudo ./configure --with-libsodium=/home/eng/work/libsodium-master  --with-libsodium-include-dir=/home/eng/work/libsodium-master/src/libsodium/include --with-libsodium-lib-dir=/usr/lib64
sudo make
make check  
sudo make install

Answer