See also this older bug: http://caml.inria.fr/mantis/view.php?id=5628 For all OCaml versions where #remove_directory is available, findlib now temporarily adds compiler-libs to the path while initializing itself for the toploop, and removes the compiler-libs directory afterwards. So at least findlib isn't dependent on having topdirs.cmi still in the main stdlib directory. I don't know for other users of topdirs. Gerd Am Dienstag, den 16.08.2016, 16:04 +0300 schrieb Kakadu: > Hey, > > After introducing compiler-libs we have starting getting a warning > when we use compiler-libs as ocamlfind package. > > findlib: [WARNING] Interface topdirs.cmi occurs in several > directories: /home/kakadu/.opam2/4.02.3/lib/ocaml, > /home/kakadu/.opam2/4.02.3/lib/ocaml/compiler-libs > > (* It has its own mantis issue [1] where gasche have said that we > should discuss it in the mail list before fixing it. *) > > It happens because we install topdirs.cmi both to `ocamlc -where` and > `ocamlc -where`/compiler-libs. Of course these are identical files > with the same size and MD5 checksum. > > The obvious choice should be not installing this file to `ocamlc > -where` (I) or to `ocamlc -where`/compiler-libs (II). > > (I) Seems to be the right solution architecture-wise but it can > introduce backward-incompatibility in OPAM: after initialization it > puts some code into ~/.ocamlinit which relies on topdirs.cmi [2]. > Personally, I removed this line from my ~/.ocamlinit because it seems > useless for my case. So, by removing `topdirs.cmi` from `ocamlc > -where` we should probably release bugfix release for opam. > > (II) removing `topdirs.cmi` from `ocamlfind query compiler-libs` > means > that we split files for this library between two directories which is > not good in general. Also, there is a probability that we can break > compilation of some packages but I think that it is unlikely. > > Patches implementing both approaches are very likely to be very > straightforward. We only need to decide right solution. Maybe we can > even get it into 4.04. > > Kakadu > > [1] http://caml.inria.fr/mantis/view.php?id=6754 > [2] > let () = >   try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") >   with Not_found -> () > ;; > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------