[Wylug-discuss] Re: what is the difference?

Mark P. Conmy mpc at comp.leeds.ac.uk
Wed Sep 5 20:15:16 BST 2007


On Wed, 5 Sep 2007, Anne Wilson wrote:
>
> I'm fairly certain you are wrong.  You need to install all libraries,
> but they are not loaded into memory.  Libraries are called as and when
> required.

In theory, you're (kind of) right.  In practice...

The whole way that libraries are arranged these days tends to tie
libraries together in ways that mean that equivalent functionality has
to be provided in multiple "frameworks" rather than sharing* a single
implementation.  As a result, writing with (say) Qt (the underlying
framework used in KDE) means buying into a whole load of things that
come with it whereas GTK+ (GNOME, originally GIMP) means all the other
libraries.

* There are _some_ efforts to avoid this in certain cases, but there
   are long and complex reasons I could explain as to why this is (in
   current generation languages with current SE tools) unlikely to
   be a large percentage.

Even fairly simple applications like gnome-terminal are complex (see
end) with very complex dependencies - in this case 76 library mappings
from X (GUI) to bonobo (messaging), SSL (encryption) to libcap
(capabilities).

So, if you start mixing and matching applications, some things are
shared (you can be pretty sure libc and other core libraries will), but
you _will_ have duplication of libraries and also a whole lot of stuff
loaded that you aren't necessarily aware of (and may never use).

At the same time, demand paging means that if it's literally _never_
used, it won't get loaded at all, but it's surprising how much behaviour
in practice is non-intuitive and you find that something you wouldn't
expect to be called in practice _is_ actually used.

Unless you have an underpowered or small-memory system, I wouldn't let
it worry you too much, though, but modern SE techniques _have_ created
asbolutely monstrous dependencies that _do_ create messy and inefficient
memory usage profiles...which may or may not bite you.

Mark

% ldd /usr/bin/gnome-terminal
 	linux-gate.so.1 =>  (0x00257000)
 	libglade-2.0.so.0 => /usr/lib/libglade-2.0.so.0 (0x02532000)
 	libgnomeui-2.so.0 => /usr/lib/libgnomeui-2.so.0 (0x0249b000)
 	libSM.so.6 => /usr/lib/libSM.so.6 (0x009d2000)
 	libICE.so.6 => /usr/lib/libICE.so.6 (0x009dd000)
 	libbonoboui-2.so.0 => /usr/lib/libbonoboui-2.so.0 (0x025b1000)
 	libgnome-keyring.so.0 => /usr/lib/libgnome-keyring.so.0 (0x05141000)
 	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x05aae000)
 	libgnomecanvas-2.so.0 => /usr/lib/libgnomecanvas-2.so.0 (0x02582000)
 	libgnome-2.so.0 => /usr/lib/libgnome-2.so.0 (0x04fd7000)
 	libpopt.so.0 => /usr/lib/libpopt.so.0 (0x0059d000)
 	libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x00c13000)
 	libstartup-notification-1.so.0 => /usr/lib/libstartup-notification-1.so.0 (0x051b6000)
 	libvte.so.4 => /usr/lib/libvte.so.4 (0x00a33000)
 	libncurses.so.5 => /usr/lib/libncurses.so.5 (0x0516b000)
 	libXft.so.2 => /usr/lib/libXft.so.2 (0x00dda000)
 	libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00258000)
 	libpangoxft-1.0.so.0 => /usr/lib/libpangoxft-1.0.so.0 (0x00110000)
 	libpangox-1.0.so.0 => /usr/lib/libpangox-1.0.so.0 (0x00a25000)
 	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x009c7000)
 	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00988000)
 	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x008ee000)
 	libz.so.1 => /usr/lib/libz.so.1 (0x00782000)
 	libX11.so.6 => /usr/lib/libX11.so.6 (0x00797000)
 	libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00d37000)
 	libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00c90000)
 	libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00c2c000)
 	libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00d2c000)
 	libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00cae000)
 	libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00d02000)
 	libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00c46000)
 	libgnomevfs-2.so.0 => /usr/lib/libgnomevfs-2.so.0 (0x05010000)
 	libbonobo-2.so.0 => /usr/lib/libbonobo-2.so.0 (0x04eac000)
 	libgconf-2.so.4 => /usr/lib/libgconf-2.so.4 (0x00117000)
 	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00bcc000)
 	libbonobo-activation.so.4 => /usr/lib/libbonobo-activation.so.4 (0x04f12000)
 	libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 (0x04e40000)
 	libm.so.6 => /lib/libm.so.6 (0x00755000)
 	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00c0d000)
 	libdl.so.2 => /lib/libdl.so.2 (0x0077c000)
 	libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x0014d000)
 	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00b38000)
 	libpthread.so.0 => /lib/libpthread.so.0 (0x008b5000)
 	libc.so.6 => /lib/libc.so.6 (0x00620000)
 	libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00b14000)
 	libesd.so.0 => /usr/lib/libesd.so.0 (0x0608a000)
 	libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x0605d000)
 	libexpat.so.0 => /lib/libexpat.so.0 (0x008cb000)
 	libXau.so.6 => /usr/lib/libXau.so.6 (0x00896000)
 	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0089b000)
 	libXext.so.6 => /usr/lib/libXext.so.6 (0x008a3000)
 	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x009f9000)
 	libXi.so.6 => /usr/lib/libXi.so.6 (0x00c86000)
 	libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00a05000)
 	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00a0b000)
 	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x009fe000)
 	libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0095e000)
 	libssl.so.6 => /lib/libssl.so.6 (0x005a7000)
 	libcrypto.so.6 => /lib/libcrypto.so.6 (0x0563c000)
 	libavahi-glib.so.1 => /usr/lib/libavahi-glib.so.1 (0x00152000)
 	libavahi-common.so.3 => /usr/lib/libavahi-common.so.3 (0x00156000)
 	libavahi-client.so.3 => /usr/lib/libavahi-client.so.3 (0x04e9a000)
 	libresolv.so.2 => /lib/libresolv.so.2 (0x00162000)
 	libutil.so.1 => /lib/libutil.so.1 (0x05cbe000)
 	librt.so.1 => /lib/librt.so.1 (0x00175000)
 	libORBitCosNaming-2.so.0 => /usr/lib/libORBitCosNaming-2.so.0 (0x0017d000)
 	/lib/ld-linux.so.2 (0x00603000)
 	libasound.so.2 => /lib/libasound.so.2 (0x05bdd000)
 	libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00182000)
 	libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x0019b000)
 	libcom_err.so.2 => /lib/libcom_err.so.2 (0x00df0000)
 	libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00210000)
 	libdbus-1.so.2 => /lib/libdbus-1.so.2 (0x04dcb000)
 	libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00df5000)
 	libcap.so.1 => /lib/libcap.so.1 (0x00235000)
 	libnsl.so.1 => /lib/libnsl.so.1 (0x00dc3000)



More information about the Wylug-discuss mailing list