nanomsg/nnpy

build fails with recent nanomsg

bnewbold opened this issue · 0 comments

I tried to install nnpy for the first time today, with a fresh checkout of nanomsg installed (9b7f444d2...).

I get the following error:

bnewbold@ent$ python setup.py build
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    generate.run()
  File "/home/bnewbold/src/nnpy/generate.py", line 55, in run
    f.write(symbols(headers))
  File "/home/bnewbold/src/nnpy/generate.py", line 33, in symbols
    ffi.cdef(headers)
  File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 103, in cdef
    self._parser.parse(csource, override=override, packed=packed)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 166, in parse
    self._internal_parse(csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 172, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 129, in _parse
    self.convert_pycparser_error(e, csource)
  File "/usr/local/lib/python2.7/dist-packages/cffi/cparser.py", line 158, in convert_pycparser_error
    raise api.CDefError(msg)
cffi.api.CDefError: cannot parse "int nn_req_send (int s, nn_req_handle hndl, const void *buf, size_t len, int flags);"
:3:25: before: nn_req_handle

I think the problem is that generate.py isn't including a typedef for nn_req_handle in the autogenerated nnpy/nanomsg.h, but i'm not sure if the fix would be as simple as including that.