caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* camlp4 -I and shared libs
@ 2007-06-25  3:33 Jake Donham
  2007-06-25 12:57 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 12+ messages in thread
From: Jake Donham @ 2007-06-25  3:33 UTC (permalink / raw)
  To: caml-list

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:

  ocamlfind ocamlc -syntax camlp4o -ppopt pa_micmatch_pcre.cmo
-package micmatch_pcre [...]

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.

Thanks,

Jake


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-06-29 14:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25  3:33 camlp4 -I and shared libs Jake Donham
2007-06-25 12:57 ` [Caml-list] " Martin Jambon
2007-06-25 14:19   ` Nicolas Pouillard
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

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).