simple guide for zeromq configuration, my system is Ubuntu 14.04 and Lua 5.2.
Install zeromq
wget https://github.com/zeromq/zeromq3-x/releases/download/v3.2.2/zeromq-3.2.2.tar.gz
tar -zxvf zeromq-3.2.2.tar.gz
cd zeromq-3.2.2
./configure --prefix=/usr/local/zeromq
make -j24
make install
Install lua-zmq
luarocks install dkjson
luarocks install https://raw.github.com/Neopallium/lua-llthreads/master/rockspecs/lua-llthreads-scm-0.rockspec
luarocks install https://raw.github.com/Neopallium/lua-zmq/master/rockspecs/lua-zmq-scm-1.rockspec ZEROMQ_LIBDIR=/usr/local/zeromq/lib ZEROMQ_INCDIR=/usr/local/zeromq/include
luarocks install https://raw.github.com/Neopallium/lua-zmq/master/rockspecs/lua-zmq-threads-scm-0.rockspec
The guide can avoids some compile errors.