public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@redhat.com>
To: Richard Henderson <rth@redhat.com>
Cc: Tom Tromey <tromey@redhat.com>,
	Mark Mitchell <mark@codesourcery.com>,
	gcc@gcc.gnu.org
Subject: Re: Installation proposal
Date: Wed, 27 Feb 2002 17:38:00 -0000	[thread overview]
Message-ID: <orheo2e6nt.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: Richard Henderson's message of "Wed, 27 Feb 2002 13:48:57 -0800"

On Feb 27, 2002, Richard Henderson <rth@redhat.com> wrote:

> On Wed, Feb 27, 2002 at 12:32:27PM -0700, Tom Tromey wrote:
>> Don't shared libraries have to be relinked with knowledge of their
>> real install location?

> Not on sane systems.

> Libtool seems to be of the opinion that this is necessary
> everywhere, however.

Please do not spread mis-information about libtool.  You may have your
reasons to dislike libtool, but what you're saying is not true.

A sane system, to me, is one in which programs and libraries can find
their dependencies without the user having to resort to setting
LD_LIBRARY_PATH and *hoping* it will work, if they are installed in
the location they were configured for.

Libtool does in fact have to resort to relinking at install time in
some situations to guarantee this property.  I list such situations
below:

- on HPUX, when installing an executable linked using libtool that is
  linked with libtool libraries in their build-tree location.  That's
  because HPUX's linker doesn't support the equivalent of -rpath, so
  the executable must be relinked after the library is installed such
  that it can store the default pathname of the library into the
  executable.  This does not work for DESTDIR installations, and
  there's no way to overcome it on HPUX.

- on most other systems, when a libtool shared library is linked with
  another libtool shared library, the latter still being in its build
  tree.  Because libtool creates libraries in the build tree in such a
  way that they can be linked with and used in-place, it encodes
  build-tree pathnames into the library.  Then, at install time, it
  re-links libraries such that the work in the install tree.  Again,
  on HP-UX, DESTDIR installations don't work.


The former is a problem for GCJ executables on HPUX.  The latter would
be a problem for GCJ because it contains inter-library dependencies.
However, except on HPUX, it should work just fine, as long as a patch
that fixes relinking in DESTDIR installations is put in.  Assuming
we're actually going to `make install' into the install-tree hold
area, it would work just fine.  Except that executables and libraries
would be set up to find their dependencies in the final install tree,
so, if you already have earlier versions in there, your results may be
incorrect.

Messing up with shared libraries with inter-dependencies is very
dangerous business.  Nothing is as simple as you'd like and, and there
are some dynamic linkers in which LD_LIBRARY_PATH (or the equivalent)
won't do what you want.  In fact, on some systems there's no way to
override the path used to search for dependencies of shared library,
so the only hope is to get them correctly encoded into the shared
library itself.  Trying to fix it up with LD_LIBRARY_PATH afterwards
just won't work.

Beware!  You were warned :-)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer

  reply	other threads:[~2002-02-28  1:28 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-27 10:11 Mark Mitchell
2002-02-27 10:25 ` H . J . Lu
2002-02-27 10:26 ` David Edelsohn
2002-02-27 10:59   ` Jim Wilson
2002-02-27 13:05   ` Michael Meissner
2002-02-27 10:50 ` Paul Koning
2002-02-27 11:02 ` Stan Shebs
2002-02-27 11:04 ` Joseph S. Myers
2002-02-27 11:25   ` Mark Mitchell
2002-02-27 12:10     ` Joseph S. Myers
2002-02-27 11:05 ` Joel Sherrill
2002-02-27 11:53   ` Joseph S. Myers
2002-02-27 11:07 ` Tom Tromey
2002-02-27 11:26   ` Mark Mitchell
2002-02-27 14:55   ` Richard Henderson
2002-02-27 17:38     ` Alexandre Oliva [this message]
2002-02-27 17:45       ` Richard Henderson
2002-02-27 18:27         ` Alexandre Oliva
2002-02-28  0:04           ` Richard Henderson
2002-02-28  2:02       ` Joseph S. Myers
2002-02-28  2:25         ` Alexandre Oliva
2002-02-27 11:13 ` Laurent Guerby
2002-02-27 12:11   ` Zack Weinberg
2002-02-27 12:17   ` Jim Wilson
2002-02-27 14:43     ` Laurent Guerby
2002-02-27 12:52   ` Neil Booth
2002-02-27 11:18 ` Jim Wilson
2002-02-27 14:56   ` Daniel Jacobowitz
2002-02-27 17:18   ` Mark Mitchell
2002-02-27 17:20     ` Richard Henderson
2002-02-27 17:59       ` Mark Mitchell
     [not found]       ` <mailpost.1014859095.10690@news-sj1-1>
2002-02-27 18:16         ` cgd
2002-02-27 11:23 ` Per Bothner
2002-02-28  1:39   ` Akim Demaille
2002-02-27 14:56 ` Nathan Sidwell
2002-02-27 16:11 ` Loren James Rittle
2002-02-27 17:47 ` Alexandre Oliva
2002-02-27 18:00   ` Daniel Jacobowitz
2002-02-28 14:06     ` Alexandre Oliva
2002-02-27 18:33   ` Mark Mitchell
2002-02-28  9:18     ` Per Bothner
2002-02-28  9:42       ` Mark Mitchell
2002-02-28  1:13   ` Akim Demaille
2002-02-27 10:48 Mark Mitchell
2002-02-27 11:07 Benjamin Kosnik
2002-02-27 13:22 mike stump
2002-02-28 11:51 mike stump
2002-02-28 12:56 ` Mark Mitchell
2002-02-28 14:04 ` Alexandre Oliva
2002-02-28 14:28   ` Per Bothner
2002-02-28 16:32   ` Richard Henderson

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=orheo2e6nt.fsf@free.redhat.lsd.ic.unicamp.br \
    --to=aoliva@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=rth@redhat.com \
    --cc=tromey@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).