Too many libraries?
Hi,
I was porting a package of mine to GNOME 2 (i18n's sake). I have:
$ readelf -d celestia | grep NEEDED | cut -d : -f 2- | sort -u
[libGL.so.1]
[libGLU.so.1]
[libICE.so.6]
[libORBit-2.so.0]
[libSM.so.6]
[libart_lgpl_2.so.2]
[libatk-1.0.so.0]
[libbonobo-2.so.0]
[libbonobo-activation.so.4]
[libbonoboui-2.so.0]
[libc.so.6]
[libdl.so.2]
[libgconf-2.so.4]
[libgdk-x11-2.0.so.0]
[libgdk_pixbuf-2.0.so.0]
[libglib-2.0.so.0]
[libglut.so.3]
[libgmodule-2.0.so.0]
[libgnome-2.so.0]
[libgnomecanvas-2.so.0]
[libgnomeui-2.so.0]
[libgnomevfs-2.so.0]
[libgobject-2.0.so.0]
[libgthread-2.0.so.0]
[libgtk-x11-2.0.so.0]
[libgtkgl-2.0.so.1]
[libjpeg.so.62]
[liblinc.so.1]
[libm.so.6]
[libpango-1.0.so.0]
[libpangoft2-1.0.so.0]
[libpangox-1.0.so.0]
[libpangoxft-1.0.so.0]
[libpng.so.3]
[libpthread.so.0]
[libstdc++-libc6.2-2.so.3]
[libxml2.so.2]
[libz.so.1]
Of those, the package actually uses:
[libGL.so.1]
[libGLU.so.1]
[libc.so.6]
[libgdk_pixbuf-2.0.so.0]
[libglib-2.0.so.0]
[libglut.so.3]
[libgnome-2.so.0]
[libgnomeui-2.so.0]
[libgtk-x11-2.0.so.0]
[libgtkgl-2.0.so.1]
[libjpeg.so.62]
[libm.so.6]
[libpng.so.3]
[libstdc++-libc6.2-2.so.3]
Please note, the first list is the libraries that get included in the
program's headers. The stuff in the first list and not in the second
from pkg-config's output. There isn't any fundamental problem with
this, except that all the packages that provide the first list get
included in my package's dependencies, when in fact all those are
indirect dependencies. This translates into higher complexity in
terms of package installation order.
If library a (liba) depends on library b (libb) internally, a program
only needs to link against library a and library b is pulled in by the
dynamic linker, iff library a's dependencies include library b, like
this:
$ cc -shared -o liba.so liba.o -lb
$ cc -o myprogram -la
there's no need for
$ cc -o myprogram -la -lb
Other dynamic linkers (not GNU's) need this kind of thing, but we are
not talking about other dynamic linkers here.
Just for laughs:
$ ldd ./celestia | wc -l
51
I have the feeling Chris is going to throw my patch out of the
window...
TIA,
--
Marcelo | "Pour encourjay lays ortras."
mmagallo@debian.org | -- (Terry Pratchett, Guards! Guards!)
--
To UNSUBSCRIBE, email to debian-gtk-gnome-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: