rigetti / rpcq

The RPC framework and message specification for @rigetti Quantum Cloud Services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure on grovel error - unlisted dependency on zmq.h

phoe opened this issue · comments

After cloning rpcq master branch to Quicklisp's local projects and running (ql:quickload :rpcq), the following error is generated on my machine:

Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1005E40093}>
 with command ("cc" "-o"
               "/home/phoe/.cache/common-lisp/sbcl-1.4.12-linux-x64/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/pzmq-20171019-git/grovel__grovel-tmp8065ESJT.o"
               "-c" "-g" "-Wall" "-Wundef" "-Wsign-compare"
               "-Wpointer-arith" "-O3" "-D_LARGEFILE_SOURCE"
               "-D_LARGEFILE64_SOURCE" "-D_FILE_OFFSET_BITS=64"
               "-Wunused-parameter" "-fno-omit-frame-pointer"
               "-momit-leaf-frame-pointer" "-fno-pie" "-fPIC"
               "-I/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.19.0/"
               "/home/phoe/.cache/common-lisp/sbcl-1.4.12-linux-x64/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/pzmq-20171019-git/grovel__grovel.c")
 exited with error code 1
   [Condition of type CFFI-GROVEL:GROVEL-ERROR]

The command in question is:

cc -o /home/phoe/.cache/common-lisp/sbcl-1.4.12-linux-x64/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/pzmq-20171019-git/grovel__grovel-tmp8065ESJT.o -c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wunused-parameter -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-pie -fPIC -I/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/cffi_0.19.0/ /home/phoe/.cache/common-lisp/sbcl-1.4.12-linux-x64/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/pzmq-20171019-git/grovel__grovel.c

When running this command manually, it errors on:

fatal error: zmq.h: No such file or directory
 #include <zmq.h>
          ^~~~~~~

I do not see the dependency on that header file anywhere in the requirements.txt file and README.md does not explicitly mention a dependency on ZeroMQ development headers. I think it would be good to note that somewhere.

AFAIK, it will also be required to list that somewhere for inclusion in Quicklisp at quicklisp/quicklisp-projects#1602

Sure, happy to note that here since it'll help users.

For what it's worth, we don't touch ZMQ except through PZMQ, so to get a programmatic solution it's perhaps better to raise this issue there.

Does it mean that you can bundle ZMQ headers with your code? Does ZMQ license allow you to do that? If that is true, then you should be independent of the zmq-dev operating system packages, but you'll need to maintain the header versioning on your own.

It's probably not wise to bundle the headers unless you bundle the library itself. The package manager should do this, and perhaps the Lisp code could do a better job warning the user about this requirement. But that's out of the scope for RPCQ itself, except that we could maybe document things better.

We have documented this in the README. I will close this issue, but would be happy to re-open it if there are proposals for better solutions.