[zeromq-dev] pyzmq curve example code

Greg Ward greg at gerg.ca
Wed Feb 26 16:38:01 CET 2014


On 26 February 2014, To ZeroMQ development list said:
> On 26 February 2014, I said:
> > Cannot confirm your fix yet, as I'm battling a CFFI error.
> > 
> > In case anyone can throw me a hint, the problem I'm now having is:
> > 
> > $ PYTHONPATH=/data/src/pyzmq python generate_certificates.py 
> > /data/src/pyzmq/zmq/backend/cffi/__pycache__/_cffi__x5368a726x67d4e236.c:153:17: fatal error: zmq.h: No such file or directory
> >  #include <zmq.h>
> >                  ^
> > compilation terminated.
> 
> Progress. Turns out that distutils (and thus CFFI) understand CPPFLAGS
> and LDFLAGS environment variables. If I run

Argh, ignore this. Turns out that my debugging hacks to
zmq/backend/cython/utils.pyx were screwing things up -- circular
import or something. Reverted them and now I get

  $ PYTHONPATH=/data/src/pyzmq python generate_certificates.py
  Traceback (most recent call last):
    File "generate_certificates.py", line 49, in <module>
      generate_certificates(os.path.dirname(__file__))
    File "generate_certificates.py", line 30, in generate_certificates
      server_public_file, server_secret_file = zmq.auth.create_certificates(keys_dir, "server")
    File "/data/src/pyzmq/zmq/auth/certs.py", line 67, in create_certificates
      public_key, secret_key = zmq.curve_keypair()
    File "utils.pyx", line 51, in zmq.backend.cython.utils.curve_keypair (zmq/backend/cython/utils.c:762)
    File "/data/src/pyzmq/zmq/error.py", line 127, in _check_rc
      raise ZMQError(errno)
  zmq.error.ZMQError: Operation not supported

which I presume is libzmq telling me it's not linked with libsodium?

Anyways. Now rebuilding libzmq... sorry for the noise.

        Greg  



More information about the zeromq-dev mailing list