Search code examples
homebrewcoq

'coqc' does not find findlib.conf


~ % coqc
Error:
Anomaly
"Uncaught exception Failure("Config file not found - neither /usr/local/etc/findlib.conf nor the directory /usr/local/etc/findlib.conf.d")."
Please report at http://coq.inria.fr/bugs/.

I was trying to use Spacemacs and the coq layer but 'coqc' itself throws an error.

What could be wrong ?

I installed coq using home-brew.

==> Installing dependencies for coq: ocaml and ocaml-zarith
==> Installing coq dependency: ocaml
==> Pouring ocaml--4.14.0.catalina.bottle.tar.gz 🍺  /usr/local/Cellar/ocaml/4.14.0: 2,425 files, 396.8MB
==> Installing coq dependency: ocaml-zarith
==> Pouring ocaml-zarith--1.12_2.catalina.bottle.tar.gz 🍺  /usr/local/Cellar/ocaml-zarith/1.12_2: 38 files, 831.8KB
==> Installing coq
==> Pouring coq--8.16.1.catalina.bottle.tar.gz 🍺  /usr/local/Cellar/coq/8.16.1: 5,474 files, 662.8MB
==> Running `brew cleanup coq`...

Solution

  • I installed brew install ocaml-findlib and then ocamlfind printconf shows meaningful env. values.

    coqc works after this.

    And as mentioned in the comments the issue is addressed.