Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] shared libraries [pcre-ocaml]
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Nyberg <rnyberg@i...>
Subject: Re: [Caml-list] shared libraries [pcre-ocaml]
> > Argg... crappy unix hackery. The dynamic loader typically searches for
> > relative filenames in the ldconfig'd search path, augmented by LD_PATH
> > environment variable. Absolute filenames just get opened directly.
> > 
> > You can see below that ocaml is manually stat'ing in places
> > it knows about before doing a dlopen on an absolute filename.
> > Unfortunately, it depends on another shared lib, and ld is
> > searching for that by itself.
> > 
> > It doesn't find it, since /usr/local/ocaml/site-lib/pcre isn't on the 
> > ldconfig path.
> > This suggests the binding to installed in is a 
> > relative
> > filename. So does the ld.conf file above .. and if you run ldconfig on that,
> > of course now the load works.
> > 
> > Running ldconfig on the ld.conf file will work.
> > Another solution is simply to install in /usr/local/lib.
> > Another is to put a symbolic link there. None of these solutions is
> > very good ..
> Almost correct answer: the problem is of course with, not
> So if you put in any place where the system
> loader can find it (like /usr/local/lib, but also any directory in
> LD_LIBRARY_PATH), things will work smooth.
> More basically, I would say that pcre-ocaml is not packaged correctly:
> for this kind of use, either the code of should be included
> in (not too hard), or should be installed to a
> public directory. Unfortunately the system loader does not provide any
> interface to change the load path cleanly.

Well, you are both right of course, but the real problem here was me.
There is no problem with pcre-ocaml if you tell it where to look for
its libraries. I had just missed setting OCAML_LIB_INSTALL correctly
when I installed pcre-ocaml.

So, it's my bad and I promise to _read_ the documentation instead of
just _looking_ at it next time ;)

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: