Neopallium / lua-zmq

Lua zeromq2 binding
http://github.com/Neopallium/lua-zmq
MIT License
153 stars 36 forks source link

install on ubuntu 13.10 failed #52

Closed geohuz closed 10 years ago

geohuz commented 10 years ago

my zeromq version: 4.0.4

sudo luarocks install lua-zmq

output: Installing http://luarocks.org/repositories/rocks/lua-zmq-1.1-1.src.rock... Using http://luarocks.org/repositories/rocks/lua-zmq-1.1-1.src.rock... switching to 'build' mode Archive: /tmp/luarocks_luarocks-rock-lua-zmq-1.1-1-8062/lua-zmq-1.1-1.src.rock inflating: lua-zmq-1.1-1.rockspec creating: lua-zmq/ inflating: lua-zmq/CMakeLists.txt inflating: lua-zmq/README.windows.md creating: lua-zmq/cmake/ inflating: lua-zmq/cmake/LuaNativeObjects.cmake creating: lua-zmq/perf/ inflating: lua-zmq/perf/remote_thr.lua inflating: lua-zmq/perf/remote_lat.lua inflating: lua-zmq/perf/local_lat.lua creating: lua-zmq/perf/no_msg/ inflating: lua-zmq/perf/no_msg/remote_thr.lua inflating: lua-zmq/perf/no_msg/remote_lat.lua inflating: lua-zmq/perf/no_msg/local_lat.lua inflating: lua-zmq/perf/no_msg/local_thr.lua inflating: lua-zmq/perf/thread_push_pull.lua inflating: lua-zmq/perf/local_pull.lua inflating: lua-zmq/perf/thread_lat.lua inflating: lua-zmq/perf/remote_multipart.lua inflating: lua-zmq/perf/local_thr.lua inflating: lua-zmq/perf/local_multipart.lua inflating: lua-zmq/perf/thread_thr.lua inflating: lua-zmq/perf/remote_push.lua inflating: lua-zmq/zmq.nobj.lua inflating: lua-zmq/API.md creating: lua-zmq/examples/ inflating: lua-zmq/examples/server_multipart.lua inflating: lua-zmq/examples/publiser.lua inflating: lua-zmq/examples/server.lua inflating: lua-zmq/examples/client.lua inflating: lua-zmq/examples/client_multipart.lua inflating: lua-zmq/examples/ev_subscriber.lua inflating: lua-zmq/examples/subscriber.lua creating: lua-zmq/rockspecs/ inflating: lua-zmq/rockspecs/lua-zmq-threads-1.1-1.rockspec inflating: lua-zmq/rockspecs/lua-zmq-scm-1.rockspec inflating: lua-zmq/rockspecs/lua-zmq-threads-1.0-1.rockspec inflating: lua-zmq/rockspecs/lua-zmq-1.1-1.rockspec inflating: lua-zmq/rockspecs/lua-zmq-threads-scm-0.rockspec inflating: lua-zmq/rockspecs/lua-zmq-1.0-1.rockspec inflating: lua-zmq/README.md creating: lua-zmq/src/ inflating: lua-zmq/src/ctx.nobj.lua inflating: lua-zmq/src/socket.nobj.lua inflating: lua-zmq/src/msg.nobj.lua inflating: lua-zmq/src/error.nobj.lua inflating: lua-zmq/src/pre_generated-zmq.nobj.c inflating: lua-zmq/src/threads.lua inflating: lua-zmq/src/poller.lua inflating: lua-zmq/src/poller.nobj.lua inflating: lua-zmq/src/stopwatch.nobj.lua 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:354:16: note: declared here ZMQ_EXPORT int zmq_send (void s, const void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketsend_msg__meth’: src/pre_generated-zmq.nobj.c:2639:3: error: too few arguments to function ‘zmq_send’ rc_zmq_send1 = zmq_send(this1, msg2, flags3); ^ In file included from src/pre_generated-zmq.nobj.c:14:0: /usr/local/include/zmq.h:354:16: note: declared here ZMQ_EXPORT int zmq_send (void s, const void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketrecv_msg__meth’: src/pre_generated-zmq.nobj.c:2677:3: error: too few arguments to function ‘zmq_recv’ rc_zmq_recv1 = zmq_recv(this1, msg2, flags3); ^ In file included from src/pre_generated-zmq.nobj.c:14:0: /usr/local/include/zmq.h:356:16: note: declared here ZMQ_EXPORT int zmq_recv (void s, void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketrecvmeth’: src/pre_generated-zmq.nobj.c:2701:3: error: too few arguments to function ‘zmq_recv’ err2 = zmq_recv(this1, &msg, flags2); ^ In file included from src/pre_generated-zmq.nobj.c:14:0: /usr/local/include/zmq.h:356: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

The latest version also failed to compile:

sudo luarocks install https://raw.github.com/Neopallium/lua-zmq/master/rockspecs/lua-zmq-scm-1.rockspec Using https://raw.github.com/Neopallium/lua-zmq/master/rockspecs/lua-zmq-scm-1.rockspec... switching to 'build' mode Cloning into 'lua-zmq'... remote: Counting objects: 1186, done. remote: Compressing objects: 100% (449/449), done. remote: Total 1186 (delta 731), reused 1186 (delta 731) Receiving objects: 100% (1186/1186), 356.86 KiB | 45.00 KiB/s, done. Resolving deltas: 100% (731/731), done. Checking connectivity... done 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 ‘lzmq_socket_set_hwm’: src/pre_generated-zmq.nobj.c:4122:30: error: ‘ZMQ_HWM’ undeclared (first use in this function) return zmq_setsockopt(sock, ZMQ_HWM, &val, sizeof(val)); ^ src/pre_generated-zmq.nobj.c:4122:30: note: each undeclared identifier is reported only once for each function it appears in src/pre_generated-zmq.nobj.c: In function ‘lzmq_socket_hwm’: src/pre_generated-zmq.nobj.c:4128:32: error: ‘ZMQ_HWM’ undeclared (first use in this function) int rc = zmq_getsockopt(sock, ZMQ_HWM, &val, &val_len); ^ src/pre_generated-zmq.nobj.c: In function ‘lzmq_socket_set_swap’: src/pre_generated-zmq.nobj.c:4135:30: error: ‘ZMQ_SWAP’ undeclared (first use in this function) return zmq_setsockopt(sock, ZMQ_SWAP, &val, sizeof(val)); ^ src/pre_generated-zmq.nobj.c: In function ‘lzmq_socket_swap’: src/pre_generated-zmq.nobj.c:4141:32: error: ‘ZMQ_SWAP’ undeclared (first use in this function) int rc = zmq_getsockopt(sock, ZMQ_SWAP, &val, &val_len); ^ src/pre_generated-zmq.nobj.c: In function ‘lzmq_socket_set_mcast_loop’: src/pre_generated-zmq.nobj.c:4199:30: error: ‘ZMQ_MCAST_LOOP’ undeclared (first use in this function) return zmq_setsockopt(sock, ZMQ_MCAST_LOOP, &val, sizeof(val)); ^ src/pre_generated-zmq.nobj.c: In function ‘lzmq_socket_mcast_loop’: src/pre_generated-zmq.nobj.c:4205:32: error: ‘ZMQ_MCAST_LOOP’ undeclared (first use in this function) int rc = zmq_getsockopt(sock, ZMQ_MCAST_LOOP, &val, &val_len); ^ src/pre_generated-zmq.nobj.c: In function ‘simple_zmq_send’: src/pre_generated-zmq.nobj.c:4541:3: error: too few arguments to function ‘zmq_send’ err = zmq_sendmsg(sock, &msg, flags); ^ In file included from src/pre_generated-zmq.nobj.c:70:0: /usr/local/include/zmq.h:354:16: note: declared here ZMQ_EXPORT int zmq_send (void s, const void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketsend_msg__meth’: src/pre_generated-zmq.nobj.c:5372:3: error: too few arguments to function ‘zmq_send’ rc_zmq_sendmsg1 = zmq_sendmsg(this1, msg2, flags3); ^ In file included from src/pre_generated-zmq.nobj.c:70:0: /usr/local/include/zmq.h:354:16: note: declared here ZMQ_EXPORT int zmq_send (void s, const void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketrecv_msg__meth’: src/pre_generated-zmq.nobj.c:5415:3: error: too few arguments to function ‘zmq_recv’ rc_zmq_recvmsg1 = zmq_recvmsg(this1, msg2, flags3); ^ In file included from src/pre_generated-zmq.nobj.c:70:0: /usr/local/include/zmq.h:356:16: note: declared here ZMQ_EXPORT int zmq_recv (void s, void buf, size_t len, int flags); ^ src/pre_generated-zmq.nobj.c: In function ‘ZMQ_Socketrecvmeth’: src/pre_generated-zmq.nobj.c:5441:3: error: too few arguments to function ‘zmq_recv’ err2 = zmq_recvmsg(this1, &msg, flags2); ^ In file included from src/pre_generated-zmq.nobj.c:70:0: /usr/local/include/zmq.h:356: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

Neopallium commented 10 years ago

I haven't added support for zmq 4.x yet.

Neopallium commented 10 years ago

Support added for zmq 4.x. Commit a335ef06256146637

pjgofran commented 10 years ago

I receive these same errors still. zmq-4.0.4, lua-zmq-master from today. RHEL6 running the command: luarocks make rockspecs/lua-zmq-scm-1.rockspec

Neopallium commented 10 years ago

Please include the output. I need to see the line numbers of the error messages.

Neopallium commented 10 years ago

sorry I forgot to update the pre-generated source file. Please try again. thanks.

pjgofran commented 10 years ago

Thank you for the quick fix, this is now working for me.

sysnajar commented 9 years ago

Hi there, I was unable to compile it on Debian7.7 I only have Lua5.2 installed (removed 5.1).

Any idea how to overcome the issue ?

Thanks in advance, Owat

here's the compilation log:

:~/lua-zmq/build$ cmake .. -- Configuring done -- Generating done -- Build files have been written to: /home/sysnajar/lua-zmq/build sysnajar@(none):~/lua-zmq/build$ make [100%] Building C object CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c: In function 'monitor_recv_event': /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5834:2: error: unknown type name 'zmq_event_t' /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5907:39: error: request for member 'event' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5907:61: error: request for member 'value' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5913:16: error: request for member 'event' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5913:43: error: request for member 'event' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5914:16: error: request for member 'value' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5914:42: error: request for member 'event' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5914:63: error: request for member 'value' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5915:22: error: request for member 'event' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5916:19: error: request for member 'value' in something not a structure or union /home/sysnajar/lua-zmq/src/pre_generated-zmq.nobj.c:5922:19: error: request for member 'value' in something not a structure or union make[2]: * [CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.o] Error 1 make[1]: * [CMakeFiles/lua-zmq.dir/all] Error 2 make: *\ [all] Error 2