caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olivier Andrieu <andrieu@ijm.jussieu.fr>
To: Narayanan Krishnamurthy <Narayanan.Krishnamurthy@motorola.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Having problems with '-rpath' or '-rpath-link' to ocamlopt
Date: Mon, 22 Sep 2003 23:07:53 +0200	[thread overview]
Message-ID: <16239.25769.750036.188415@karryall.dnsalias.org> (raw)
In-Reply-To: <3F6F367E.C0E7B250@motorola.com>

 Narayanan Krishnamurthy [Monday 22 September 2003] :
 > I have two versions of the PCRE "C" libpcre.so
 > libraries. Let us say that the locations
 > of the "C" libraries are as follows.
 > 
 > a) v1.0 : /usr/local/lib/libpcre.so
 > b) v2.0 : /mylocal/libpcre.so
 > 
 > I've built the ocaml pcre package (5.02: pcre.cmxa and pcre.cma) 
 > using the "C" v2.0 shared library /mylocal/libpcre.so.
 > I have pcre.cmxa in my current working directory.
 > 
 > With my LD_LIBRARY_PATH set as
 > LD_LIBRARY_PATH = /lib:/usr/lib:/usr/local/lib
 > I now run
 > a) ocamlopt -o myexec pcre.cmxa myexec.o \
 >      -cclib -rpath/mylocal -cclib -lpcre
 > 
 > and find that 'myexec' has the /usr/local/lib/libpcre.so
 > as the run-time shared library instead of
 > /mylocal/libpcre.so (I use 'ldd' on 'myexec')

Sure. LD_LIBRARY_PATH is meant to override the runtime library search
path that is included in the executable (via -rpath or via
LD_RUN_PATH).

 > It seems like I am unable to override the LD_LIBRARY_PATH
 > environment variable using '-rpath' for the linker.

I think you've got it backwards : what you see is LD_LIBRARY_PATH
doing what it is meant to do, that is overriding '-rpath' options.

[I don't know about SunOS actually but that's the behaviour on GNU
systems]. 

-- 
   Olivier

-------------------
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:[~2003-09-22 21:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-22 17:50 Narayanan Krishnamurthy
2003-09-22 21:07 ` Olivier Andrieu [this message]
2003-09-22 21:23 ` Gerd Stolpmann
2003-09-24  2:44 ` Jacques Garrigue

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=16239.25769.750036.188415@karryall.dnsalias.org \
    --to=andrieu@ijm.jussieu.fr \
    --cc=Narayanan.Krishnamurthy@motorola.com \
    --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).