caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: info@gerd-stolpmann.de
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] A step short of -noautolink?
Date: Sat, 19 Apr 2003 12:07:02 +0900	[thread overview]
Message-ID: <20030419120702Y.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <1050668666.1063.35.camel@ice.gerd-stolpmann.de>

From: Gerd Stolpmann <info@gerd-stolpmann.de>

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


      reply	other threads:[~2003-04-19  3:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-17 23:43 Greg Kimberly
2003-04-18  0:14 ` Jacques Garrigue
2003-04-18 12:24   ` Gerd Stolpmann
2003-04-19  3:07     ` Jacques Garrigue [this message]

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=20030419120702Y.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).