lua-zmq icon indicating copy to clipboard operation
lua-zmq copied to clipboard

installation error on Ubuntu14.04 LTS

Open yf13 opened this issue 10 years ago • 11 comments
trafficstars

Hi,

I have zeromq 4.1.2 installed under "/usr/local/" folder and C and Python samples already working.

Then I installed lua packages:

[u@ubuntu:~]$ dpkg -l | fgrep lua | awk '{print $1,$2}'
ii liblua5.1-0:amd64
ii liblua5.1-0-dev:amd64
ii libluajit-5.1-2:amd64
ii libluajit-5.1-common
ii libluajit-5.1-dev:amd64
ii lua5.1
ii lua5.2
ii luajit
ii luarocks

But when I follow the installation guide of this 0MQ Lua binding, I got errors like

[u@ubuntu:~]$ sudo luarocks install lua-zmq
...
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/pre_generated-zmq.nobj.c -o src/pre_generated-zmq.nobj.o -I/usr/local/include
src/pre_generated-zmq.nobj.c: In function ‘simple_zmq_send’:
src/pre_generated-zmq.nobj.c:1966:3: error: too few arguments to function ‘zmq_send’
   err = zmq_send(sock, &msg, flags);
...
In file included from src/pre_generated-zmq.nobj.c:14:0:
/usr/local/include/zmq.h:355:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len, int flags);
                ^
Error: Build error: Failed compiling object src/pre_generated-zmq.nobj.o

Is there anything wrong?

Regards, yanfeng

yf13 avatar Aug 16 '15 05:08 yf13

I am wondering this is by design since ZeroMQ 4.x was not mentioned in this project's installation guide.... If so, I will close this ticket soon.

Regards, yanfeng

yf13 avatar Aug 16 '15 05:08 yf13

ZeroMQ 4.x is supported as per a335ef06256146637e81e4d034be08c93b6f724b, but it doesn't work with the latest version of ZeroMQ.

JoostvDoorn avatar Apr 20 '16 10:04 JoostvDoorn

I also have trouble trying building lua-zmq with ZeroMQ 4.1.4. It seems that monitor event interface changed in 4.x and that broke bindings (see this and this) In my case, first error to show-up it due to zmq_event_t that doesn't exist any more in zmq headers. So I guess it requires real work to get it ported to 4.1.x.

Regards, Laurent

LoloTheDude avatar Apr 21 '16 09:04 LoloTheDude

Same error while installing on CentOS 7 ("Failed compiling object src/pre_generated-zmq.nobj.o")

arthur-s avatar Feb 08 '17 15:02 arthur-s

It's not compatible with the latest version. You need to:

wget https://github.com/zeromq/zeromq2-x/releases/download/v2.1.11/zeromq-2.1.11.tar.gz && \
    tar -xvf zeromq-2.1.11.tar.gz && cd zeromq-2.1.11 && \
    ./configure && make && \ 
    make install && sudo ldconfig

luarocks install lua-zmq ZEROMQ_LIBDIR=/usr/local/lib ZEROMQ_INCDIR=/usr/local/include

senisioi avatar Apr 21 '17 11:04 senisioi

Any chance for getting support of modern ZMQ?

agladysh avatar Jul 13 '17 10:07 agladysh

lzmq supports ZeroMQ 4.2.x :)

moteus avatar Jul 13 '17 10:07 moteus

This library is not dropin replacement for lua-zmq library.

@moteus The problem is that I have a legacy Lua module that I need to install. And it depends on lua-zmq...

agladysh avatar Jul 13 '17 11:07 agladysh

I think it may be quite easy to write wrapper around lzmq to provide needed API.

moteus avatar Jul 13 '17 12:07 moteus

@moteus I would be very happy to have such a wrapper available ;)

agladysh avatar Jul 13 '17 12:07 agladysh

Wrote wrapper for lzmq to be drop-in replacement for lua-zmq. https://github.com/moteus/lua-lzmq-zmq zthreads module from original lua-zmq also should be compatiabale with this library.

moteus avatar Jul 17 '17 09:07 moteus