[Lazarus] Lazarus GTK project dependencies

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Apr 14 09:43:20 CEST 2011


On Thu, 14 Apr 2011 09:33:03 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

> 
> Hi,
> 
> due to some other topic discussed on the mailing list, I thought I'd check
> the dependencies of a simple lazarus project. The result is shown below.
> 
> I did this similar exercise a year or two ago, and the result has more than
> tripled !
> 
> I wonder, why all these dependencies ?? 
> I mean, libselinux, libcairo, libexpat, libdirectfb, libfusion, libdirect 
> (to name but a few), why do I need those ?

These are used by the gtk2 libs and vary by system.
For example on ubuntu 64bit there is no libfusion, libdirectfb,
libdirect.

You can check yourself:
ldd /usr/lib/libgtk-x11-2.0.so.0

So, any gtk2 program uses them.

> Besides making it more difficult to run a binary on another PC, 
> I hate to think what this does to the startup time of a binary.

If there is already another gtk program running the libs are already
loaded.

 
> At some time, the KDE project tried to reduce startup time of their binaries
> by redefining their APIs so shared libs would load faster.
> 
> Looking at the below list, I think it is high time that Lazarus does the same.
> If this means that some GTK import units must be split up in pieces, then I'll be 
> glad to take this task on me.
> 
> Michael.
> 
> Simple Lazarus app (GTK2) dependencies:
> 
>          linux-vdso.so.1 =>  (0x00007fff6b231000)
>          libpthread.so.0 => /lib/libpthread.so.0 (0x00007fed28a87000)
>          libdl.so.2 => /lib/libdl.so.2 (0x00007fed28883000)
>          libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fed2854c000)
>          libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007fed28330000)
>          libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0x00007fed27d0e000)
>          libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0x00007fed27a60000)
>          libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007fed27818000)
>          libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007fed2753a000)
>          libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007fed27334000)
>          libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007fed27130000)
>          libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007fed26ee6000)
>          libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007fed26cc4000)
>          libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007fed26a41000)
>          libc.so.6 => /lib/libc.so.6 (0x00007fed266be000)
>          /lib64/ld-linux-x86-64.so.2 (0x00007fed28cc8000)
>          libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fed264a1000)
>          libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007fed261ee000)
>          librt.so.1 => /lib/librt.so.1 (0x00007fed25fe6000)
>          libm.so.6 => /lib/libm.so.6 (0x00007fed25d62000)
>          libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fed25b50000)
>          libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007fed25946000)
>          libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007fed25742000)
>          libXi.so.6 => /usr/lib/libXi.so.6 (0x00007fed25532000)
>          libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007fed25329000)
>          libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007fed2511e000)
>          libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007fed24f11000)
>          libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007fed24d0e000)
>          libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007fed24b0a000)
>          libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007fed24904000)
>          libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007fed246da000)
>          libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fed24453000)
>          libz.so.1 => /lib/libz.so.1 (0x00007fed2423c000)
>          libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007fed24007000)
>          libpcre.so.3 => /lib/libpcre.so.3 (0x00007fed23dd8000)
>          libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007fed23b7f000)
>          libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0x00007fed238fb000)
>          libfusion-1.2.so.0 => /usr/lib/libfusion-1.2.so.0 (0x00007fed236f1000)
>          libdirect-1.2.so.0 => /usr/lib/libdirect-1.2.so.0 (0x00007fed234d8000)
>          libpng12.so.0 => /lib/libpng12.so.0 (0x00007fed232b0000)
>          libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0 (0x00007fed230ac000)
>          libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007fed22ea3000)
>          libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fed22c9e000)
>          libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fed22a98000)
>          libresolv.so.2 => /lib/libresolv.so.2 (0x00007fed2287f000)
>          libselinux.so.1 => /lib/libselinux.so.1 (0x00007fed22660000)
>          libexpat.so.1 => /lib/libexpat.so.1 (0x00007fed22437000)

If you find one that can be omitted please tell.

Mattias




More information about the Lazarus mailing list