caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus@oefai.at>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: skaller@ozemail.com.au, rnyberg@it.su.se, caml-list@inria.fr
Subject: Re: [Caml-list] shared libraries [pcre-ocaml]
Date: Tue, 23 Apr 2002 11:59:34 +0200	[thread overview]
Message-ID: <20020423095934.GA16442@kiefer.ai.univie.ac.at> (raw)
In-Reply-To: <20020423094308M.garrigue@kurims.kyoto-u.ac.jp>

On Tue, 23 Apr 2002, Jacques Garrigue wrote:
> Almost correct answer: the problem is of course with libpcre.so.0, not
> dllpcre.so. So if you put libpcre.so.0 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.

The only thing that needs to be changed is setting the installation path
(OCAML_LIB_INSTALL) correctly before "make"ing the library (as described
in the INSTALL-file; please do me all a favour and read it _before_
installation ;)

The linker stores the path to this directory in the generated
OCaml-library so that it can find any associated shared C-libraries.

The only known problem so far with the installation of Pcre-OCaml is
portability on MacOS X: shared libraries are not (yet) supported there,
because "libtool", which is used by the shipped C-library, obviously
misbehaves on this platform. Just compile the library statically then
as also described in the INSTALL-file.

> More basically, I would say that pcre-ocaml is not packaged correctly:
> for this kind of use, either the code of libpcre.so should be included
> in dllcpre.so (not too hard), or libcpre.so.0 should be installed to
> a public directory. Unfortunately the system loader does not provide
> any interface to change the load path cleanly.

My suggestion on the bug tracker was to automatically update the path to
shared C-libraries at runtime so that it also contains the directory in
which the associated OCaml-library resides.  This would make things much
easier for me, but as Xavier noted, this could cause endless troubles
with portability, because some systems may react differently to this hack.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2002-04-23 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22  8:30 Richard Nyberg
2002-04-22  9:42 ` Markus Mottl
2002-04-22 10:03   ` Richard Nyberg
2002-04-22 20:29 ` John Max Skaller
2002-04-23  0:43   ` Jacques Garrigue
2002-04-23  6:51     ` Richard Nyberg
2002-04-23  9:59     ` Markus Mottl [this message]
2002-04-24  0:20     ` John Max Skaller
2002-04-24 12:13       ` Xavier Leroy

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=20020423095934.GA16442@kiefer.ai.univie.ac.at \
    --to=markus@oefai.at \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    --cc=rnyberg@it.su.se \
    --cc=skaller@ozemail.com.au \
    /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).