tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: patch for REQUIRES
On Sun, Mar 18, 2012 at 10:47:26PM +0100, Filip Hajny wrote:
> On 18. 3. 2012, at 21:46, Joerg Sonnenberger wrote:
>
> > On Sun, Mar 18, 2012 at 08:57:53PM +0100, Filip Hajny wrote:
> >> On 18. 3. 2012, at 19:06, Joerg Sonnenberger wrote:
> >>
> >>> On Sun, Mar 18, 2012 at 01:55:44PM +0100, Filip Hajny wrote:
> >>>> Without the patch, for instance 'expat' has /usr/lib/libexpat.so.1 (or
> >>>> whatever else 'ldd' resolved under the DESTDIR environment) recorded
> >>>> in its REQUIRES, even though the binary (xmlwf) is in fact linked
> >>>> against the package's own libexpat.so.1.
> >>>
> >>> BTW, you should look at getting the readelf based shared library check
> >>> to work for Solaris, since it is more precise and reliable.
> >>
> >> Thanks, but that's not a good option IMO. readelf is not a guaranteed
> >> part of the SunOS platform. And bringing in devel/binutils opens
> >> a different can of worms.
> >
> > Solaris has no tools to extract the necessary data directly in the base
> > installation? It doesn't have to be readelf. I.e. what is needed is
> > DT_RPATH and DT_NEEDED.
>
> There is elfdump, but I don't see how it helps in this case. The only
> information you can get from NEEDED are the base names of the
> libraries, and RPATH reports (typically) the single ${PREFIX}/lib path,
> so you can't get a full list of "what's required from where", let
> alone identify which libs are to be ignored for the REQUIRES meta, for
> they are in fact part of the PROVIDES meta.
>
> Or am I missing something?
As mentioned in the discussion about the broken ld behavior in newer
binutils, "what's required from where" is the wrong question. If a
program is linked against gtk2, it doesn't matter what libraries gtk2 is
linked against. What's is required for the shlib check and by extension
the REQUIRES/PROVIDES handling is the list of rpath entries and the
directly referenced objects (DT_NEEDED). Strictly speaking, the latter
is what should be in REQUIRES/PROVIDES, but resolving it into the full
path requires only knowing the default linker path of the platform.
That's what the ELF check shlib handling is doing.
Joerg
Home |
Main Index |
Thread Index |
Old Index