From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p9BGJrul013889 for ; Tue, 11 Oct 2011 18:19:53 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoBALVrlE5KfVK2kGdsb2JhbABDoHIBhy4IIgEBAQEJCQ0HFAQhgVMBAQEDARICLAEbEgwDAQsGBQsNLiEBAREBBQEcBhMJGYdcB5tMCotRgmCFOz2IbwIEBodGBJN1iiuCez2ECw X-IronPort-AV: E=Sophos;i="4.68,524,1312149600"; d="scan'208";a="112523736" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Oct 2011 18:19:50 +0200 Received: by wyj26 with SMTP id 26so13131275wyj.27 for ; Tue, 11 Oct 2011 09:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=QugS+Y74qZaH9xBvVhfqehy2d+ts9+Q+1gDpdZuEGoE=; b=KNEDpOgLDtMpuqCYFtZehzfpTcLO8NaJVK4hhkKZSzAtef/2JZ/Ps+65LM/G8p2pBb /ulamhUrRp3LemGNiZh0daZCpmyKHxY/NZTUz3aXZGvtK1Tl5JPiO5u8PM91go6TvIDJ dVbTdEKXhaMBEOcibE6AODu0XT2JUHnzy4cm4= Received: by 10.227.28.148 with SMTP id m20mr8168512wbc.83.1318349989127; Tue, 11 Oct 2011 09:19:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.96.129 with HTTP; Tue, 11 Oct 2011 09:19:29 -0700 (PDT) In-Reply-To: <1318194167.16477.196.camel@thinkpad> References: <08B6940A-F74E-4D94-8CCB-03416258BD30@gmail.com> <1318194167.16477.196.camel@thinkpad> From: Ashish Agarwal Date: Tue, 11 Oct 2011 12:19:29 -0400 Message-ID: To: Caml List Content-Type: multipart/alternative; boundary=002215b024becaa6ad04af08469f Subject: Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set --002215b024becaa6ad04af08469f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable (Attachment sent separately to Gerd because mailing list rejects post with it.) Hi Gerd, I've attached a minimal example that exhibits the problem. Here's my test. Confirm PG'OCaml is not installed. $ godi_list -installed | grep pgocaml (* no output *) $ cd foo (* the unpacked example directory *) $ ocamlbuild foo.cma Finished, 1 target (0 cached) in 00:00:00. + ocamlfind ocamldep -syntax camlp4o -modules foo.ml > foo.ml.depends ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Command exited with code 2. Compilation unsuccessful after building 1 target (0 cached) in 00:00:00. Install PG'OCaml. $ godi_perform -build godi-pgocaml Confirm PG'OCaml is installed. $ godi_list -installed | grep pgocaml godi-pgocaml inst:1.4godi2 Compile again. I now get the correct error about not having a database connection. $ ocamlbuild foo.cma Finished, 0 targets (0 cached) in 00:00:00. + ocamlfind ocamldep -package pgocaml -package pgocaml.syntax -syntax camlp4o -modules foo.ml > foo.ml.depends File "foo.ml", line 1, characters 23-42: Camlp4: Uncaught exception: Unix.Unix_error (20 | CstTag21, "connect", "") Preprocessing error on file foo.ml Command exited with code 2. Compilation unsuccessful after building 1 target (0 cached) in 00:00:00. On Sun, Oct 9, 2011 at 5:02 PM, Gerd Stolpmann wrot= e: > I'm a bit surprised. Please, can you try to isolate the problem, and > send me a bug report? > > Gerd > > Am Sonntag, den 09.10.2011, 13:16 -0400 schrieb Ashish Agarwal: > > Thanks for all the responses. The problem turned out to be the simple > > one mentioned by Philippe. I just forgot to install PG'Ocaml. It would > > be nice if findlib could give error messages about missing packages > > that are clearly in the dependency list. > > > > On Sun, Oct 9, 2011 at 8:23 AM, Christophe Papazian > > wrote: > > I got this problem a few days ago, and need a quick fix. > > Everything was installed but after an upgrade I got the same > > kind of error. > > To avoid the problem, i drop the "-syntax" parameter and > > replace it with "-pp" : > > > > What *should* work for me : ocamlfind ocamlc -package > > js_of_ocaml -syntax camlp4o > > What's *really* work for me : ocamlfind ocamlc -package > > js_of_ocaml -pp "camlp4o -I /path/to/js_of_ocaml pa_js.cmo" > > > > Hope this help > > > > Christophe > > > > Le 9 oct. 11 =E0 00:46, Ashish Agarwal a =E9crit : > > > > > > > > I get the error below after reinstalling OCaml with > > the latest version with GODI. My code has not changed, > > so I'm wondering if there is a change to ocamlbuild or > > ocamlfind that is causing this. The issue appears to > > be that -package camlp4 should be included in the > > ocamlfind command but it is not. > > > > The section "Does Findlib support camlp4" in the > > findlib User's Guide discusses the 'preprocessor' > > variable, but I can't figure out how exactly how to > > adjust my META file or whether I really need to since > > it was working before. > > > > ocamlbuild sequme.cma sequme.cmxa sequme.cmxs > > Finished, 0 targets (0 cached) in 00:00:00. > > + ocamlfind ocamldep -package batteries -package > > biocaml -package netclient -package netstring -package > > shell -package sqlite3 -syntax camlp4o -modules > > sequme/bowtie.mli > sequme/bowtie.mli.depends > > ocamlfind: When using -syntax, the META variable > > 'preprocessor' must be set > > Command exited with code 2. > > > > --- META --- > > requires =3D "netstring shell netclient batteries > > biocaml pgocaml" > > version =3D "0.0" > > archive(byte) =3D "sequme.cma" > > archive(native) =3D "sequme.cmxa" > > > > > > > > > > -- > ------------------------------------------------------------ > Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de > Creator of GODI and camlcity.org. > Contact details: http://www.camlcity.org/contact.html > Company homepage: http://www.gerd-stolpmann.de > *** Searching for new projects! Need consulting for system > *** programming in Ocaml? Gerd Stolpmann can help you. > ------------------------------------------------------------ > > --002215b024becaa6ad04af08469f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
(Attachment sent separately to Gerd because mailing list rejects post = with it.)

Hi Gerd,

I'= ve attached a minimal example that exhibits the problem. Here's my test= .

Confirm PG'OCaml is not installed.
$ godi= _list -installed | grep pgocaml
(* no output *)

$ cd foo (* the unpacked example directory *)
$ ocamlbuil= d foo.cma
Finished, 1 target (0 cached) in 00:00:00.
+ ocamlfind ocaml= dep -syntax camlp4o -modules foo.ml > foo.= ml.depends
ocamlfind: When using -syntax, the META variable '= preprocessor' must be set
Command exited with code 2.
Compilation unsuccessful after b= uilding 1 target (0 cached) in 00:00:00.

Install P= G'OCaml.
$ godi_perform -build godi-pgocaml

Confirm PG'OCaml is installed.
$ godi_list -instal= led | grep pgocaml
godi-pgocaml =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 inst:1.4godi2

Compile again. I now get the cor= rect error about not having a database connection.
$ ocamlbuild foo.cma
Finished, 0 targets (0 cached) in 00:00= :00.
+ ocamlfind ocamldep -package pgocaml -package pgocaml.synta= x -syntax camlp4o -modules foo.ml > foo.ml= .depends
File "foo.ml", line 1, charact= ers 23-42:
Camlp4: Uncaught exception: Unix.Unix_error (20 | CstT= ag21, "connect", "")

Preproces= sing error on file foo.ml
Command exited with code 2.
Compilation unsuccessful after b= uilding 1 target (0 cached) in 00:00:00.


On Sun, Oct 9, 2011 at 5:02 PM, Gerd Stolpmann <info@gerd-stolpmann.= de> wrote:
I'm a bit surprised. Please, can you tr= y to isolate the problem, and
send me a bug report?

Gerd

Am Sonntag, den 09.10.2011, 13:16 -0400 schrieb Ashish Agarwal:
> Thanks for all the responses. The pr= oblem turned out to be the simple
> one mentioned by Philippe. I just forgot to install PG'Ocaml. It w= ould
> be nice if findlib could give error messages about missing packages
> that are clearly in the dependency list.
>
> On Sun, Oct 9, 2011 at 8:23 AM, Christophe Papazian
> <christophe.papazi= an@gmail.com> wrote:
> =A0 =A0 =A0 =A0 I got this problem a few days ago, and need a quick fi= x.
> =A0 =A0 =A0 =A0 Everything was installed but after an upgrade I got th= e same
> =A0 =A0 =A0 =A0 kind of error.
> =A0 =A0 =A0 =A0 To avoid the problem, i drop the "-syntax" p= arameter and
> =A0 =A0 =A0 =A0 replace it with "-pp" :
>
> =A0 =A0 =A0 =A0 What *should* work for me : ocamlfind ocamlc -package<= br> > =A0 =A0 =A0 =A0 js_of_ocaml -syntax camlp4o
> =A0 =A0 =A0 =A0 What's *really* work for me : ocamlfind ocamlc -pa= ckage
> =A0 =A0 =A0 =A0 js_of_ocaml -pp "camlp4o -I /path/to/js_of_ocaml = pa_js.cmo"
>
> =A0 =A0 =A0 =A0 Hope this help
>
> =A0 =A0 =A0 =A0 =A0Christophe
>
> =A0 =A0 =A0 =A0 Le 9 oct. 11 =E0 00:46, Ashish Agarwal a =E9crit :
>
>
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 I get the error below after reinstalli= ng OCaml with
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 the latest version with GODI. My code = has not changed,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 so I'm wondering if there is a cha= nge to ocamlbuild or
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ocamlfind that is causing this. The is= sue appears to
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 be that -package camlp4 should be incl= uded in the
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ocamlfind command but it is not.
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 The section "Does Findlib support= camlp4" in the
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 findlib User's Guide discusses the= 'preprocessor'
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 variable, but I can't figure out h= ow exactly how to
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 adjust my META file or whether I reall= y need to since
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 it was working before.
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ocamlbuild sequme.cma sequme.cmxa sequ= me.cmxs
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Finished, 0 targets (0 cached) in 00:0= 0:00.
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 + ocamlfind ocamldep -package batterie= s -package
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 biocaml -package netclient -package ne= tstring -package
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 shell -package sqlite3 -syntax camlp4o= -modules
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sequme/bowtie.mli > sequme/bowtie.m= li.depends
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ocamlfind: When using -syntax, the MET= A variable
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 'preprocessor' must be set
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Command exited with code 2.
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 --- META ---
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 requires =3D "netstring shell net= client batteries
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 biocaml pgocaml"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 version =3D "0.0"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 archive(byte) =3D "sequme.cma&quo= t;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 archive(native) =3D "sequme.cmxa&= quot;
>
>
>
>

--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany =A0 =A0gerd@gerd-stolpmann.de
Creator of GODI and camlc= ity.org.
Contact details: =A0 =A0 =A0 =A0http://www.camlcity.org/contact.html
Company homepage: =A0 =A0 =A0 http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------


--002215b024becaa6ad04af08469f--