ZeroMQ doesn't spot libsodium

依然范特西╮ 提交于 2019-12-09 17:30:04

问题


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

来源:https://stackoverflow.com/questions/23220464/zeromq-doesnt-spot-libsodium

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!