caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Annoying warning about double installation of topdirs.cmi
@ 2016-08-16 13:04 Kakadu
  2016-08-16 19:01 ` Gerd Stolpmann
  2016-08-26 13:10 ` Louis Gesbert
  0 siblings, 2 replies; 3+ messages in thread
From: Kakadu @ 2016-08-16 13:04 UTC (permalink / raw)
  To: Caml List

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 -> ()
;;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Annoying warning about double installation of topdirs.cmi
  2016-08-16 13:04 [Caml-list] Annoying warning about double installation of topdirs.cmi Kakadu
@ 2016-08-16 19:01 ` Gerd Stolpmann
  2016-08-26 13:10 ` Louis Gesbert
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Stolpmann @ 2016-08-16 19:01 UTC (permalink / raw)
  To: Kakadu; +Cc: Caml List

[-- Attachment #1: Type: text/plain, Size: 2674 bytes --]

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
------------------------------------------------------------



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Annoying warning about double installation of topdirs.cmi
  2016-08-16 13:04 [Caml-list] Annoying warning about double installation of topdirs.cmi Kakadu
  2016-08-16 19:01 ` Gerd Stolpmann
@ 2016-08-26 13:10 ` Louis Gesbert
  1 sibling, 0 replies; 3+ messages in thread
From: Louis Gesbert @ 2016-08-26 13:10 UTC (permalink / raw)
  To: caml-list

> (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.

This was actually removed from the latest development versions of opam, and `~/.ocamlinit` is no longer updated by `opam init`. It seems this was no longer needed, but please complain if you find it breaks common uses!

Opam 1.2.2 is going to remain for a while though, even once 2.0 is released, so the issue would still need to be otherwise fixed in the meantime.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-26 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 13:04 [Caml-list] Annoying warning about double installation of topdirs.cmi Kakadu
2016-08-16 19:01 ` Gerd Stolpmann
2016-08-26 13:10 ` Louis Gesbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).