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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 7F22D7ED33 for ; Tue, 19 Jun 2012 18:28:46 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUBAHyn4E/RVdy2mGdsb2JhbABFrG4BiHMIIgEBAQEBCAkNBxQnghgBAQEDARICExkBGx0BAwELBgULDS4hAQERAQUBHAYTIodaAQMGBZpfCQOMIYJwhUEKGScNV4hxAQUMikBjhhkDlSWBEoltAoMfPoQB X-IronPort-AV: E=Sophos;i="4.75,799,1330902000"; d="scan'208";a="163590832" Received: from mail-vc0-f182.google.com ([209.85.220.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Jun 2012 18:28:45 +0200 Received: by vcbfy7 with SMTP id fy7so5775790vcb.27 for ; Tue, 19 Jun 2012 09:28:44 -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=k7BIpM0J1Rsx9TSAG9NNUZE9uQy2mW1hZvoPZD4wE28=; b=nYNJIF/udX+qWsPXH/dQ215E6kTI0aegIyG0zdBczXnM32PBVpmCGhBe5YulukByje Y9auQCocbrkJbweM98aM8pymrIASFJEcYL1HqMvv6fgDOh0yplFxLxMsgQfCZWwxGdgP popaJ824xkVHVkSXiDnbbOmSAHC4UxN3fNjdwLsxLbXblzSsh8jd/MSIvM81tM7YFpSK JWSvwru9jZRrWdQOFN4FQgWwq2p3j+IpL1xvtUmDXaFyAm1DSMmXD3MF49Ga9dzjs+vA H+0AmLmJxwDMsvdYuEo23x+hfvdIdTIK10D/S/VTVVNtmj2g/OiutTqLVkguhW6xX2IE 9j1Q== Received: by 10.52.91.195 with SMTP id cg3mr8084251vdb.96.1340123324326; Tue, 19 Jun 2012 09:28:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.159.104 with HTTP; Tue, 19 Jun 2012 09:28:23 -0700 (PDT) In-Reply-To: <20120619165513.0c9608f4@alcazar> References: <20120619164243.5c57a432@alcazar> <20120619165513.0c9608f4@alcazar> From: Philippe Veber Date: Tue, 19 Jun 2012 18:28:23 +0200 Message-ID: To: Maxence Guesdon Cc: caml users Content-Type: multipart/alternative; boundary=bcaec5016059b3a2fe04c2d5c6e1 X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] Strange compilation error. --bcaec5016059b3a2fe04c2d5c6e1 Content-Type: text/plain; charset=ISO-8859-1 2012/6/19 Maxence Guesdon > On Tue, 19 Jun 2012 16:47:16 +0200 > Philippe Veber wrote: > > > 2012/6/19 Maxence Guesdon > > > > > On Tue, 19 Jun 2012 16:30:27 +0200 > > > Philippe Veber wrote: > > > > > > > Dear camlers, > > > > > > Hello, > > > > > > > I'm desperately stuck with the following issue: I fail to compile a > > > program > > > > using a module, but have no problem using the module in question in > the > > > > toplevel. > > > > > > > > Here is how I use it in the toplevel > > > > > > > > $ ocaml > > > > Objective Caml version 3.12.1 > > > > > > > > # #directory > > > > "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R";; > > > > # #load > "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R/ > > > > R_math.cma";; > > > > # Rmath.pow;; > > > > - : float -> float -> float = > > > > > > > > > > > > Now with the following program: > > > > $ cat test.ml > > > > let x = Rmath.pow 2. > > > > > > > > I try to compile with the options corresponding to the toplevel > > > directives: > > > > > > > > $ ocamlc -o rmath -I > > > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R > > > > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R/R_math.cma > > > > test.ml > > > > File "test.ml", line 1, characters 8-17: > > > > Error: Unbound module Rmath > > > > > > Do you have a R_math.cmi file in your ...site-lib/R directory ? > > > > > > > Hi Maxence, > > > > I have a rmath.cmi, and Rmath is one of the modules contained in > R_math.cma > > That should be ok, right? > > Ah yes, sorry. Then I have no idea. > > You couldn't have guessed, that one was really really really silly: before calling my test program test.ml, I called it rmath.ml. After I changed it, but there still was a rmath.cmi in my current directory, which would hide the one in site-lib/R. Really sorry for the noise, and thanks Maxence for giving a hand! ph. --bcaec5016059b3a2fe04c2d5c6e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/6/19 Maxence Guesdon <Maxen= ce.Guesdon@inria.fr>
On Tue, 19 Jun 2012 16:47:16 +0200
Philippe Veber <philippe.veber@gmail.com> wrote:

> 2012/6/19 Maxence Guesdon <Maxence.Guesdon@inria.fr>
>
> > On Tue, 19 Jun 2012 16:30:27 +0200
> > Philippe Veber <ph= ilippe.veber@gmail.com> wrote:
> >
> > > Dear camlers,
> >
> > Hello,
> >
> > > I'm desperately stuck with the following issue: I fail t= o compile a
> > program
> > > using a module, but have no problem using the module in ques= tion in the
> > > toplevel.
> > >
> > > Here is how I use it in the toplevel
> > >
> > > $ ocaml
> > > =A0 =A0 =A0 =A0 Objective Caml version 3.12.1
> > >
> > > # #directory
> > > "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site= -lib/R";;
> > > # #load "/home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/oc= aml/site-lib/R/
> > > R_math.cma";;
> > > # Rmath.pow;;
> > > - : float -> float -> float =3D <fun>
> > >
> > >
> > > Now with the following program:
> > > $ cat test.ml
> > > let x =3D Rmath.pow 2.
> > >
> > > I try to compile with the options corresponding to the tople= vel
> > directives:
> > >
> > > $ ocamlc -o rmath -I
> > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R=
> > > /home/pveber/usr/ocamlbrew/ocaml-3.12.1/lib/ocaml/site-lib/R= /R_math.cma
> > >
test.ml
> > > File "test= .ml", line 1, characters 8-17:
> > > Error: Unbound module Rmath
> >
> > Do you have a R_math.cmi file in your ...site-lib/R directory ? > >
>
> Hi Maxence,
>
> I have a rmath.cmi, and Rmath is one of the modules contained in R_mat= h.cma
> That should be ok, right?

Ah yes, sorry. Then I have no idea.

You couldn't have = guessed, that one was really really really silly: before calling my test pr= ogram test.ml, I called it rmath.ml. After I changed it, but there still was a rmath.cm= i in my current directory, which would hide the one in site-lib/R.

Really sorry for the noise, and thanks Maxence for giving a hand!
ph= .


--bcaec5016059b3a2fe04c2d5c6e1--