caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Nyberg <rnyberg@it.su.se>
To: caml-list@inria.fr
Subject: [Caml-list] shared libraries [pcre-ocaml]
Date: Mon, 22 Apr 2002 10:30:46 +0200	[thread overview]
Message-ID: <20020422103046.B21430@gromit.it.su.se> (raw)

Hello I've some problems with ocaml and shared libraries. I'm running
a recent FreeBSD-4-STABLE and have ocaml 3.04 installed from ports.

pcre-ocaml is built with shared libraries and is installed in
/usr/local/lib/ocaml/site-lib/pcre

ocaml's ld.conf contains the following lines:

----------ld.conf
/usr/local/lib/ocaml
/usr/local/lib/ocaml/labltk
/usr/local/lib/ocaml/site-lib/pcre
----------

If I use ocamlopt to compile everything is fine but when I use ocamlc
the following error occurs.

----------compiling
# ocamlc -o myprog -I +site-lib/netstring -I +site-lib/pcre \
         unix.cma pcre.cma netstring.cma myprog.ml

Error on dynamically loaded library: Shared object "libpcre.so.0" not found
----------

I ran truss to see the syscalls made by ocamlc (relevant bit below) and
to me it seems as if it finds dllpcre.so but not libpcre.so.0 on which
dllpcre.so depends. However if I run ldconfig to include pcre-ocaml's
installation directory everything works just fine.

So, should I have to use ldconfig or is there something wrong?

---------truss
stat("/usr/local/lib/ocaml/site-lib/netstring/dllpcre.so",0xbfbff524) ERR#2 'No 
such file or directory'
stat("/usr/local/lib/ocaml/site-lib/pcre/dllpcre.so",0xbfbff524) = 0 (0x0)
sigprocmask(0x1,0x28072c80,0xbfbff4e4)           = 0 (0x0)
open("/usr/local/lib/ocaml/site-lib/pcre/dllpcre.so",0x0,056) = 6 (0x6)
fstat(6,0xbfbff494)                              = 0 (0x0)
read(0x6,0xbfbfe464,0x1000)                      = 4096 (0x1000)
mmap(0x0,12288,0x5,0x2,6,0x0)                    = 672776192 (0x2819c000)
mmap(0x2819e000,4096,0x3,0x12,6,0x1000)          = 672784384 (0x2819e000)
close(6)                                         = 0 (0x0)
access("/usr/local/lib/ocaml/contrib/libpcre.so.0",0) ERR#2 'No such file or dir
ectory'
access("/usr/lib/libpcre.so.0",0)                ERR#2 'No such file or director
y'
access("/usr/lib/compat/libpcre.so.0",0)         ERR#2 'No such file or director
y'
access("/usr/X11R6/lib/libpcre.so.0",0)          ERR#2 'No such file or director
y'
access("/usr/local/lib/libpcre.so.0",0)          ERR#2 'No such file or director
y'
access("/usr/lib/elf/libpcre.so.0",0)            ERR#2 'No such file or director
y'
access("/usr/lib/libpcre.so.0",0)                ERR#2 'No such file or director
y'
-------------

	-Richard
-------------------
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


             reply	other threads:[~2002-04-22  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22  8:30 Richard Nyberg [this message]
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
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=20020422103046.B21430@gromit.it.su.se \
    --to=rnyberg@it.su.se \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).