Configuring for Cygwin causes compilation of signaler.cpp to fail

Description

Building (at `make`) clone of https://github.com/zeromq/zeromq2-1.git, at commit 73f167eeb5

Compile of src/signaler.cpp fails:

CXX libzmq_la-signaler.lo
signaler.cpp:188:2: error: #error
cc1plus: warnings being treated as errors
signaler.cpp: In member function 'int zmq::signaler_t::wait(int)':
signaler.cpp:190:1: error: no return statement in function returning non-void

Makefile:910: recipe for target `libzmq_la-signaler.lo' failed
make[2]: *** [libzmq_la-signaler.lo] Error 1

Inspection of lines 23-35 suggests that when ZMQ_HAVE_CYGWIN is defined, we are setting neither ZMQ_SIGNALER_WAIT_BASED_ON_SELECT nor ZMQ_SIGNALER_WAIT_BASED_ON_POLL, and thus taking the #error section at lines 140 (#ifdef) / 158 (#elif defined) / 187 (#else/#error)

If I add a check for ZMQ_HAVE_CYGWIN to lines 23-35, I can fix the build, but I don;t know which, if any, is the correct ZMQ_SIGNALER_WAIT_BASED_ON_xxx option for Cygwin.

(Sorry, I'm just a potential library user, not a deep internals person, but I hope this description is helpful)

Environment

Cygwin ~1.7.9 under Windows 7 Home Premium

Activity

Show:

January 14, 2012 at 11:18 PM

FYI only: I've successfully cloned and built 3.1.

The tests all appear to run correctly, except for the two ..._ipc tests.

I'll be doing some more investigation and will open another issue if appropriate.

Martin Sustrik January 14, 2012 at 10:41 PM

The problem looks fixed in 0MQ/3.1 but still seems to exist in 0MQ/2.1. Leave it open for now.

January 14, 2012 at 10:31 PM

Sorry, or I can close it - still learning the etiquette here..

January 14, 2012 at 10:30 PM

OK. That builds without problems. The test programs have problems, though. I'll do some more work before I say anything more.

I guess I should deal with that as a separate issue - please close this one if you think appropriate, as it relates only to the compile, and that's fixed.

Thanks.

Martin Sustrik January 14, 2012 at 10:10 PM

I would go fot ZMQ_SIGNALER_BASED_ON_SELECT given that select() is a native Windows function. Can you confirm that works for you?

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Created January 14, 2012 at 9:50 PM
Updated January 14, 2012 at 11:18 PM