From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA19956; Mon, 22 Sep 2003 23:07:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA29625 for ; Mon, 22 Sep 2003 23:07:55 +0200 (MET DST) Received: from kraid.nerim.net (smtp-101-monday.nerim.net [62.4.16.101]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8ML7tH22740 for ; Mon, 22 Sep 2003 23:07:55 +0200 (MET DST) Received: from karryall.dnsalias.org (karryall.dnsalias.org [62.4.18.180]) by kraid.nerim.net (Postfix) with ESMTP id 3E7D140ED7; Mon, 22 Sep 2003 23:07:53 +0200 (CEST) Received: by karryall.dnsalias.org (Postfix, from userid 500) id F37881A064C; Mon, 22 Sep 2003 23:07:53 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16239.25769.750036.188415@karryall.dnsalias.org> Date: Mon, 22 Sep 2003 23:07:53 +0200 From: Olivier Andrieu To: Narayanan Krishnamurthy Cc: caml-list@inria.fr Subject: Re: [Caml-list] Having problems with '-rpath' or '-rpath-link' to ocamlopt In-Reply-To: <3F6F367E.C0E7B250@motorola.com> References: <3F6F367E.C0E7B250@motorola.com> X-Mailer: VM 7.17 under Emacs 21.2.1 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; andrieu:01 andrieu:01 caml-list:01 ocamlopt:01 narayanan:01 pcre:01 libpcre:01 usr:01 libpcre:01 pcre:01 usr:01 ocamlopt:01 -rpath:01 -lpcre:01 run-time:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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