StateSpaceModels/ssm

Installation error

Mancwealm opened this issue · 3 comments

Hoping this isn't a tragic case of RTFM, but thought this worth flagging as I couldn't work out quite what was going wrong myself.

Following through the readme, everything works fine until I try to actually install via npm via "sudo npm install -g ssm". For a while it happily grabs dependencies, but after a little while longer some errors get thrown. The below basically spans what appears to be the start of the sequence which leads to the errors getting thrown, and whilst the bottom part of it actually describing the error looks to be the most useful, I thought I'd include the preceding bit too (sorry!).

To try and troubleshoot this, I did try installing the new version of libzmq, which threw a similar error, differing only in the first line from what I can tell. I've included this here, at the very bottom.

(All of the below on Ubuntu 13.10)

core/workers.c: In function ‘ssm_worker_inproc’:
core/workers.c:55:5: warning: passing argument 2 of ‘zmq_send’ from incompatible pointer type [enabled by default]
     zmq_send(sender, &id, sizeof (int), 0);
     ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘int *’
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:55:5: error: too many arguments to function ‘zmq_send’
     zmq_send(sender, &id, sizeof (int), 0);
     ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: declared here
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:74:13: warning: passing argument 2 of ‘zmq_recv’ from incompatible pointer type [enabled by default]
             zmq_recv(receiver, &the_id, sizeof (int), 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘int *’
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:74:13: error: too many arguments to function ‘zmq_recv’
             zmq_recv(receiver, &the_id, sizeof (int), 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:75:13: warning: passing argument 2 of ‘zmq_recv’ from incompatible pointer type [enabled by default]
             zmq_recv(receiver, &n, sizeof (int), 0);     
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘int *’
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:75:13: error: too many arguments to function ‘zmq_recv’
             zmq_recv(receiver, &n, sizeof (int), 0);     
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:96:13: warning: passing argument 2 of ‘zmq_send’ from incompatible pointer type [enabled by default]
             zmq_send(sender, &id, sizeof (int), 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘int *’
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:96:13: error: too many arguments to function ‘zmq_send’
             zmq_send(sender, &id, sizeof (int), 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: declared here
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:102:13: warning: passing argument 2 of ‘zmq_recv’ from incompatible pointer type [enabled by default]
             zmq_recv(controller, buf, SSM_STR_BUFFSIZE, 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘char *’
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:102:13: error: too many arguments to function ‘zmq_recv’
             zmq_recv(controller, buf, SSM_STR_BUFFSIZE, 0);
             ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c: In function ‘ssm_workers_start’:
core/workers.c:134:2: warning: implicit declaration of function ‘zmq_ctx_new’ [-Wimplicit-function-declaration]
  w->context = zmq_ctx_new();;
  ^
core/workers.c:134:13: warning: assignment makes pointer from integer without a cast [enabled by default]
  w->context = zmq_ctx_new();;
             ^
core/workers.c:160:13: warning: assignment makes pointer from integer without a cast [enabled by default]
  w->context = zmq_ctx_new();
             ^
core/workers.c:205:6: warning: passing argument 2 of ‘zmq_recv’ from incompatible pointer type [enabled by default]
      zmq_recv(w->receiver, &id, sizeof (int), 0);
      ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘int *’
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:205:6: error: too many arguments to function ‘zmq_recv’
      zmq_recv(w->receiver, &id, sizeof (int), 0);
      ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:230:16: note: declared here
 ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c: In function ‘ssm_workers_stop’:
core/workers.c:218:9: warning: passing argument 2 of ‘zmq_send’ from incompatible pointer type [enabled by default]
         zmq_send (workers->controller, "KILL", 5, 0);
         ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: expected ‘struct zmq_msg_t *’ but argument is of type ‘char *’
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:218:9: error: too many arguments to function ‘zmq_send’
         zmq_send (workers->controller, "KILL", 5, 0);
         ^
In file included from core/ssm.h:56:0,
                 from core/workers.c:19:
/usr/include/zmq.h:229:16: note: declared here
 ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
                ^
core/workers.c:231:9: warning: implicit declaration of function ‘zmq_ctx_destroy’ [-Wimplicit-function-declaration]
         zmq_ctx_destroy (workers->context);
         ^
make: *** [core/workers.o] Error 1
npm ERR! ssm@0.5.3 install: `(cd src/C && make && make install && make clean)`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the ssm@0.5.3 install script.
npm ERR! This is most likely a problem with the ssm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (cd src/C && make && make install && make clean)
npm ERR! You can get their info via:
npm ERR!     npm owner ls ssm
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-13-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ssm"
npm ERR! cwd /home/mancwealm
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/mancwealm/npm-debug.log
npm ERR! not ok code 0

Error generated when using libzmq3-dev instead of libzmq-dev:

make: *** [install] Error 1
npm ERR! ssm@0.5.3 install: `(cd src/C && make && make install && make clean)`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the ssm@0.5.3 install script.
npm ERR! This is most likely a problem with the ssm package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     (cd src/C && make && make install && make clean)
npm ERR! You can get their info via:
npm ERR!     npm owner ls ssm
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-13-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "ssm"
npm ERR! cwd /home/mancwealm
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/mancwealm/npm-debug.log
npm ERR! not ok code 0

Thanks for the report. The first error seems to be due to an outdated version of zeromq. We need v3.2.4.
I don't know which version comes with libzmq3-dev in 13.10.

From the zeromq website

the unstable releases 3.0.x through to 3.2.1 are not interoperable with any other version of 0MQ except themselves.

Could you

rm /home/mancwealm/npm-debug.log
rm -rf /home/mancwealm/.ssm

and try again posting all the logs if it fails ?

If it's due to a zmq version issue, chris-lea ppa could help to give you v3.2.4 (add-apt-repository -y ppa:chris-lea/zeromq)

I have edited the README to refer to libzmq3-dev on ubuntu.

Closing. @JDureau managed to get everything working on ubuntu with libzmq3-dev.