Ocamlfind cannot find package 'zmq'

76 views Asked by At

I was trying to compile Ocaml tools as part of the Quantum Package 2. The error prompts me

[2/3] Compiling OCaml tools
make: Entering directory '/home/parallels/qp2/ocaml'
ocamlbuild -j 0 -cflags "-g" -lflags "-g" -ocamlopt "opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" qptypes_generator.byte  -use-ocamlfind 
Finished, 0 targets (0 cached) in 00:00:00.
+ ocamlfind ocamldep -package zarith,zmq,str,sexplib,ppx_sexp_conv,ppx_deriving,getopt -modules qptypes_generator.ml > qptypes_generator.ml.depends
ocamlfind: Package `zmq' not found
Command exited with code 2.

So I used ocamlfind list to see whether I had installed zmq. Initially I hadn't so I used opam install zmq, but after that zmq was still not on the list, and the error persisted.

So I git cloned from here and did a manual install. The process was fishy (makefile didn't contain any directories) but after which zmq appeared in the ocamlfind list. Yet in compilation it still prompted me with the original error.

I am guessing I need to sort of tell ocamlfind where zmq package is but that is exactly of what I have no idea.

1

There are 1 answers

0
octachron On

That sounds like an issue with multiple ocamlfind installed. You should check which ocamlfind is in path with

which ocamlfind

if the command doesn't return a path in your QP_Root, you probably want to:

  • First, initialize your environment with eval $(path_to_local_opam env)
  • Second, install ocamlfind with opam install ocamlfind.
  • Third, check that zmq is visible with both opam and ocamlfind