Are you trying to build ZeroMQ with libsodium ? You may run into the following issue while trying to configure ZeroMQ where it doesnt detect that you have already installed libsodium.
1 2 3 4 5 6 |
configure: error: Package requirements (libsodium) were not met: No package 'libsodium' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. |
The real issue is that the default libsodium install from source installs the package in /usr/local/ and ZeroMQ doesnt pick itup.
There are a lot of answers on the internet about using --with-libsodium=/usr/local
. This will not work because the ZeroMQ configure script uses pkg-config
(a tool to get information about installed packages to detect libs). That tool depends on finding a file called libsodium.pc ( <package-name>.pc) in a number of directories.
Do this to fix the issue.
Check if pkg-config is indeed picking libsodium
1 2 3 4 |
pkg-config --list-all | grep libsodium [vivek@localhost zeromq-4.1.4]$ pkg-config --list-all | grep libsodium [vivek@localhost zeromq-4.1.4]$ |
It is not picking it up. Try adding the /usr/local/lib/libsodium
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Now try finding libsodium
1 2 |
[vivek@localhost zeromq-4.1.4]$ pkg-config --list-all | grep libsodium libsodium libsodium - A modern and easy-to-use crypto library |
Now ZeroMQ should find it and you are on your way to CURVE heaven.
Hope this helps a few people. We spend quite some time trying to hack the ZeroMQ autoconf process !!