Build does not seem to work with latest ZeroMQ build
Opened this issue · 1 comments
I compiled zeromq-4.3.2 from source (after Ubuntu 20.04's package manager build failed) and it looks like it fails to build:
[ 2%] Building C object src/CMakeFiles/mamazmqimpl.dir/transport.c.o
/home/fquinn/SourceExternal/nyfix/OZ/src/transport.c: In function ‘zmqBridgeMamaTransportImpl_stopReconnectOnError’:
/home/fquinn/SourceExternal/nyfix/OZ/src/transport.c:1302:26: error: ‘ZMQ_RECONNECT_STOP_CONN_REFUSED’ undeclared (first use in this function)
1302 | int reconnectOption = ZMQ_RECONNECT_STOP_CONN_REFUSED | ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fquinn/SourceExternal/nyfix/OZ/src/transport.c:1302:26: note: each undeclared identifier is reported only once for each function it appears in
/home/fquinn/SourceExternal/nyfix/OZ/src/transport.c:1302:60: error: ‘ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED’ undeclared (first use in this function)
1302 | int reconnectOption = ZMQ_RECONNECT_STOP_CONN_REFUSED | ZMQ_RECONNECT_STOP_HANDSHAKE_FAILED;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fquinn/SourceExternal/nyfix/OZ/src/transport.c:1303:45: error: ‘ZMQ_RECONNECT_STOP’ undeclared (first use in this function); did you mean ‘ZMQ_RECONNECT_IVL’?
1303 | int rc = zmq_setsockopt(socket->mSocket, ZMQ_RECONNECT_STOP, &reconnectOption, sizeof(reconnectOption));
| ^~~~~~~~~~~~~~~~~~
| ZMQ_RECONNECT_IVL
make[2]: *** [src/CMakeFiles/mamazmqimpl.dir/build.make:187: src/CMakeFiles/mamazmqimpl.dir/transport.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:155: src/CMakeFiles/mamazmqimpl.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
Are there any plans to support more recent versions or what version should I be trying this with?
We have to deal with the fact that for any of our dependent projects, we may be either ahead, behind, or both at any given time. So we've come up with a set of conventions for dealing with that, which include:
- hosting our own forks at https://github.com/nyfix
- checking out specific branches from those repos.
It's a rather long story (sigh), but the short version is that OZ should be building against the "nyfix" branch of those repos.
The easy way to do that is to use the provided scripts:
git clone git@github.com:nyfix/OZ.git
cd OZ/test
./build-all.sh
./ut.sh
It just so happens that I've been testing that today, and I'm pretty sure it will work for you (on CentOS). Any other platform is a WIP at this point, but the scripts should be pretty clear.
There's more at https://github.com/nyfix/OZ/blob/master/doc/Getting-Started.md
Please give that a try and let me know how it works for you.
P.S. As you know, we're eager to get past these issues and sync up with upstream, esp. OpenMAMA. (We're already pretty much in sync w/libzmq, so you can also just clone libzmq:master and you should be OK).