* [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set @ 2011-10-08 22:46 Ashish Agarwal 2011-10-09 8:08 ` Gerd Stolpmann ` (3 more replies) 0 siblings, 4 replies; 8+ messages in thread From: Ashish Agarwal @ 2011-10-08 22:46 UTC (permalink / raw) To: Caml List [-- Attachment #1: Type: text/plain, Size: 1076 bytes --] 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 = "netstring shell netclient batteries biocaml pgocaml" version = "0.0" archive(byte) = "sequme.cma" archive(native) = "sequme.cmxa" [-- Attachment #2: Type: text/html, Size: 1363 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-08 22:46 [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Ashish Agarwal @ 2011-10-09 8:08 ` Gerd Stolpmann 2011-10-09 9:03 ` ygrek ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Gerd Stolpmann @ 2011-10-09 8:08 UTC (permalink / raw) To: Ashish Agarwal; +Cc: Caml List Am Samstag, den 08.10.2011, 18:46 -0400 schrieb Ashish Agarwal: > 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. camlp4 can also be a dependency of another package. Maybe camlp4 was removed from one of the dependency lists as another result of the update? > 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. This section is about including custom preprocessors. If you just want plain camlp4, just set "-package camlp4 -syntax camlp4o". > 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. Well, the meaning is that there must be at least one package definition setting how to call camlp4, in one of the listed packages or in a dependency of these. As a user of camlp4, you don't need to do this in your own META. The package "camlp4" includes the most basic way of calling camlp4. Hope this helps, Gerd > > > --- META --- > requires = "netstring shell netclient batteries biocaml pgocaml" > version = "0.0" > archive(byte) = "sequme.cma" > archive(native) = "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. ------------------------------------------------------------ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-08 22:46 [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Ashish Agarwal 2011-10-09 8:08 ` Gerd Stolpmann @ 2011-10-09 9:03 ` ygrek 2011-10-09 10:27 ` Philippe Veber 2011-10-09 12:23 ` Christophe Papazian 3 siblings, 0 replies; 8+ messages in thread From: ygrek @ 2011-10-09 9:03 UTC (permalink / raw) To: caml-list On Sat, 8 Oct 2011 18:46:18 -0400 Ashish Agarwal <agarwal1975@gmail.com> wrote: > 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. One can only use -syntax switch if some of the used packages defines a preprocessor. Probably one of the packages included a syntax extension earlier, but stopped doing that? -- ygrek http://ygrek.org.ua ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-08 22:46 [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Ashish Agarwal 2011-10-09 8:08 ` Gerd Stolpmann 2011-10-09 9:03 ` ygrek @ 2011-10-09 10:27 ` Philippe Veber 2011-10-09 12:23 ` Christophe Papazian 3 siblings, 0 replies; 8+ messages in thread From: Philippe Veber @ 2011-10-09 10:27 UTC (permalink / raw) To: Ashish Agarwal; +Cc: Caml List [-- Attachment #1: Type: text/plain, Size: 1490 bytes --] Hi Ashish this often happens to me after reinstalling godi, if I forget to install one syntax extension used in my project. Instead of having a more meaningful message like 'missing package bidule', I've got the message you report. Maybe you could double check whether you installed all extensions used in sequme ? 2011/10/9 Ashish Agarwal <agarwal1975@gmail.com> > 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 = "netstring shell netclient batteries biocaml pgocaml" > version = "0.0" > archive(byte) = "sequme.cma" > archive(native) = "sequme.cmxa" > > [-- Attachment #2: Type: text/html, Size: 2006 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-08 22:46 [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Ashish Agarwal ` (2 preceding siblings ...) 2011-10-09 10:27 ` Philippe Veber @ 2011-10-09 12:23 ` Christophe Papazian 2011-10-09 17:16 ` Ashish Agarwal 3 siblings, 1 reply; 8+ messages in thread From: Christophe Papazian @ 2011-10-09 12:23 UTC (permalink / raw) To: Ashish Agarwal; +Cc: Caml List 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 à 00:46, Ashish Agarwal a écrit : > 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 = "netstring shell netclient batteries biocaml pgocaml" > version = "0.0" > archive(byte) = "sequme.cma" > archive(native) = "sequme.cmxa" > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-09 12:23 ` Christophe Papazian @ 2011-10-09 17:16 ` Ashish Agarwal 2011-10-09 21:02 ` Gerd Stolpmann 0 siblings, 1 reply; 8+ messages in thread From: Ashish Agarwal @ 2011-10-09 17:16 UTC (permalink / raw) To: Caml List [-- Attachment #1: Type: text/plain, Size: 2069 bytes --] 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 < christophe.papazian@gmail.com> 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 à 00:46, Ashish Agarwal a écrit : > > > 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 = "netstring shell netclient batteries biocaml pgocaml" >> version = "0.0" >> archive(byte) = "sequme.cma" >> archive(native) = "sequme.cmxa" >> >> > [-- Attachment #2: Type: text/html, Size: 2602 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-09 17:16 ` Ashish Agarwal @ 2011-10-09 21:02 ` Gerd Stolpmann 2011-10-11 16:19 ` Ashish Agarwal 0 siblings, 1 reply; 8+ messages in thread From: Gerd Stolpmann @ 2011-10-09 21:02 UTC (permalink / raw) To: Ashish Agarwal; +Cc: Caml List 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 > <christophe.papazian@gmail.com> 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 à 00:46, Ashish Agarwal a écrit : > > > > 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 = "netstring shell netclient batteries > biocaml pgocaml" > version = "0.0" > archive(byte) = "sequme.cma" > archive(native) = "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. ------------------------------------------------------------ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set 2011-10-09 21:02 ` Gerd Stolpmann @ 2011-10-11 16:19 ` Ashish Agarwal 0 siblings, 0 replies; 8+ messages in thread From: Ashish Agarwal @ 2011-10-11 16:19 UTC (permalink / raw) To: Caml List [-- Attachment #1: Type: text/plain, Size: 4788 bytes --] (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 <info@gerd-stolpmann.de>wrote: > 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 > > <christophe.papazian@gmail.com> 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 à 00:46, Ashish Agarwal a écrit : > > > > > > > > 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 = "netstring shell netclient batteries > > biocaml pgocaml" > > version = "0.0" > > archive(byte) = "sequme.cma" > > archive(native) = "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. > ------------------------------------------------------------ > > [-- Attachment #2: Type: text/html, Size: 6400 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-11 16:19 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-10-08 22:46 [Caml-list] ocamlfind: When using -syntax, the META variable 'preprocessor' must be set Ashish Agarwal 2011-10-09 8:08 ` Gerd Stolpmann 2011-10-09 9:03 ` ygrek 2011-10-09 10:27 ` Philippe Veber 2011-10-09 12:23 ` Christophe Papazian 2011-10-09 17:16 ` Ashish Agarwal 2011-10-09 21:02 ` Gerd Stolpmann 2011-10-11 16:19 ` Ashish Agarwal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox