[zeromq-dev] C++ Majordomo Pattern

Frank Hartmann soundart at gmx.net
Tue Mar 26 22:11:03 CET 2013


Pieter Hintjens <ph at imatix.com> writes:

> Hi Frank,
>
> I'm not sure what the status is of the C++ versions. I'd start with
> the C ones and make sure they work. You can then replace client,
> worker, and/or broker with the C++ version and any errors in the
> translated versions will be clearer. Also, make sure you're using the
> latest 3.2.x 0MQ package.

Hi Pieter,

could you please elaborate on the '3.2.x 0MQ package'? I am currently
using a git clone of libzmq

$ git remote -v
origin	git://github.com/zeromq/libzmq.git (fetch)
origin	git://github.com/zeromq/libzmq.git (push)

$ git show
commit 01fef415753d00acca7200b60835fe4027adcdf6
Merge: 09a00de 257debf
Author: Martin Hurton <hurtonm at gmail.com>
Date:   Sun Mar 24 07:49:25 2013 -0700

    Merge pull request #536 from hintjens/master
    
    Fixed test_last_endpoint (#80)


I am not sure how this relates to 3.2.x 

Alternativly I could use the debian packages (3.2.2+dfsg-1) or the tar
files at http://download.zeromq.org/zeromq-3.2.2.tar.gz

All these do not contain the "zmq.hpp" so I do need to identify somehow
which zmq.hpp revisions fit to the selected libzmq.

Following your advise 'start with C' I have compiled now czmq revision
103dc71af9910ce6e3c9ad01eb7682f3103a631a and encountered the same issue
with the 'rt' library

/home/frank/0mq/czmq/configure --prefix=/home/frank/0mq/fake_install --with-libzmq=/home/frank/0mq/fake_install
checking for zmq_init in -lzmq... no
configure: error: cannot link with -lzmq, install libzmq.

$ more .../config.log
...
configure:12301: checking for zmq_init in -lzmq
configure:12326: gcc -std=gnu99 -o conftest -I/home/frank/0mq/fake_install/include -g -O2  -L/home/frank/0mq/fake_install/lib  conftest.c -
lzmq  -lpthread  >&5
/home/frank/0mq/fake_install/lib/libzmq.so: undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status

I can workaround this by doing: LDFLAGS=-lrt configure .. 
but I suspect this is not the proper way of solving this issue, or?

kind regards
  Frank






More information about the zeromq-dev mailing list