-
Notifications
You must be signed in to change notification settings - Fork 470
Coq cannot find the cmxs file for transitive ocaml dependencies #11012
Copy link
Copy link
Open
Labels
Description
When building Coq theories with plugins depending on OCaml libraries (everything being in a dune workspace) it seems like dune sometimes fails to place .cmxs files for transitive dependencies where Coq expects to find them. Since Coq relies on findlib, it seems like all the OCaml libraries depended on transitively by plugins should be made available in the _build/install directory (or at least a META file for them?).
Here is a tarball with a minimal example of workspace that exhibits the problem: dune_bug_plugin_deps.tar.gz. It contains the following files:
dune_bug_plugin_deps
├── coqlib
│ ├── coqlib.opam
│ ├── coqlib-plugin.opam
│ ├── dune-project
│ ├── plugin
│ │ ├── coqlib_plugin.mlpack
│ │ ├── dune
│ │ └── main.ml
│ └── theories
│ ├── dune
│ └── plugin.v
├── dune-workspace
└── somelib
├── dune-project
├── somelib.opam
└── src
├── dune
└── version.ml
To reproduce the problem, simply run:
$ cd dune_bug_plugin_deps
$ dune build coqlib/theories/plugin.vo
File "./coqlib/theories/plugin.v", line 1, characters 0-41:
Error:
Dynlink error: error loading shared library: Failure("[...]/dune_bug_plugin_deps/_build/install/default/lib/somelib/somelib.cmxs: cannot open shared object file: No such file or directory")This was tested with Coq 8.19, and dune 3.16.0.
Reactions are currently unavailable