[zeromq-dev] Problem on ARM platform

David Jagoe davidjagoe at gmail.com
Fri Apr 11 19:26:48 CEST 2014


Ahoy,

I've got a simple program that works on my PC but not when I compile it on
an ARM platform.

In both cases I'm running on Linux (Ubuntu on my PC and Debian Wheezy on
the ARM target).

In both cases I have compiled the following versions of zmq:

czmq-2.1.0.tar.gz
zeromq-4.0.4.tar.gz

python-zmq from ubuntu/debian repo respectively.

Thanks for any help. Programs below:


C program publishing data:

#define THREAD_USE_POSIX
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "czmq.h"

#define PUB_SOCKET_ADDRESS "ipc:///tmp/pub.ipc"
#define TRUE 1


void publish(void *socket) {
  while (TRUE) {
    sleep(1);
    zstr_send(socket, "hello 1 2");
  }
}


int main(int argc, char *argv[]) {

  zctx_t *context = zctx_new();

  void *socket = zsocket_new(context, ZMQ_PUB);
  zsocket_bind(socket, PUB_SOCKET_ADDRESS);

  publish(socket);

}


=====================

Python program receiving:


import zmq
import time

context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.connect("ipc:///tmp/pub.ipc")
# socket.connect("tcp://localhost:5556")

socket.setsockopt(zmq.SUBSCRIBE, "")

while True:
    print socket.recv()



Both programs run fine but I get nothing printed in the python program when
this is running on the ARM platform. The same code (and library versions)
work fine on my PC.

Any suggestions?


Thanks!
David



-- 
David Jagoe

davidjagoe at gmail.com
+18053284389
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140411/536b90bc/attachment.htm>


More information about the zeromq-dev mailing list