From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7B278BBAF for ; Tue, 21 Dec 2010 04:02:24 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnoGAMinD02ty1O7/2dsb2JhbACVc44Zc79ChUkEhGWJMxo X-IronPort-AV: E=Sophos;i="4.60,205,1291590000"; d="scan'208";a="84478121" Received: from elehack.net ([173.203.83.187]) by mail2-smtp-roc.national.inria.fr with ESMTP; 21 Dec 2010 04:02:23 +0100 Received: from [192.168.42.102] (unknown [68.168.162.166]) by elehack.net (Postfix) with ESMTPSA id CB7D5C8348 for ; Mon, 20 Dec 2010 21:02:16 -0600 (CST) Message-ID: <4D1018B5.1070800@elehack.net> Date: Mon, 20 Dec 2010 21:02:13 -0600 From: Michael Ekstrand User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Lwt and OCamlMakefile References: <2D355E1A-E205-4FD6-82E9-A50E949C6B81@ezabel.com> <3746A668-E963-40AE-A441-B01517F1E13E@ezabel.com> In-Reply-To: <3746A668-E963-40AE-A441-B01517F1E13E@ezabel.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; camlp:01 cmo:01 dynlink:01 camlp:01 cmo:01 ocamlfind:01 ocamlfind:01 cmo':01 -predicates:01 syntax:01 -package:01 syntax:01 makefile:01 wrote:01 caml-list:01 On 12/20/2010 08:36 PM, orbitz@ezabel.com wrote: > Thanks, I forgot to mention that I am setting that: > > (*pp camlp4o pa_lwt.cmo *) > > (that is where it is coming from in my paste) > > But it is still failing at the Dynlink. The thing is that camlp4o doesn't know where to find pa_lwt.cmo. This is what ocamlfind helps with. Unfortunately, OCamlMakefile's ocamlfind integration is incomplete when it comes to preprocessors. On some systems, you may be able do 'camlp4o -I +lwt pa_lwt.cmo', but that isn't portable (it depends on lwt being installed in the std-lib directory). So, the real solution is to use a shell script which wraps 'camlp4o' and looks up the appropriate package lines with ocamlfind. It will do something like camlp4 $(ocamlfind -predicates preprocesor,syntax -syntax camlp4o -package lwt.syntax) but I do not remember the exact details. I do remember that I defined a PP environment variable in my Makefile with the path to the script, so I could do (*pp $PP lwt.syntax *) and it would expand to wherever the shell script was (I had multiple directories in my source tree when I used OCamlMakefile). - Michael