public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Maciej Mrozowski <reavertm@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [RFC] More reliable hiding preserved libraries
Date: Sat, 3 Apr 2010 14:09:42 +0200	[thread overview]
Message-ID: <201004031409.43163.reavertm@gmail.com> (raw)
In-Reply-To: <20100403105604.GO817@gentoo.org>

On Saturday 03 of April 2010 12:56:04 Fabian Groffen wrote:
> Is it known why this does happen exactly?  When a lib is kept because it
> is still used, only its soname + what the soname points to should be
> kept.  That would mean the lib can no longer be found during linking,
> unless you add some trickery (or does GNU ld do something "handy" out of
> the box right here?).  So for example:
> 
>  % ls
>  usr/lib/libfoo.so -> libfoo.so.2.1
>  usr/lib/libfoo.so.2 -> libfoo.so.2.1
>  usr/lib/libfoo.so.2.1
> 
>  % scanelf --soname usr/lib/libfoo.so
>  libfoo.so.2 usr/lib/libfoo.so
> 
> what should kept preserved is:
> 
>  usr/lib/libfoo.so.2 -> libfoo.so.2.1
>  usr/lib/libfoo.so.2.1
> 
> because trying to link to libfoo using `gcc -o bar -lfoo bar.c` should
> (in theory and on some platforms at least) fail.

It doesn't matter, as 'broken' build system may alphabetically find library by 
file name, and link to this library by full path.

On Saturday 03 of April 2010 13:13:00 Michał Górny wrote:
> > 2. During "emerge", unset environment variable corresponding to said
> > preserved library directory - orphans are no longer located.
> Wouldn't that cause failure when the toolkit relies on a 'hidden'
> preserved library?

It would indeed. Now when I think about it, moving stuff to preserved library 
dir could be just done - provided it's possible - along with fixing/setting 
DT_RPATH's in reverse runtime dependencies. This way no system-wide 
LIBRARY_PATH's would be necessary.
Is it possible? Mike?

On Saturday 03 of April 2010 13:33:16 Gilles Dartiguelongue wrote:
> > There is opt-out suggestion[2], unfortunately it does not provide any
> > info how exactly it's supposed to be achieved. As far as portage/pkgcore
> > is concerned, maybe - as Brian Harring suggested - sandbox could be used
> > to somehow "hide" preserved libraries or preserved library directory
> > from ebuild environment (preserved library directory a'ka "purgatory" -
> > libs could be moved there when considered orphaned).
> that sounds nice, it would allow us to more easily spot
> packages/upstreams doing it wrong (maybe that would work for packages
> linking to themselves too btw)

Keeping preserved libraries in separate location (in "purgatory" or dumping 
place) is just a method for making implementation possibly easier (or possible 
at all), with nice side effects though.

-- 
regards
MM



  reply	other threads:[~2010-04-03 12:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-03 10:38 [gentoo-dev] [RFC] More reliable hiding preserved libraries Maciej Mrozowski
2010-04-03 10:46 ` Brian Harring
2010-04-03 10:56 ` Fabian Groffen
2010-04-03 12:09   ` Maciej Mrozowski [this message]
2010-04-03 12:16     ` Fabian Groffen
2010-04-03 11:13 ` Michał Górny
2010-04-03 11:33 ` Gilles Dartiguelongue
2010-04-03 18:51 ` Tiziano Müller
2010-04-03 21:05   ` Maciej Mrozowski
2010-04-04 15:33     ` Tiziano Müller
2010-04-05  6:16       ` Maciej Mrozowski
2010-04-05  6:44         ` Brian Harring
2010-04-05 13:27           ` Tiziano Müller
2010-04-05 18:09             ` Brian Harring
2010-04-05 13:38         ` Tiziano Müller

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=201004031409.43163.reavertm@gmail.com \
    --to=reavertm@gmail.com \
    --cc=gentoo-dev@lists.gentoo.org \
    /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