Hi everyone,
I was trying to go through the LLVM OCaml tutorial here, but I wanted to build it using dune instead of ocamlbuild as is done in the tutorial. The error I’m getting is that there is no implementation for Llvm_analysis:
Error: No implementations provided for the following modules:
Llvm_analysis referenced from lib/kaleidoscope_lib.cmxa(Kaleidoscope_lib__Codegen)
If I delete all the uses of Llvm_analysis, but leave in the uses of Llvm, then everything builds fine.
I can also see the files llvm_analysis.cmi, llvm_analysis.cmx, and lllvm_analysis.mli in ~/.opam/4.06.0/lib/llvm, as well as llvm_analysis.a, llvm_analysis.cma, and llvm_analysis.cmxa in ~/.opam/4.06.0/lib/llvm/shared, so I don’t think anything’s missing.
For reference, this is the build setup from the tutorial (note that I’m using angstrom for my parser instead of camlp4):
Could you post the META file for the llvm library? It will be located in $ ocamlfind query llvm. Also, what is the output of $ ocamlfind list | grep -i llvm? It’s strange that llvm_analysis is not found and yet the ocamlbuild build sees it.
Anyway, my guess is that the problem lies in the META file of the llvm package.
So that lists llvm.analysis as @zshipko mentioned. Also I should mention that I didn’t actually check that the ocamlbuild setup works, so maybe it has the same problem. Thanks for all the suggestions.