From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 8B634BBAF for ; Thu, 12 Jun 2008 19:26:49 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AosBAM74UEjAXQIniGdsb2JhbACBW5BBAQEBDyCcIwE X-IronPort-AV: E=Sophos;i="4.27,631,1204498800"; d="scan'208";a="11953222" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 12 Jun 2008 19:26:49 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m5CHQib7027900 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 12 Jun 2008 19:26:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkIAAM74UEjU436rmWdsb2JhbACBW5BBAQEBAQEIBQYJEQOcIAE X-IronPort-AV: E=Sophos;i="4.27,631,1204498800"; d="scan'208";a="13892883" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail3-smtp-sop.national.inria.fr with ESMTP; 12 Jun 2008 19:26:44 +0200 Received: from gate.lan.gerd-stolpmann.de (dslb-088-068-219-040.pools.arcor-ip.net [88.68.219.40]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1K6qZL11gy-0001Lg; Thu, 12 Jun 2008 19:26:41 +0200 Received: from [192.168.0.32] (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id DD4E6C077; Thu, 12 Jun 2008 19:26:38 +0200 (CEST) Subject: Re: [Caml-list] How to compile using sexplib? From: Gerd Stolpmann To: Luca de Alfaro Cc: Inria Ocaml Mailing List In-Reply-To: <28fa90930806120944p4cf312e0w88d74c12251ed046@mail.gmail.com> References: <28fa90930806120944p4cf312e0w88d74c12251ed046@mail.gmail.com> Content-Type: text/plain Date: Thu, 12 Jun 2008 19:28:07 +0200 Message-Id: <1213291687.10641.25.camel@flake.lan.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18GyfDWSC62OiXKfoFEAoo1y3pc1twPKk7ARfl zDIs7U2+o2/HOb0WakvSZ/yOuM7acPKd7BYZnWq/kEY93BvJpk SgRfSXp7c7ZzC02MLnH8UZUlb1FVNXo X-Miltered: at concorde with ID 48515C54.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gerd:01 stolpmann:01 donnerstag:01 serialize:01 ocamlfind:01 ocamlc:01 -package:01 hashtbl:01 bounded:01 camlp:01 -pp:01 camlp:01 ocamlfind:01 ocamlc:01 -package:01 Am Donnerstag, den 12.06.2008, 09:44 -0700 schrieb Luca de Alfaro: > I am trying to use sexplib to serialize some data structures, as many > of you advised, and I am somewhat stuck trying to compile. > This is what I get: > > ocamlfind ocamlc -package > unix,str,vec,mapmin,hashtbl_bounded,fileinfo,intvmap,extlib,mysql,sexplib -I ../../batch/analysis -I +camlp4 -pp camlp4orf -g -c online_db.ml > File "online_db.ml", line 44, characters 22-26: > Parse error: [semi] expected after [str_item] (in [implem]) > Preprocessor error I would try ocamlfind ocamlc -package sexplib,... -syntax camlp4o -I ... -c online_db.ml ocamlfind includes some mechanics to drive camlp4, and I am pretty sure sexplib configures that. Gerd > > where my line 44 is simply: > > type foo_t = int list with sexp > > I have the impression that the problem is in how I compile. > Specifically, if I do not use the "-pp camlp4orf" part, I get a > "syntax error", as the file is not getting preprocessed. > If I use the above -pp line, I get the error I reported. I am not > sure what is the proper way to preprocess the file, and unfortunately, > sexplib does not explain how to compile code against it. > I am sure this is obvious for everybody, but it is the first time I > use camlp4, so some help would be appreciated. > > All the best, > > Luca > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------