caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Martin Jambon" <martin.jambon@ens-lyon.org>
Cc: "Jake Donham" <jake.donham@skydeck.com>, caml-list@inria.fr
Subject: Re: [Caml-list] camlp4 -I and shared libs
Date: Mon, 25 Jun 2007 16:19:57 +0200	[thread overview]
Message-ID: <cd67f63a0706250719v702a9bb2p3b67cddc388101@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706251443290.14769@martin.ec.wink.com>

On 6/25/07, Martin Jambon <martin.jambon@ens-lyon.org> wrote:
> On Sun, 24 Jun 2007, Jake Donham wrote:
>
> > Hi,
> >
> > Should the -I flag to camlp4 add the directory to the shared library
> > search path, as it does with ocamlc?
> >
> > I was trying to use Micmatch (very nice by the way) with ocamlfind, as
> > follows:
>
> (thanks)
>
> > ocamlfind ocamlc -syntax camlp4o -ppopt pa_micmatch_pcre.cmo
> > -package micmatch_pcre [...]
>
> It seems you forgot either -c or -linkpkg.
> The following should work.
>
> ocamlfind ocamlc -c -syntax camlp4o -package micmatch_pcre toto.ml
> ocamlfind ocamlc -o toto -syntax camlp4o -package micmatch_pcre -linkpkg toto.ml
>
>
> > but I get an error that it cannot find dllpcre.so. What is happening
> > is that ocamlfind has pcre-ocaml as a dependency of micmatch_pcre
> > (even though this is needed only at runtime, not at preprocessing
> > time), so it adds pcre.cma and -I $SITE_LIB/pcre to the camlp4 command
> > line. Now pcre.cma needs dllpcre.so, which is in $SITE_LIB/pcre, but
> > this path is not added to the shared library search path. (It's easy
> > to work around this by constructing a camlp4 call directly, since
> > pcre.cma is not needed.)
> >
> > This is with 3.09.3 but a glance at the 3.10.0 source suggests it has
> > the same behavior. It's a one-line change (call Dll.add_path after
> > Dynlink.init in camlp4/odyl/odyl_main.ml or
> > camlp4/CamlP4/Struct/DynLoader.ml) to fix it.
>
> Note that the current version of micmatch does not work under ocaml/camlp4
> 3.10.0. I recommend using 3.09.3 until the new camlp4 is more mature.

No major change is planned for Camlp4. I think that's reasonable to
start translating extensions.

-- 
Nicolas Pouillard


  reply	other threads:[~2007-06-25 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25  3:33 Jake Donham
2007-06-25 12:57 ` [Caml-list] " Martin Jambon
2007-06-25 14:19   ` Nicolas Pouillard [this message]
2007-06-25 18:24     ` Jake Donham
2007-06-27  5:32       ` Jake Donham
2007-06-29  7:49     ` Hendrik Tews
2007-06-29  9:39       ` Nicolas Pouillard
2007-06-29 10:23         ` Robert Roessler
2007-06-29 10:44           ` Benedikt Grundmann
2007-06-29 14:06             ` Nicolas Pouillard
2007-06-29 12:41         ` skaller
2007-06-29 13:48           ` Nicolas Pouillard

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=cd67f63a0706250719v702a9bb2p3b67cddc388101@mail.gmail.com \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=jake.donham@skydeck.com \
    --cc=martin.jambon@ens-lyon.org \
    /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;
as well as URLs for NNTP newsgroup(s).