[zeromq-dev] Possible Ubuntu and OpenPGM Problem?

Bob Beaty drbobbeaty at gmail.com
Thu Jan 27 20:16:17 CET 2011

  I've learned a lot since first posting this to the mailing list. Here's what I've found:
  It's not about Ubuntu - it's about the code in github.
  Here's the issue: in socet_base.cpp (line 194), the check for the protocols epgm and pgm is done. If the flags options.requires_in and options.requires_out are both TRUE, then I'll get an incompatible protocol error.
  If you look at the zmq::sub_t class, it's superclass is zmq::xsub_t. In the file xsub.cpp (line 34) the values for the protocol type, and requires_in and requires_out are set. Both of the "requires" are set to TRUE.
  If you look in the sub.cpp file (line 27), the protocol type is set (after the super's constructor is called), but the values of options.requires_in and options.requires_out are NOT changed from the values set by the zmq::xsub_t class' constructor.
  This means that there is no way a PUB/SUB over epgm or pgm is going to be allowed.
  Martin S. saw this and suggested I change line 194 in socket_base.cpp from:

if ((protocol_ == "pgm" || protocol_ == "epgm") &&
    options.requires_in && options.requires_out) {


if ((protocol_ == "pgm" || protocol_ == "epgm") &&
   options.type != ZMQ_PUB && options.type != ZMQ_SUB &&
   options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) {

  And when I did this it cleared up the error I was getting when trying to connect (as pointed out in the gist: https://gist.github.com/794827 ) to the URL, but no data was received at the SUB side. If I used the 2.1.0 libs, everything worked fine. If I used the libs from the github 'master' dated 09-Dec-2010 then all worked fine.
  So it appears that there are possibly other changes in the code that need to be fixed or changed in order to get the PUB/SUB on OpenPGM to be working in the github 'master'.
  I hope this is easy to follow.


On Jan 27, 2011, at 11:59 AM, Steven McCoy wrote:

> On 24 January 2011 16:54, Bob Beaty <drbobbeaty at gmail.com> wrote:
>   I have a problem that seems to only effect Ubuntu 10.04.1. If you look at the gist: https://gist.github.com/634738 -- and you can even delete the lines 69 through 94, you'll get an error on line 68 - the call to connect() on Ubuntu. But on CentOS, it's fine - no error.
>   I'm using the latest from github (post-2.1.0) for Ubuntu and about a two-week old clone of the same for CentOS. Sustrik mentioned that it's possible some of the recent changes could have caused this problem, but I just need to know what I need to do to get OpenPGM to work across these boxes, as I have both in my current environment.
> So the checkout includes the OpenPGM autoconf setup?  I'd try rolling back the src/Makefile.am that includes those changes.  It certainly will break support on some platforms.
> I cannot recall the status only supporting an external libpgm as otherwise I would recommend investigating that as I have full Autoconf working correctly. 
> -- 
> Steve-o
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

        Bob (drbobbeaty at gmail.com)
    The Man from S.P.U.D.
    We will write no code before it's designed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110127/94ce95a3/attachment.htm>

More information about the zeromq-dev mailing list