Join GitHub today
Dune information for Coq developers
The main readme is at https://github.com/coq/coq/blob/master/dev/doc/build-system.dune.md
How to use dune-built Coq?
A complete Coq build is at
_build/install/default. It usually suffices to call the binary, however
dune exec may help with PATH and such.
How to install with dune (without opam)
dune-install or any tool that understand
dune complains about "File foo is both generated by a rule and present in the source tree."
This is generally caused by having used the make-based build system in
dune expects to have control over generated files (which
it mostly puts in _build except for a few like .merlin), but the
make-based system does not respect this assumption.
make distclean should resolve the issue. Occasionally this won't be
enough (generally version
foo.ml, then version
stopped using it, and
make distclean doesn't know that some
arbitrary ml file was generated by a previous version) in which case
git clean -xfd will keep only your git tracked files (make sure that
you have no untracked files that you want to keep).
dune and manual ./configure
coq_dune passed the
-coqlib flag using
manually could break the dune build. Nowadays I think the error is
delayed to when you try to use the dune-built Coq (unconfirmed).