caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Kakadu <kakadu.hafanana@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Annoying warning about double installation of topdirs.cmi
Date: Tue, 16 Aug 2016 21:01:43 +0200	[thread overview]
Message-ID: <1471374103.14938.3.camel@gerd-stolpmann.de> (raw)
In-Reply-To: <CAGmVoG0PChOr8brCm0W+OouUuEWUKBuFk9iX1XZhujcyAA+Cvg@mail.gmail.com>

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

  reply	other threads:[~2016-08-16 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 13:04 Kakadu
2016-08-16 19:01 ` Gerd Stolpmann [this message]
2016-08-26 13:10 ` Louis Gesbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471374103.14938.3.camel@gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=kakadu.hafanana@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).