[zeromq-dev] 0MQ/2.0-beta1 on OSX

Martin Sustrik sustrik at 250bpm.com
Thu Jan 7 14:15:45 CET 2010


Hi Pasi,

We don't have an OSX box here so it's hard to ensure everythings builds OK.

Plese, have a look at src/zmq.cpp and replace lines 36-38:

#if defined ZMQ_HAVE_LINUX
#include <poll.h>
#endif

by this:

#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\
     defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\
     defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\
     defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX
#include <poll.h>
#endif

Let us know whether it works!
Martin

malist wrote:
> Hello,
> 
> I tried to compile iMac:zeromq-2.0-beta1 in Mac OSX 10.6.2 and I get following errors. 
> 
> pasi-iMac:zeromq-2.0-beta1 pasi$ make
> Making all in src
> make  all-am
> /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.    -Wall -Wno-uninitialized -g -O2 -MT libzmq_la-zmq.lo -MD -MP -MF .deps/libzmq_la-zmq.Tpo -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo './'`zmq.cpp
>  g++ -DHAVE_CONFIG_H -I. -Wall -Wno-uninitialized -g -O2 -MT libzmq_la-zmq.lo -MD -MP -MF .deps/libzmq_la-zmq.Tpo -c zmq.cpp  -fno-common -DPIC -o .libs/libzmq_la-zmq.o
> zmq.cpp: In function ‘int zmq_poll(zmq_pollitem_t*, int, long int)’:
> zmq.cpp:274: error: ‘pollfd’ was not declared in this scope
> zmq.cpp:274: error: ‘pollfds’ was not declared in this scope
> zmq.cpp:274: error: expected primary-expression before ‘)’ token
> zmq.cpp:274: error: expected `;' before ‘malloc’
> zmq.cpp:306: error: ‘POLLIN’ was not declared in this scope
> zmq.cpp:307: error: ‘POLLOUT’ was not declared in this scope
> zmq.cpp:320: error: ‘POLLIN’ was not declared in this scope
> zmq.cpp:332: error: ‘poll’ was not declared in this scope
> zmq.cpp:345: error: ‘POLLIN’ was not declared in this scope
> zmq.cpp:356: error: ‘POLLIN’ was not declared in this scope
> zmq.cpp:357: error: ‘POLLOUT’ was not declared in this scope
> make[2]: *** [libzmq_la-zmq.lo] Error 1
> 
> zeromq-2.0-alpha3 compiles and works fine in my quick tests.
> 
> Is it possible to compile universal binaries in Mac OSX?
> 
> 
> Regards, 
> 
> Pasi Mankinen
> Finland
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




More information about the zeromq-dev mailing list