From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 0E8BD823D7 for ; Thu, 8 Mar 2018 09:20:00 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Jocelyn.Serot@univ-bpclermont.fr; spf=None smtp.mailfrom=Jocelyn.Serot@univ-bpclermont.fr; spf=None smtp.helo=postmaster@mta02.udamail.fr Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Jocelyn.Serot@univ-bpclermont.fr) identity=pra; client-ip=193.49.117.21; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Jocelyn.Serot@univ-bpclermont.fr"; x-sender="Jocelyn.Serot@univ-bpclermont.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Jocelyn.Serot@univ-bpclermont.fr) identity=mailfrom; client-ip=193.49.117.21; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Jocelyn.Serot@univ-bpclermont.fr"; x-sender="Jocelyn.Serot@univ-bpclermont.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mta02.udamail.fr) identity=helo; client-ip=193.49.117.21; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="Jocelyn.Serot@univ-bpclermont.fr"; x-sender="postmaster@mta02.udamail.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AEnmNfB911R56qP9uRHKM819IXTAuvvDOBiVQ1KB4?= =?us-ascii?q?2+4cTK2v8tzYMVDF4r011RmVBd6ds6oMotGVmpioYXYH75eFvSJKW713fDhBt/?= =?us-ascii?q?8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC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+hXcAe6i3mJEPY3S1BPFhJVnfb2C60YRJKnsDogdrFL+is1aFSzMGPy/jDZ?= =?us-ascii?q?J53SkyDcedNamGQ4mshLKb2yLhRs9LYGFYT1qUGnPlbYCDXetKZjjAepY9wAxB?= =?us-ascii?q?bqCoTsoa7T/rrBXzkeI1M+zV5GgSrZnn2cJw4OvP0x8op2QtUpatllqVRmQxpV?= =?us-ascii?q?smAj872Kcm8R541l7bi+5lj/VdHN1Xof1TAF83?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CeFADn8KBahxV1McFeHgEeDYJBgUwQA?= =?us-ascii?q?2wojmKNBoEmgXKWPgobiBsZBgY0FAECAQEBAQEBAQEBEgEBAQoLCQgoLoI4IoN?= =?us-ascii?q?ogR+FMAGbNpI+hHGDeYIdhTCCLoNli16CMgSIIZIuCXqFT41AhWmFV45dgmqBK?= =?us-ascii?q?gI1gXN0dQGCGAk1ggOCCHaLewEBAQ?= X-IPAS-Result: =?us-ascii?q?A0CeFADn8KBahxV1McFeHgEeDYJBgUwQA2wojmKNBoEmgXK?= =?us-ascii?q?WPgobiBsZBgY0FAECAQEBAQEBAQEBEgEBAQoLCQgoLoI4IoNogR+FMAGbNpI+h?= =?us-ascii?q?HGDeYIdhTCCLoNli16CMgSIIZIuCXqFT41AhWmFV45dgmqBKgI1gXN0dQGCGAk?= =?us-ascii?q?1ggOCCHaLewEBAQ?= X-IronPort-AV: E=Sophos;i="5.47,440,1515452400"; d="scan'208,217";a="316971824" Received: from mta02.udamail.fr ([193.49.117.21]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2018 09:19:59 +0100 Received: from mta02.udamail.fr (localhost.localdomain [127.0.0.1]) by mta02.udamail.fr (Postfix) with ESMTPS id 60B1E16073D for ; Thu, 8 Mar 2018 09:19:59 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by mta02.udamail.fr (Postfix) with ESMTP id 52B6A16073E for ; Thu, 8 Mar 2018 09:19:59 +0100 (CET) X-Virus-Scanned: amavisd-new at mta02.udamail.fr Received: from mta02.udamail.fr ([127.0.0.1]) by localhost (mta02.udamail.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qYrkAHx5MwxO for ; Thu, 8 Mar 2018 09:19:59 +0100 (CET) Received: from proxy02.udamail.fr (unknown [193.49.117.27]) by mta02.udamail.fr (Postfix) with ESMTPS id 3AB8B16073D for ; Thu, 8 Mar 2018 09:19:59 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.udamail.fr (Postfix) with ESMTP id 17C3716207B for ; Thu, 8 Mar 2018 09:19:59 +0100 (CET) Received: from proxy02.udamail.fr ([127.0.0.1]) by localhost (proxy02.udamail.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ekBJNjaVaMpE for ; Thu, 8 Mar 2018 09:19:57 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.udamail.fr (Postfix) with ESMTP id AA36516207C for ; Thu, 8 Mar 2018 09:19:57 +0100 (CET) X-Virus-Scanned: amavisd-new at proxy02.udamail.fr Received: from proxy02.udamail.fr ([127.0.0.1]) by localhost (proxy02.udamail.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NjDhQEqlp45M for ; Thu, 8 Mar 2018 09:19:57 +0100 (CET) Received: from [192.168.0.42] (lav63-2-88-164-92-250.fbx.proxad.net [88.164.92.250]) by proxy02.udamail.fr (Postfix) with ESMTPSA id 4817F162079 for ; Thu, 8 Mar 2018 09:19:57 +0100 (CET) From: =?iso-8859-1?Q?Jocelyn_S=E9rot?= Content-Type: multipart/alternative; boundary="Apple-Mail=_31E2F5F3-2FED-4A05-A62B-CAFBA5107140" Message-Id: Date: Thu, 8 Mar 2018 09:19:55 +0100 To: caml users Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) Subject: [Caml-list] A question about custom toplevels --Apple-Mail=_31E2F5F3-2FED-4A05-A62B-CAFBA5107140 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hello, I recently stumbled on a problem and am wondering whether it comes from a m= isunderstanding or a bad usage. When a custom toplevel is built using the [ocamlmktop] program, it seems th= at the modules which are =AB included =BB must be present in the path when = the so-built toplevel is executed afterwards.=20 For example, suppose that directory =AB bar =BB contains a file foo.ml, wi= th, let say the definition =AB let v=3D100 =BB. Then, making=20 ocamlfind ocamlc -c -o foo.cmo foo.ml ocamlfind ocamlc -a -o foo.cma foo.cmo ocamlfind ocamlmktop -o foo.top foo.cma creates foo.top, which, when executed, behaves has expected. $ ./foo.top=20 OCaml version 4.06.0 # Foo.v;; - : int =3D 100 But, when trying to execute foo.top from another directory, for ex from ../= bar, i get the following error : $ ./bar/foo.top=20 OCaml version 4.06.0 # Foo.v;; Error: Unbound module Foo The error disappears if i add option =AB -I ./bar =BB when lauching foo.top= (or, equivently execute the directive =AB #directory ./bar =BB). Is there a way to build a =AB self-contained =BB custom toplevel which coul= d be executed without any explicit reference to the modules it included at = creation ?=20 Jocelyn ps : i tried the -custom option but, not surprisingly, it does not solve th= e pb since it only refers to external C code.= --Apple-Mail=_31E2F5F3-2FED-4A05-A62B-CAFBA5107140 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Hello,

I recently stumbled on a problem and am wondering whether it comes from a= misunderstanding or a bad usage.

When a custom to= plevel is built using the [ocamlmktop] program, it seems that the modules w= hich are =AB included =BB must be present in the path when the so= -built toplevel is executed afterwards. 

For = example, suppose that directory =AB bar =BB contains  a file= foo.ml, with, let say the definition =AB let v=3D100 =BB.
<= div>Then, making 

ocamlfind ocamlc -c -o= foo.cmo foo.ml
ocamlfind ocamlc -a -o foo.cma foo.cmo
= ocamlfind ocamlmktop -o foo.top foo.cma

crea= tes foo.top, which, when executed, behaves has expected.

$ = ./foo.top 
        OCaml version 4.06.0

# Foo.v;;

But, when trying to execute foo.top from another directory, for ex from = ../bar, i get the following error :

$ ./bar/foo.top 
 = ;       OCaml version 4.06.0

# Foo.v;;
Erro= r: Unbound module Foo

The er= ror disappears if i add option =AB -I ./bar =BB when lauchin= g foo.top (or, equivently execute the directive =AB #directory ./bar&n= bsp;=BB).

Is there a way to build a =AB self-contained =BB custom top= level which could be executed without any explicit reference to the modules= it included at creation ? 

Jocelyn

<= /div>
ps : i tried the -custom option but, not s= urprisingly, it does not solve the pb since it only refers to external C co= de.
= --Apple-Mail=_31E2F5F3-2FED-4A05-A62B-CAFBA5107140--