sansculotte / pd-zmq Goto Github PK
View Code? Open in Web Editor NEWØMQ message queue API implementation for puredata
ØMQ message queue API implementation for puredata
Hi, I just used the instructions you gave for compiling (simpy use make) and get a load of warnings and errors and it doesn't compile in the end... Maybe I'm using the wrong pd version? wrong gcc version? I didn't update my pd headers for quite some time and don't even remember any longer where they're coming from (maybe they are from a source package, but might also be manually put there - but so far they have worked in the past for other externals)
See below for error messages that I get, if you have a quick guess what's wrong give me a hint, I didn't spend a lot of time on it yet, but am willing to spend some time...
And thanks for making ømq availabe on pd!
using ubuntu 14.10
gcc version (Ubuntu 4.9.1-16ubuntu6) 4.9.1
$ make
gcc -Wall -I../../src/ -O6 -funroll-loops -fomit-frame-pointer -rdynamic -shared -fPIC zmq.c -lzmq -lc -o zmq.pd_linux
zmq.c: In function ‘zmq_bang’:
zmq.c:232:35: warning: passing argument 2 of ‘zmq_send’ from incompatible pointer type
int r=zmq_send (x->zmq_socket, "", 0, ZMQ_DONTWAIT);
^
In file included from zmq.c:12:0:
/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);
^
zmq.c:232:10: error: too many arguments to function ‘zmq_send’
int r=zmq_send (x->zmq_socket, "", 0, ZMQ_DONTWAIT);
^
In file included from zmq.c:12:0:
/usr/include/zmq.h:229:16: note: declared here
ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
^
zmq.c:234:18: warning: passing argument 1 of ‘zmq_error’ from incompatible pointer type
zmq_error(zmq_errno);
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int ()(void)’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_bind’:
zmq.c:258:20: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
else zmq_error(zmq_errno());
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_unbind’:
zmq.c:272:4: warning: implicit declaration of function ‘zmq_unbind’ [-Wimplicit-function-declaration]
int r = zmq_unbind(x->zmq_socket, s->s_name);
^
zmq.c:277:20: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
else zmq_error(zmq_errno());
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_connect’:
zmq.c:297:20: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
else zmq_error(zmq_errno());
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_disconnect’:
zmq.c:311:4: warning: implicit declaration of function ‘zmq_disconnect’ [-Wimplicit-function-declaration]
int r = zmq_disconnect(x->zmq_socket, s->s_name);
^
zmq.c:316:20: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
else zmq_error(zmq_errno());
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_close’:
zmq.c:328:58: warning: passing argument 4 of ‘zmq_setsockopt’ makes integer from pointer without a cast
zmq_setsockopt(x->zmq_socket, ZMQ_LINGER, &linger, &len);
^
In file included from zmq.c:12:0:
/usr/include/zmq.h:223:16: note: expected ‘size_t’ but argument is of type ‘int *’
ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval,
^
zmq.c:336:21: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
zmq_error(zmq_errno());
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_send’:
zmq.c:369:31: warning: passing argument 2 of ‘zmq_send’ from incompatible pointer type
r=zmq_send (x->zmq_socket, buf, strlen(buf), 0);
^
In file included from zmq.c:12:0:
/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);
^
zmq.c:369:6: error: too many arguments to function ‘zmq_send’
r=zmq_send (x->zmq_socket, buf, strlen(buf), 0);
^
In file included from zmq.c:12:0:
/usr/include/zmq.h:229:16: note: declared here
ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags);
^
zmq.c:372:18: warning: passing argument 1 of ‘zmq_error’ from incompatible pointer type
zmq_error(zmq_errno);
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int ()(void)’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_receive’:
zmq.c:398:31: warning: passing argument 2 of ‘zmq_recv’ from incompatible pointer type
r=zmq_recv (x->zmq_socket, buf, MAXPDSTRING, ZMQ_DONTWAIT);
^
In file included from zmq.c:12:0:
/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);
^
zmq.c:398:6: error: too many arguments to function ‘zmq_recv’
r=zmq_recv (x->zmq_socket, buf, MAXPDSTRING, ZMQ_DONTWAIT);
^
In file included from zmq.c:12:0:
/usr/include/zmq.h:230:16: note: declared here
ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags);
^
zmq.c:441:22: warning: passing argument 1 of ‘_zmq_error’ makes pointer from integer without a cast
zmq_error(err);
^
zmq.c:60:6: note: expected ‘int * ()()’ but argument is of type ‘int’
void _zmq_error(int errno);
^
zmq.c: In function ‘_zmq_error’:
zmq.c:543:4: warning: format not a string literal and no format arguments [-Wformat-security]
error(zmq_strerror(errno));
^
Makefile:6: recipe for target 'zmq.pd_linux' failed
make: *** [zmq.pd_linux] Error 1
I realise that this is an old project but I really need to use zmq in a large distributed PD implementation. I have access to the darwin build but not one that will work on M1/M2 ARM64 architecture.
When I run the makefile I get a bunch of errors:
warning: optimization level '-O6' is not supported; using '-O3' instead
zmq.c:166:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("invalid socket type or not yet implemented");
^
zmq.c:188:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("create a socket first");
^
zmq.c:229:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("create and connect socket before sending anything");
^
zmq.c:246:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("create a socket first");
^
zmq.c:250:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("socket already in use");
^
zmq.c:265:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("no socket");
^
zmq.c:269:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("socket not bound");
^
zmq.c:285:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("create socket first");
^
zmq.c:289:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("socket already in use");
^
zmq.c:304:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("no socket");
^
zmq.c:308:7: error: call to undeclared function 'error'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
error("socket not connected");
^
Any help you could offer would be greatly appreciated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.