[Lazarus] Lazarus GTK project dependencies

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus GTK project dependencies

Michael Van Canneyt

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 ?

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.

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)


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

zeljko
On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?

You don't but gtk does (or cairo or some xlib).

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Mattias Gaertner
In reply to this post by Michael Van Canneyt
On Thu, 14 Apr 2011 09:33:03 +0200 (CEST)
Michael Van Canneyt <[hidden email]> 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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

michael.vancanneyt
In reply to this post by zeljko


On Thu, 14 Apr 2011, zeljko wrote:

> On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
>
> You don't but gtk does (or cairo or some xlib).

Hm. I did a quick check:

fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
44
fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
31

So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to direct framebuffer
access, which is total nonsense in a X environment.

Well, this reminds me why I use KDE and not Gnome.

How complete/stable is the Qt version of the LCL, and what version of Qt is needed ?

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Sven Barth
In reply to this post by Michael Van Canneyt
I'll comment on libraries that might not be clear:

Am 14.04.2011 09:33, schrieb Michael Van Canneyt:

> 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)

These three are needed by GTK. Pango is (basically) the "font backend",
Cairo is the drawing backend while ATK is needed to provide
accessibility features

> 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)

Pango uses Cairo as a backend as well.

> 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)

Pango uses FreeType to retrieve font informations (see next library).

> 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)

This is needed to look for fonts installed in the system.

> libpcre.so.3 => /lib/libpcre.so.3 (0x00007fed23dd8000)

Needed by glib2.

> libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007fed23b7f000)

Lowlevel graphic operations, needed by cairo (can be compiled statically
as well)

> libdirectfb-1.2.so.0 => /usr/lib/libdirectfb-1.2.so.0 (0x00007fed238fb000)

Seems that direct FrameBuffer rendering was enabled for GTK or Cairo...
so normally not needed.

> 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)

I don't know about these two.

> libpng12.so.0 => /lib/libpng12.so.0 (0x00007fed232b0000)

This is needed by Cairo.

> 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)

I don't know why this one is in there

> libexpat.so.1 => /lib/libexpat.so.1 (0x00007fed22437000)

This is a XML library and used by fontconfig.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Mattias Gaertner
In reply to this post by michael.vancanneyt
On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
[hidden email] wrote:

>
>
> On Thu, 14 Apr 2011, zeljko wrote:
>
> > On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
> >
> > You don't but gtk does (or cairo or some xlib).
>
> Hm. I did a quick check:
>
> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
> 44
> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
> 31
> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to direct framebuffer
> access, which is total nonsense in a X environment.

The gnome projects likes to split libs in smaller modules.
The number of libs is not that important. The size is more important:

A gtk2 program:
ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
14932491

A qt program:
ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
53583219

So Qt uses about 50MB, GTK uses 15MB.

 
> Well, this reminds me why I use KDE and not Gnome.
>
> How complete/stable is the Qt version of the LCL, and what version of Qt is needed ?

It is quite stable. It works well under KDE, not so well under Gnome.
But this is not the fault of the LCL qt interface, but of QT.

Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

zeljko
In reply to this post by michael.vancanneyt
On Thursday 14 of April 2011 09:47:57 [hidden email] wrote:

> On Thu, 14 Apr 2011, zeljko wrote:
> > On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
> >
> > You don't but gtk does (or cairo or some xlib).
>
> Hm. I did a quick check:
>
> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
> 44
> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
> 31
>
> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to direct
> framebuffer access, which is total nonsense in a X environment.

This is lazarus qtlcl dependency:

[linda@houston ~]$ ldd /usr/lib/lazarus/lazarus
        linux-gate.so.1 =>  (0x004fe000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0032c000)
        libdl.so.2 => /lib/libdl.so.2 (0x00325000)
        libQt4Pas.so.5 => /usr/lib/libQt4Pas.so.5 (0x06b8b000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0x0016b000)
        librt.so.1 => /lib/librt.so.1 (0x0037f000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x03435000)
        libz.so.1 => /lib/libz.so.1 (0x00368000)
        libc.so.6 => /lib/libc.so.6 (0x004ff000)
        /lib/ld-linux.so.2 (0x0014c000)
        libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0x42159000)
        libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x02486000)
        libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0x07447000)
        libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x06e61000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00856000)
        libm.so.6 => /lib/libm.so.6 (0x002f9000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00349000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x004bb000)
        libfreebl3.so => /lib/libfreebl3.so (0x034be000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0x007d5000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x037eb000)
        libphonon.so.4 => /usr/lib/libphonon.so.4 (0x07777000)
        libpulse-mainloop-glib.so.0 => /usr/lib/libpulse-mainloop-glib.so.0
(0x00df3000)
        libpulse.so.0 => /usr/lib/libpulse.so.0 (0x0772e000)
        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00689000)
        libQtDBus.so.4 => /usr/lib/libQtDBus.so.4 (0x00d33000)
        libQtXml.so.4 => /usr/lib/libQtXml.so.4 (0x07404000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0x00110000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x007ec000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x0084f000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00843000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x007e7000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x002b1000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x003f0000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0x00120000)
        libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x00131000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00388000)
        libgobject-2.0.so.0 => /lib/libgobject-2.0.so.0 (0x00945000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0x00137000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0x003b0000)
        libssl.so.10 => /usr/lib/libssl.so.10 (0x00c90000)
        libcrypto.so.10 => /lib/libcrypto.so.10 (0x009e6000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0x004db000)
        libpulsecommon-0.9.21.so => /usr/lib/libpulsecommon-0.9.21.so
(0x07562000)
        libXtst.so.6 => /usr/lib/libXtst.so.6 (0x00d13000)
        libwrap.so.0 => /lib/libwrap.so.0 (0x02fb0000)
        libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x03907000)
        libasyncns.so.0 => /usr/lib/libasyncns.so.0 (0x02fa8000)
        libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x007f6000)
        libexpat.so.1 => /lib/libexpat.so.1 (0x00486000)
        libuuid.so.1 => /lib/libuuid.so.1 (0x007e0000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0x00c2d000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0x075b9000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x00141000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0x00c67000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x004de000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x02f8b000)
        libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0x03979000)
        libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x039b8000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x0348a000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0x034b6000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0x002a2000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00d2e000)
        libselinux.so.1 => /lib/libselinux.so.1 (0x00797000)


>
> Well, this reminds me why I use KDE and not Gnome.
>
> How complete/stable is the Qt version of the LCL, and what version of Qt is
> needed ?

It's pretty complete and stable, we are using it for our production. Gtk2 does
not have chance with our needs.AFAIK you already seen our erp app at lazarus
day last summer, it's qtlcl app :)
Minimum required qt version is 4.5.0, but if you use old KDE installations,
probably you have to build it by yourself. If you want I can send you rpms
maded for older distros (Qt-4.6.4).


zeljko


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

zeljko
In reply to this post by Mattias Gaertner
On Thursday 14 of April 2011 09:56:47 Mattias Gaertner wrote:

>
> It is quite stable. It works well under KDE, not so well under Gnome.
> But this is not the fault of the LCL qt interface, but of QT.

What's "not so well" under Gnome ? I guess that you have problem with metacity
behaviour (or maybe with compiz, but gtk2 also have big trouble with it). Here
it works ok under KDE, Xfce, WindowMaker,IceWM.

zeljko

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

michael.vancanneyt
In reply to this post by Mattias Gaertner


On Thu, 14 Apr 2011, Mattias Gaertner wrote:

> On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
> [hidden email] wrote:
>
>>
>>
>> On Thu, 14 Apr 2011, zeljko wrote:
>>
>>> On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
>>>
>>> You don't but gtk does (or cairo or some xlib).
>>
>> Hm. I did a quick check:
>>
>> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
>> 44
>> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
>> 31
>> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to direct framebuffer
>> access, which is total nonsense in a X environment.
>
> The gnome projects likes to split libs in smaller modules.
> The number of libs is not that important. The size is more important:
>
> A gtk2 program:
> ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
> 14932491
>
> A qt program:
> ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
> 53583219
>
> So Qt uses about 50MB, GTK uses 15MB.

I get quite a different count:

fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
7172681
fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
9804745

7 vs. 9 Mb. Just for the Qt/Gtk library.

And that only size matters is not quite correct: for each library the number
of symbols in the libraries must be resolved.
The more libraries must be resolved, the more work there is for the linker.

That was the main issue in KDE: to reduce the number of symbols to be
resolved. This meant, less libraries.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Marco van de Voort
In reply to this post by Michael Van Canneyt
In our previous episode, Michael Van Canneyt said:
> At some time, the KDE project tried to reduce startup time of their binaries
> by redefining their APIs so shared libs would load faster.

I thought the KDE problem was that their shared libs interfaced at the C++
level, exporting huge amounts of symbols per lib?

(something that we would get too with packages btw)
 

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Sven Barth
In reply to this post by michael.vancanneyt
Am 14.04.2011 10:17, schrieb [hidden email]:

>
>
> On Thu, 14 Apr 2011, Mattias Gaertner wrote:
>
>> On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
>> [hidden email] wrote:
>>
>>>
>>>
>>> On Thu, 14 Apr 2011, zeljko wrote:
>>>
>>>> On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
>>>>
>>>> You don't but gtk does (or cairo or some xlib).
>>>
>>> Hm. I did a quick check:
>>>
>>> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
>>> 44
>>> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
>>> 31
>>> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to
>>> direct framebuffer
>>> access, which is total nonsense in a X environment.
>>
>> The gnome projects likes to split libs in smaller modules.
>> The number of libs is not that important. The size is more important:
>>
>> A gtk2 program:
>> ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
>> 14932491
>>
>> A qt program:
>> ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
>> 53583219
>>
>> So Qt uses about 50MB, GTK uses 15MB.
>
> I get quite a different count:
>
> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
> 7172681
> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
> 9804745
>
> 7 vs. 9 Mb. Just for the Qt/Gtk library.
>

But libgdk does not contain all dependencies that a GTK application
needs (can't comment on QT though).

> And that only size matters is not quite correct: for each library the
> number
> of symbols in the libraries must be resolved. The more libraries must be
> resolved, the more work there is for the linker.
>
> That was the main issue in KDE: to reduce the number of symbols to be
> resolved. This meant, less libraries.

Regards,
Sven

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

michael.vancanneyt


On Thu, 14 Apr 2011, Sven Barth wrote:

> Am 14.04.2011 10:17, schrieb [hidden email]:
>>
>>
>> On Thu, 14 Apr 2011, Mattias Gaertner wrote:
>>
>>> On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
>>> [hidden email] wrote:
>>>
>>>>
>>>>
>>>> On Thu, 14 Apr 2011, zeljko wrote:
>>>>
>>>>> On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
>>>>>
>>>>> You don't but gtk does (or cairo or some xlib).
>>>>
>>>> Hm. I did a quick check:
>>>>
>>>> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
>>>> 44
>>>> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
>>>> 31
>>>> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to
>>>> direct framebuffer
>>>> access, which is total nonsense in a X environment.
>>>
>>> The gnome projects likes to split libs in smaller modules.
>>> The number of libs is not that important. The size is more important:
>>>
>>> A gtk2 program:
>>> ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
>>> 14932491
>>>
>>> A qt program:
>>> ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
>>> 53583219
>>>
>>> So Qt uses about 50MB, GTK uses 15MB.
>>
>> I get quite a different count:
>>
>> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
>> 7172681
>> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
>> 9804745
>>
>> 7 vs. 9 Mb. Just for the Qt/Gtk library.
>>
>
> But libgdk does not contain all dependencies that a GTK application needs
> (can't comment on QT though).

Indeed. for GTK, the problem is bigger:

fsb: >ldd /usr/lib/libgtk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
10646417

It needs 10Mb, more than the Qt lib.

And I checked: the LCL app loads exactly the same list of libraries as the
GTK lib itself. I don't have an LCL Qt app to compare with.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Felipe Monteiro de Carvalho
On Thu, Apr 14, 2011 at 11:14 AM,  <[hidden email]> wrote:
> fsb: >ldd /usr/lib/libgtk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
> 10646417
>
> And I checked: the LCL app loads exactly the same list of libraries as the
> GTK lib itself. I don't have an LCL Qt app to compare with.

You forgot to count libgtk-x11-2.0.so
ldd on gtk-x11 does not count gtk-x11 itself

Another difference for me was:

libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7004000)

> It needs 10Mb, more than the Qt lib.

No way, why do you think that /usr/lib/libqt-mt uses all Qt libs? In
fact it uses *zero* other Qt libs =D

Here is what an LCL-Qt app uses:

[felipe@localhost httpclient]$ ldd readhttpheaders
        linux-gate.so.1 =>  (0xffffe000)
        libQt4Pas.so.5 => /usr/lib/libQt4Pas.so.5 (0xb7602000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb74d0000)
        libdl.so.2 => /lib/libdl.so.2 (0xb74cc000)
        libc.so.6 => /lib/i686/libc.so.6 (0xb737a000)
        libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0xb630b000)
        libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb5880000)
        libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xb5759000)
        libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb54d8000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb53e7000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb53c9000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb53a9000)
        /lib/ld-linux.so.2 (0xb7829000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb5305000)
        libphonon.so.4 => /usr/lib/libphonon.so.4 (0xb52a8000)
        libQtXmlPatterns.so.4 => /usr/lib/libQtXmlPatterns.so.4 (0xb4e8e000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb4e76000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb4e6b000)
        libm.so.6 => /lib/i686/libm.so.6 (0xb4e45000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb4d6b000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb4d24000)
        libz.so.1 => /lib/libz.so.1 (0xb4d11000)

--
Felipe Monteiro de Carvalho

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Felipe Monteiro de Carvalho
Sorry, the list was incomplete. My KDE console has a wierd bug when
selecting text =(

[felipe@localhost httpclient]$ ldd readhttpheaders
        linux-gate.so.1 =>  (0xffffe000)
        libQt4Pas.so.5 => /usr/lib/libQt4Pas.so.5 (0xb7602000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb74d0000)
        libdl.so.2 => /lib/libdl.so.2 (0xb74cc000)
        libc.so.6 => /lib/i686/libc.so.6 (0xb737a000)
        libQtWebKit.so.4 => /usr/lib/libQtWebKit.so.4 (0xb630b000)
        libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xb5880000)
        libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xb5759000)
        libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xb54d8000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb53e7000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb53c9000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb53a9000)
        /lib/ld-linux.so.2 (0xb7829000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb5305000)
        libphonon.so.4 => /usr/lib/libphonon.so.4 (0xb52a8000)
        libQtXmlPatterns.so.4 => /usr/lib/libQtXmlPatterns.so.4 (0xb4e8e000)
        libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb4e76000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb4e6b000)
        libm.so.6 => /lib/i686/libm.so.6 (0xb4e45000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb4d6b000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb4d24000)
        libz.so.1 => /lib/libz.so.1 (0xb4d11000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb4c8c000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb4c48000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xb4c3e000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xb4c24000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb4bf0000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb4bdd000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb4bd7000)
        librt.so.1 => /lib/i686/librt.so.1 (0xb4bce000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb4bca000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb4bc3000)
        libpulse.so.0 => /usr/lib/libpulse.so.0 (0xb4b7d000)
        libpulse-mainloop-glib.so.0 =>
/usr/lib/libpulse-mainloop-glib.so.0 (0xb4b76000)
        libQtDBus.so.4 => /usr/lib/libQtDBus.so.4 (0xb4afc000)
        libpcre.so.0 => /lib/libpcre.so.0 (0xb4ac9000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb4988000)
        libpulsecommon-0.9.21.so => /usr/lib/libpulsecommon-0.9.21.so
(0xb4934000)
        libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0xb4931000)
        libXtst.so.6 => /usr/lib/libXtst.so.6 (0xb492a000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb491b000)
        libxcb-atom.so.1 => /usr/lib/libxcb-atom.so.1 (0xb4916000)
        libwrap.so.0 => /usr/lib/libwrap.so.0 (0xb490d000)
        libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0xb489d000)
        libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb4860000)
        libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0xb46e9000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb46be000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb46b7000)
        libasyncns.so.0 => /usr/lib/libasyncns.so.0 (0xb46af000)
        libdbus-1.so.3 => /lib/libdbus-1.so.3 (0xb466c000)
        libcap.so.2 => /lib/libcap.so.2 (0xb4666000)
        libQtXml.so.4 => /usr/lib/libQtXml.so.4 (0xb4623000)
        libnsl.so.1 => /lib/libnsl.so.1 (0xb460c000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xb45f6000)

--
Felipe Monteiro de Carvalho

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

Mattias Gaertner
In reply to this post by michael.vancanneyt

 

 

[hidden email] hat am 14. April 2011 um 10:17 geschrieben:

>
>
> On Thu, 14 Apr 2011, Mattias Gaertner wrote:
>
> > On Thu, 14 Apr 2011 09:47:57 +0200 (CEST)
> > [hidden email] wrote:
> >
> >>
> >>
> >> On Thu, 14 Apr 2011, zeljko wrote:
> >>
> >>> On Thursday 14 of April 2011 09:33:03 Michael Van Canneyt 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 ?
> >>>
> >>> You don't but gtk does (or cairo or some xlib).
> >>
> >> Hm. I did a quick check:
> >>
> >> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | wc -l
> >> 44
> >> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | wc -l
> >> 31
> >> So Qt needs 31 libs, GTK uses 44. Many of the extra ones related to direct framebuffer
> >> access, which is total nonsense in a X environment.
> >
> > The gnome projects likes to split libs in smaller modules.
> > The number of libs is not that important. The size is more important:
> >
> > A gtk2 program:
> > ldd testgtk2 | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
> > 14932491
> >
> > A qt program:
> > ldd testqt | cut -d' ' -f 3 | grep lib | xargs cat | wc -c
> > 53583219
> >
> > So Qt uses about 50MB, GTK uses 15MB.
>
> I get quite a different count:
>
> fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
> 7172681

 

The libqt-mt library is only one lib of a qt program.

 

 

> fsb: >ldd /usr/lib/libgdk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
> 9804745

 

And so is the libgdk of a gtk program. 

 

 
> 7 vs. 9 Mb. Just for the Qt/Gtk library.

 

Please compare whole programs. 

 

 
> And that only size matters is not quite correct: for each library the number
> of symbols in the libraries must be resolved.
> The more libraries must be resolved, the more work there is for the linker.

 

Since you gave no proof for this statement, I will answer with another unproven: 

The bigger a library the more code, the more symbols must be resolved.  

 

I don't know how to test the library loading time, but here are some timings of minimal gtk2/qt programs:

 

time ./testgtk2


real    0m0.035s
user    0m0.028s
sys     0m0.004s

time ./testqt


real    0m0.160s
user    0m0.088s
sys     0m0.032s

 

>
> That was the main issue in KDE: to reduce the number of symbols to be
> resolved. This meant, less libraries.

I doubt that combining several libs into one accelerates much.

Mattias


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

michael.vancanneyt
In reply to this post by Felipe Monteiro de Carvalho


On Thu, 14 Apr 2011, Felipe Monteiro de Carvalho wrote:

> On Thu, Apr 14, 2011 at 11:14 AM,  <[hidden email]> wrote:
>> fsb: >ldd /usr/lib/libgtk-x11-2.0.so.0 | cut -d' ' -f 3 | xargs cat | wc -c
>> 10646417
>>
>> And I checked: the LCL app loads exactly the same list of libraries as the
>> GTK lib itself. I don't have an LCL Qt app to compare with.
>
> You forgot to count libgtk-x11-2.0.so
> ldd on gtk-x11 does not count gtk-x11 itself

I know. But it's not relevant for the list.
It was just meant to demonstrate that loading libgtk-x11-2.0.so uses the
same set of libs as an LCL app.

>
> Another difference for me was:
>
> libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb7004000)

>
>> It needs 10Mb, more than the Qt lib.
>
> No way, why do you think that /usr/lib/libqt-mt uses all Qt libs? In
> fact it uses *zero* other Qt libs =D

Like I said, I have no LCL Qt app to compare with.

But you are right, I didn't check all Qt libs. It didn't occur to me to
check for uppercase Qt files.

Michael.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

michael.vancanneyt
In reply to this post by Mattias Gaertner


On Thu, 14 Apr 2011, Mattias Gaertner wrote:

> > fsb: >ldd /usr/lib/libqt-mt.so.3.3.8 | cut -d' ' -f 3 | xargs cat | wc -c
> > 7172681 
> The libqt-mt library is only one lib of a qt program.

Yes. My bad, see my answer to Felipe. :/

>  
> > 7 vs. 9 Mb. Just for the Qt/Gtk library. 
> Please compare whole programs. 

Since I don't have the needed Qt libs, that will be hard. Please disregard
my timings.

>  
> > And that only size matters is not quite correct: for each library the number
> > of symbols in the libraries must be resolved.
> > The more libraries must be resolved, the more work there is for the linker. 
> Since you gave no proof for this statement, I will answer with another
> unproven: 
> The bigger a library the more code, the more symbols must be resolved.  

It's not my statement. It's someone else's. see e.g.

http://lwn.net/Articles/192624/

and

http://keycorner.org/pub/text/doc/kde-slow.txt

I assume they knew what they were talking about.
   
Michael.
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus GTK project dependencies

zeljko
In reply to this post by Mattias Gaertner
On Thursday 14 of April 2011 11:36:10 Mattias Gaertner wrote:

> The libqt-mt library is only one lib of a qt program.

no, libqt-mt is complete qt-3.XXX library. in Qt 4 they splitted core,gui etc.

zeljko


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus