I'm trying to run make involving a dependency on ocamlfind but when I try to install that, it gives me a circular dependency and a dependency on ocaml-base-nox.

I figured out that I could get ocaml-findlib and libfindlib-ocaml which depend on each other to install at the same time with one command: sudo apt install ocaml-findlib ocaml-findlib libfindlib-ocaml ocaml-base-nox-4.01.0 However, the remaining dependency returns Package 'ocaml-base-nox-4.01.0' has no installation candidate. It does mention a couple packages, apparently:

Package ocaml-base-nox-4.01.0 is a virtual package provided by:
  ocaml-base-nox 4.01.0-3ubuntu3.1 [Not candidate version]
  ocaml-base-nox 4.01.0-3ubuntu3 [Not candidate version]

An answer helping make progress on getting that package installed may be helpful. Otherwise, one revealing to me how to get make to recognize the opam installed instance may help. As you can see, that installation actually worked:

vagrant@vagrant-ubuntu-trusty-64:~/projectfolder$ opam list
# Installed packages for system:
base-bigarray   base  Bigarray library distributed with the OCaml compiler
base-threads    base  Threads library distributed with the OCaml compiler
base-unix       base  Unix library distributed with the OCaml compiler
conf-m4            1  Virtual package relying on m4
ocamlfind      1.7.3  A library manager for OCaml

As you can see, I was able to successfully install ocamlfind via opam. Interestingly, my make command doesn't seem to recognize ocamlfind which I added to the environment when installing with opam:

/path/to/some/folder/which/is/super/secret -O2 -d acommand file.f
[Error] Critical: Error starting ocamlopt process: Cannot run program
"ocamlfind" (in directory
"/path/to/some/folder/."): error=2, No such file
or directory (Cannot run program "ocamlfind" (in directory
"/path/to/some/folder/."): error=2, No such file
or directory)
make: *** [some/folder/timestamp] Error 113

This problem occurs because your environment variables were not set up correctly. In order to do that, it should be enough to run the following command:

eval `opam config env`
  • It's been a while since I asked this. I've been using a Virtual Box Ubuntu since then and I haven't been messing with OCaml. I'm not sure if I solved the problem by doing this or not. I suppose of you're sure that this is the typical solution, I'll select it as the most useful answer, especially since other answers don't exist. Nov 6 '17 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.