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 FAA08032; Sat, 19 Apr 2003 05:07:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA07723 for ; Sat, 19 Apr 2003 05:07:12 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h3J37A918832 for ; Sat, 19 Apr 2003 05:07:10 +0200 (MET DST) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2/3.7W) with ESMTP id MAA08621; Sat, 19 Apr 2003 12:06:59 +0900 (JST) To: info@gerd-stolpmann.de Cc: caml-list@inria.fr Subject: Re: [Caml-list] A step short of -noautolink? In-Reply-To: <1050668666.1063.35.camel@ice.gerd-stolpmann.de> References: <4.3.2.7.2.20030417161344.05d6ed50@mail.attbi.com> <20030418091453Y.garrigue@kurims.kyoto-u.ac.jp> <1050668666.1063.35.camel@ice.gerd-stolpmann.de> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20030419120702Y.garrigue@kurims.kyoto-u.ac.jp> Date: Sat, 19 Apr 2003 12:07:02 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) X-Spam: no; 0.00; jacques:01 caml-list:01 -noautolink:01 gerd:01 stolpmann:01 dynamically:01 re-building:01 ocamlc:01 -rpath:01 ocaml:01 irrelevant:01 stubs:01 garrigue:01 lib:01 ocamlmklib:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Gerd Stolpmann > > Note that all this may be irrelevant to dynamically loaded stubs: in > > that case details about where to find the C library are inside > > dll???.so, and you cannot change them. However, you can change the > > load path with LD_LIBRARY_PATH (the system ld.so is at work in this > > case, and ocaml knows nothing about it). > > You can also set LD_RUN_PATH when you build the dll???.so. In this case, > the path is stored in the file, and is automatically remembered when the > library is loaded. Actually this is not an answer to the original question: it was about changing the linking/path for an already built library. My point was just that, unfortunately you cannot go into dll???.so to modify it afterwards individually. But ocamlmklib also builds lib???.a, which contains exactly the same objects as dll???.so. So you can also act in this case by re-building dll???.so from lib???.a, if you know enough about your system's linker. (Currently when you compile C files with ocamlc, this produces PIC objets, so that lib???.a shall contain only PIC objects, but this may change in the future.) If you want to set the runpath at build time with ocamlmklib, you can already do it with the -rpath option. LD_RUN_PATH may be an alternative on some systems. Cheers, Jacques Garrigue ------------------- 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