Building libzmq with libsodium

Change from ZMQ 4.1: Configure automatically search for libsodium so this is no longer required. If for some reason you want to build it WITHOUT libsodium and you have built and installed it, configure libzmq with "--without-libsodium".


So I am having trouble building / building zeromq using libsodium.

im using msys2 as a shell - specifically mingw32_shell - and zmq 4.1.0 rc1 with libsodium 1.0.1 and mingw-w64 32bit (gcc 4.9.2).

im currently able to compile libsodium like this

cd .../libsodium
bash configure
make
make check
make install

      

and everything is fine, all tests pass and libs and include ends up in / usr / local / folders, which msys2 seems to know about.

then when i try to build zeromq with these commands

cd .../zeromq
bash configure --with-libsodium
make
make check
make install

      

I will never go through the configuration stage as configure returns

checking for sodium_init in -lsodium... no
configure: error: libsodium is not installed.  Install it or don't pass --with-libsodium to configure script

      

I tried the methods suggested in this post - ZeroMQ doesn't point to libsodium - but it fails.

so my question is this: how do I either set the places for zeromq configure to search for libsodium to determine with --with-libsodium, --with-libsodium-include-dir = and --with-libsodium -lib-dir =, or "install" them in a location that the msys2 shell can find?

+3


source to share


1 answer


I assume you've tried this already after the link you provided mentions:

--with-libsodium=/usr/local

      

I tried this and it worked for me. However, I do not recommend this because it is cleaner for MSYS2 if / usr / local is only used for MSYS2 software and not MinGW-w64 software. For MinGW-w64 i686 software, the "right" prefix for "local" is / mingw32 / local



I just added libsodium as a dependency on the zeromq package.

Github MinGW-w64 zeromq PKGBUILD commit e32ae0

I'll ask Alexey to rebuild and repack it tomorrow.

+1


source







All Articles