From: Michael Ekstrand <michael@elehack.net>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Lwt and OCamlMakefile
Date: Mon, 20 Dec 2010 21:02:13 -0600 [thread overview]
Message-ID: <4D1018B5.1070800@elehack.net> (raw)
In-Reply-To: <3746A668-E963-40AE-A441-B01517F1E13E@ezabel.com>
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
next prev parent reply other threads:[~2010-12-21 3:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 1:05 orbitz
2010-12-21 2:25 ` [Caml-list] " Markus Mottl
2010-12-21 2:36 ` orbitz
2010-12-21 3:02 ` Michael Ekstrand [this message]
2010-12-21 18:42 ` orbitz
2010-12-22 1:55 ` Romain Beauxis
2010-12-21 8:57 ` Jérémie Dimino
2010-12-21 10:21 ` Sylvain Le Gall
2010-12-21 13:18 ` [Caml-list] " Adrien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D1018B5.1070800@elehack.net \
--to=michael@elehack.net \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox