Thanks for sharing, but the command WITHOUT URL doesn’t work my side, the previous one WITH URL works for me, but i can’t start the server. I posted my error on another article - “Error when starting the translation server”. I run your command WITHOUT URL and get compiler error as below:
Since “lua-zmq” is a standard package from luarocks, I think the short command without URL is certainly the best one.
Perhaps, one of us did something before that makes a difference at this step…
On my side, with URL, I got these errors:
....
gcc -O2 -fPIC -I/home/dev8/torch/install/include -c src/pre_generated-zmq.nobj.c -o src/pre_generated-zmq.nobj.o -I/usr/include
src/pre_generated-zmq.nobj.c: In function ‘monitor_recv_event’:
src/pre_generated-zmq.nobj.c:5831:2: error: unknown type name ‘zmq_event_t’
zmq_event_t event;
^
src/pre_generated-zmq.nobj.c:5904:39: error: request for member ‘event’ in something not a structure or union
if(zmq_msg_size(msg) != (sizeof(event.event) + sizeof(event.value))) {
^
src/pre_generated-zmq.nobj.c:5904:61: error: request for member ‘value’ in something not a structure or union
if(zmq_msg_size(msg) != (sizeof(event.event) + sizeof(event.value))) {
^
src/pre_generated-zmq.nobj.c:5910:16: error: request for member ‘event’ in something not a structure or union
memcpy(&(event.event), data, sizeof(event.event));
^
src/pre_generated-zmq.nobj.c:5910:43: error: request for member ‘event’ in something not a structure or union
memcpy(&(event.event), data, sizeof(event.event));
^
src/pre_generated-zmq.nobj.c:5911:16: error: request for member ‘value’ in something not a structure or union
memcpy(&(event.value), data+sizeof(event.event), sizeof(event.value));
^
src/pre_generated-zmq.nobj.c:5911:42: error: request for member ‘event’ in something not a structure or union
memcpy(&(event.value), data+sizeof(event.event), sizeof(event.value));
^
src/pre_generated-zmq.nobj.c:5911:63: error: request for member ‘value’ in something not a structure or union
memcpy(&(event.value), data+sizeof(event.event), sizeof(event.value));
^
src/pre_generated-zmq.nobj.c:5912:22: error: request for member ‘event’ in something not a structure or union
ev->event_id = event.event;
^
src/pre_generated-zmq.nobj.c:5913:19: error: request for member ‘value’ in something not a structure or union
ev->value = event.value;
^
src/pre_generated-zmq.nobj.c:5915:5: warning: implicit declaration of function ‘zmq_msg_more’ [-Wimplicit-function-declaration]
if(zmq_msg_more(msg) == 0) {
^
src/pre_generated-zmq.nobj.c:5919:19: error: request for member ‘value’ in something not a structure or union
ev->value = event.value;
^
Torch main web site explain how to install LuaJIT, and Lua 5.2 :
I got some troubles, at various steps of the whole installation process of Torch/OpenNMT, with both of them.
Finally, with some small workarounds (on this first install, I didn’t take notes to be able to remember), I succeeded with this configuration:
latest LuaJIT as explained on the Torch web site
Ubuntu libzmq-dev (said to be version 2.2 in synaptic), installing libzmq1 (said to be version 2.2 in synaptic) sudo apt-get install libzmq-dev
and then, default luarocks install lua-zmq, including the path specs as explained on OpenNMT web site luarocks install lua-zmq ZEROMQ_LIBDIR=/usr/lib/x86_64-linux-gnu/ ZEROMQ_INCDIR=/usr/include
Remark : afterwards, when installing the zmq python package, for the client test, I also got the libzmq5 package installed (said to be version 4.1.4 in synaptic). But, this was after succeeding with the server part.