From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 085BC7EEBF for ; Thu, 6 Aug 2015 21:03:32 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.212.182 as permitted sender) identity=mailfrom; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f182.google.com) identity=helo; client-ip=209.85.212.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-wi0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ByAgD3rsNVm7bUVdFbgk5sNWkGgx2uRosDgjOFfQKBQQdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARQHHQEDAQsGAwILAx8VAgIiAREBBQEcBhMJGYd2AQMKCA2aO48/gS4+MYs/gWyCeYtIChknDVeEVQEBAQEBAQQBAQEBAQEBFQEFDotBhGMmBwqCX4FDBYccjV8Gim+BaJgjEiOBFxEGhCgiMQGCSwEBAQ X-IPAS-Result: A0ByAgD3rsNVm7bUVdFbgk5sNWkGgx2uRosDgjOFfQKBQQdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARQHHQEDAQsGAwILAx8VAgIiAREBBQEcBhMJGYd2AQMKCA2aO48/gS4+MYs/gWyCeYtIChknDVeEVQEBAQEBAQQBAQEBAQEBFQEFDotBhGMmBwqCX4FDBYccjV8Gim+BaJgjEiOBFxEGhCgiMQGCSwEBAQ X-IronPort-AV: E=Sophos;i="5.15,624,1432591200"; d="scan'208";a="142210328" Received: from mail-wi0-f182.google.com ([209.85.212.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 06 Aug 2015 21:03:31 +0200 Received: by wibhh20 with SMTP id hh20so36773570wib.0 for ; Thu, 06 Aug 2015 12:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=b0N2lkBqBj1oWDd7xQs6ur6zYgllJhFVSBDmNZm++5A=; b=K13RmTJ1TkfvM1n+jQT7kK3lL0j26CRyr93vfSi+Yl+PR5zvC9OQLyXPikta9ccaJm YFXSp2yfGJrRhuZuS5hx4ppw7m2TldhRI8AweqAayoQqy1Dvgbq6bnfurEyPvRhs7CjE NOcAGFs2jPaD8gd95fZHoHd0I2XEMStoHtPploJ8W3gAV9arhOe0i2z2beoXswu5Sy1f JG7FVxdnpzcXuyHc+vCff+n+Qe293kaDVRSR79NOO99+SqiEZHcX4PsIkxtlBiCac6Fr 3vbz6U/bkiJKIgvu7Y1BantOnJk1pAbE+3rn/pbrceKeH5HqRgm/CgRsTeoSwBMUz6Mh JQ/A== X-Received: by 10.194.81.67 with SMTP id y3mr6092833wjx.7.1438887810759; Thu, 06 Aug 2015 12:03:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.27.95.213 with HTTP; Thu, 6 Aug 2015 12:03:11 -0700 (PDT) In-Reply-To: <1438788990.9319.23.camel@zotac> References: <1438788990.9319.23.camel@zotac> From: Ashish Agarwal Date: Thu, 6 Aug 2015 15:03:11 -0400 Message-ID: To: Gerd Stolpmann Cc: Caml List Content-Type: multipart/alternative; boundary=047d7bdc865cd502f8051ca92c2c Subject: Re: [Caml-list] findlib gives warning that compiler doesn't --047d7bdc865cd502f8051ca92c2c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > It is a little bit unclear to me how the check could be made better. Any ideas? I'm not sure. I'm working around the problem by putting the output of packing in a different directory, which gives this layout: =E2=94=9C=E2=94=80=E2=94=80 liba =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.cmi =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.cmo =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.ml =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 b.cmi =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 b.cmo =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 b.ml =E2=94=9C=E2=94=80=E2=94=80 liba.cma =E2=94=9C=E2=94=80=E2=94=80 liba.cmi =E2=94=9C=E2=94=80=E2=94=80 liba.cmo =E2=94=94=E2=94=80=E2=94=80 libb =E2=94=9C=E2=94=80=E2=94=80 a.cmi =E2=94=94=E2=94=80=E2=94=80 a.ml Now I can do $ ocamlfind ocamlc -I .. -c a.ml thereby avoiding reference to the liba/ directory entirely. On Wed, Aug 5, 2015 at 11:36 AM, Gerd Stolpmann wrote: > Am Dienstag, den 04.08.2015, 16:49 -0400 schrieb Ashish Agarwal: > > With the file structure shown below, assume you're in directory libb. > > Then: > > > > > > $ ocamlc -I ../liba -c a.ml > > (* no warnings *) > > > > > > $ ocamlfind ocamlc -I ../liba -c a.ml > > findlib: [WARNING] Interface a.cmi occurs in several > > directories: ., ../liba > > > > > > Why does findlib do an extra check that the compiler is okay with? > > This is causing problems in a project where I'd like to build several > > packed libraries, and one reason for doing so is precisely to reuse > > module names. Am I going about this wrong? My goal is that within > > libb, the only module from liba that should be visible is Liba. > > The compiler has always been okay with multiple cmis in different > directories because the assumption is that you have full control over > the directories, and that the search path resolves any conflicts. This > is different when you use findlib. Typically you use libraries from > third parties, and cmi conflicts would remain unnoticed if findlib > didn't check. > > This feature, however, is older than packed modules, and findlib doesn't > take packed modules into account. It is a little bit unclear to me how > the check could be made better. Any ideas? > > Gerd > > > > > > > =E2=94=9C=E2=94=80=E2=94=80 liba > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.cmi > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.cmo > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 a.ml > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 b.cmi > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 b.cmo > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 b.ml > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 liba.cma > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 liba.cmi > > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 liba.cmo > > =E2=94=94=E2=94=80=E2=94=80 libb > > =E2=94=9C=E2=94=80=E2=94=80 a.cmi > > =E2=94=9C=E2=94=80=E2=94=80 a.cmo > > =E2=94=94=E2=94=80=E2=94=80 a.ml > > > > > > > > -- > ------------------------------------------------------------ > 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 > ------------------------------------------------------------ > --047d7bdc865cd502f8051ca92c2c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
>=C2=A0It = is a little bit unclear to me how=C2=A0the check could be made better. Any ideas?

I'm not sure. I'm working around = the problem by putting the output of packing in a different directory, whic= h gives this layout:

=E2=94=9C=E2=94= =80=E2=94=80 liba
=E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 a.cmi
=E2=94=82 =C2=A0 =E2=94=9C=E2=94= =80=E2=94=80 a.cmo
=E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 = a.ml
=E2= =94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 b.cmi
=E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2= =94=80 b.cmo
= =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 b.ml

Now I can do

$ ocamlfind ocamlc -I .. -c a.ml

there= by avoiding reference to the liba/ directory entirely.

On W= ed, Aug 5, 2015 at 11:36 AM, Gerd Stolpmann <info@gerd-stolpmann.de= > wrote:
A= m Dienstag, den 04.08.2015, 16:49 -0400 schrieb Ashish Agarwal:
> With the file structure shown below, assume you're in directory li= bb.
> Then:
>
>
> $ ocamlc -I ../liba -c a.ml
> (* no warnings *)
>
>
> $ ocamlfind ocamlc -I ../liba -c a.ml
> findlib: [WARNING] Interface a.cmi occurs in several
> directories: ., ../liba
>
>
> Why does findlib do an extra check that the compiler is okay with?
> This is causing problems in a project where I'd like to build seve= ral
> packed libraries, and one reason for doing so is precisely to reuse
> module names. Am I going about this wrong? My goal is that within
> libb, the only module from liba that should be visible is Liba.

The compiler has always been okay with multiple cmis in different
directories because the assumption is that you have full control over
the directories, and that the search path resolves any conflicts. This
is different when you use findlib. Typically you use libraries from
third parties, and cmi conflicts would remain unnoticed if findlib
didn't check.

This feature, however, is older than packed modules, and findlib doesn'= t
take packed modules into account. It is a little bit unclear to me how
the check could be made better. Any ideas?

Gerd

>
>
> =E2=94=9C=E2=94=80=E2=94=80 liba
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 a.cmi
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 a.cmo
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 a.ml
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 b.cmi
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 b.cmo
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 b.ml
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 liba.cma
> =E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 liba.cmi
> =E2=94=82=C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94=80 liba.cmo
> =E2=94=94=E2=94=80=E2=94=80 libb
>=C2=A0 =C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 a.cmi
>=C2=A0 =C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 a.cmo
>=C2=A0 =C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94=80 a.ml
>
>
>

--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany=C2=A0 =C2=A0 gerd@gerd-stolpmann.de
My OCaml site:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://www.camlcity.org<= br> Contact details:=C2=A0 =C2=A0 =C2=A0 =C2=A0 http://www.camlcity.= org/contact.html
Company homepage:=C2=A0 =C2=A0 =C2=A0 =C2=A0http://www.gerd-stolpmann.de=
------------------------------------------------------------

--047d7bdc865cd502f8051ca92c2c--