Gentoo Archives: gentoo-soc

From: Marius Mauch <google-soc@××××××.de>
To: gentoo-soc@l.g.o
Subject: Re: [gentoo-soc] Progress Report - Revdep-rebuild
Date: Thu, 26 Jun 2008 17:48:32
Message-Id: 20080626194735.7c4738d8@sheridan.genone.homeip.net
In Reply to: [gentoo-soc] Progress Report - Revdep-rebuild by Lucian Poston
1 On Wed, 25 Jun 2008 20:30:02 -0500
2 "Lucian Poston" <lucianposton@×××××.com> wrote:
3
4 > As mentioned last week, I created lists of "needed" libs and
5 > "installed" libs. I was hoping that the difference would produce a set
6 > of "missing" libs, but I encountered several problems with that, which
7 > I discuss below.
8
9 Yeah, it's not as easy as it might appear ;)
10
11 >
12 > The list of "needed" libraries is found by calling findProviders() on
13 > all installed files listed in each atom's CONTENTS. It's inefficient,
14 > but once I'm able to find a solution to the problems mentioned below,
15 > I will try a different implementation to build a list of "needed"
16 > libs, most likely by creating another method in LinkageMap (if that is
17 > okay).
18
19 Sure, basically just return the relevant field from
20 linkmap._obj_properties. But makre sure you understand how library
21 resolution works by reading ld.so(8), things like DT_RUNPATH makes
22 things a bit tricky.
23
24 > libodbc.so; libodbcinst.so; libgdbm.so.2; libdb-3.1.so;
25 > libcrypto.so.0.9.6:
26 >
27 > dev-java/sun-jdk-1.6.0.05/NEEDED.ELF.2:
28 > 386;/opt/sun-jdk-1.6.0.05/jre/lib/i386/libJdbcOdbc.so;libJdbcOdbc.so;$ORIGIN;libodbcinst.so,libodbc.so,libjvm.so,libc.so.6
29 > app-office/openoffice-bin-2.4.0/NEEDED.ELF.2:
30 > 386;/usr/lib/openoffice/program/python-core-2.3.4/lib/lib-dynload/dbm.so;;;libgdbm.so.2,libpthread.so.0,libc.so.6
31 >
32 > These libraries are needed as shown above; however, they are not in
33 > the filesystem and consequently have no scanelf entries in any NEEDED
34 > file. How are they dynamically linked when the library isn't
35 > installed? I'm not sure what's going on with these libraries at all.
36
37 Typical problem with binary packages. That's why revdep-rebuild doesn't
38 scan some directories.
39
40 > ld-linux.so.2 -> ld-2.6.1.so:
41 >
42 > This is installed by sys-libs/glibc-2.6.1; however, it has no entry in
43 > any NEEDED file. Scanning the library myself produces
44 > EM_386;/lib/ld-2.6.1.so;ld-linux.so.2;;. I'd assume that the dynamic
45 > linker would also have a NEEDED file entry for consistency, but it
46 > doesn't. Is there a reason why?
47
48 Well, I've got the following in
49 sys-libs/glibc-2.8_p20080602/NEEDED.ELF.2:
50
51 X86_64;/lib64/ld-2.8.so;ld-linux-x86-64.so.2;;
52
53 So not sure why you don't have it. Try rebuilding glibc, maybe it was a
54 bug in some older version.
55
56 > libGLcore.so.1; libnvidia-tls.so.1:
57 >
58 > Similar to above, these libraries from
59 > x11-drivers/nvidia-drivers-169.09-r1 are installed and dynamically
60 > linked to other libraries, but they have no entry in a NEEDED file.
61 > For libGLcore.so.1, scanelf produced
62 > EM_386;/usr/lib/opengl/nvidia/lib/libGLcore.so.169.09;libGLcore.so.1;;
63
64 Same as above, I've got the relevant entries here.
65
66 > libmix.so:
67 >
68 > dev-libs/libmix-2.05/NEEDED.ELF.2:
69 > 386;/usr/lib/libmix.so;;;libc.so.6
70 >
71 > It is a part of dev-libs/libmix-2.05 and needed by /usr/bin/nc, which
72 > is in net-analyzer/netcat-110-r8. This library is installed and has an
73 > entry in a NEEDED file, but that scanelf entry has no soname.
74
75 Interesting, might be a bug in that package.
76
77 > A couple other libraries (eg libpython2.3.so.1.0, libview.so.2,
78 > libatkmm-1.6.so.1, libcrypto.so.0.9.7, libglibmm-2.4.so.1), which are
79 > part of app-office/openoffice-bin-2.4.0 or
80 > app-emulation/vmware-workstation-5.5.5.56455, are located in
81 > directories, which are not in portage.util.getlibpaths().
82
83 See DT_RUNPATH in ld.so(8), and maybe look at the LinakgeMap code.
84
85 > As a consequence of the previous situations, the dict returned by
86 > findProviders() includes all the previously needed libraries as keys,
87 > but their associated values are the empty set. I'm unsure if these
88 > libraries should be ignored or if some other action should be taken.
89
90 To clarify: the keys of the returned dict are the soname of requried
91 libraries, and the values are lists of all providers in the library
92 path for the object. For the libraries listed above the primary thing
93 to do is to figure out why the entries are missing on your system. In
94 general when encountering an unexpected situation you should raise an
95 appropriate notice so it can be analyzed.
96
97 Marius
98
99 --
100 Public Key at http://www.genone.de/info/gpg-key.pub
101
102 In the beginning, there was nothing. And God said, 'Let there be
103 Light.' And there was still nothing, but you could see a bit better.
104 --
105 gentoo-soc@l.g.o mailing list