Portability and distribution with Gtk+ 1.3



To the Glib and Gtk+ designers,

When porting GtkAda to Glib/Gtk+ 1.3, we found that many additional
dependencies had been added in order to build Gtk.

The list of dependencies for Gtk+ 1.3.3 is as follows:

libtiff (optional as far as we can see, but might be needed by gdk-pixbuf)
libgif  (optional as far as we can see, but might be needed by gdk-pixbuf)
libjpeg (optional as far as we can see, but might be needed by gdk-pixbuf)
zlib    (needed by libpng)
libpng  (needed by gdk-pixbuf to at least load the stock images)
pkg-config (needed by glib & gtk+, and also contains glib-1.2.8)
pango   (needed by gtk+)
glib    (needed by gtk+ and by the end user)
gtk+    (end user lib)

For the record, the list of dependencies for Gtk+ 1.2 is:
glib
gtk+

So this makes building and distributing Gtk+ based applications much harder
and complex. One of the strong characteristics of Gtk+ up to now was that
it was a relatively compact and easy to install/use library.

With Gtk+ 1.3.3, this is certainly no longer true, and Gtk+ is now a complete
system on its own, very much like Gnome is.

Is this intended ? Are they plans to reduce the dependencies ? Simplify
installation and portability ?

In particular, libraries that are outside glib/gtk control like zlib which
is needed do not even have a proper configure script, and do not have built-in
capability to provide a shared zlib library, required by libpng. This
makes the whole system user unfriendly to say the least.

The other issues that worries us is the number of shared libraries now needed
by a simple Gtk+ application.

Again, in Gtk+ 1.2, the number of shared libraries is very reasonable, and
more important, there are no hidden shared library dependencies. By hidden
I mean dependencies that do not appear in the linked executable, but appear
only at run time, by the mean of dlopen().
Again, this makes very hard to distribute stand alone executable.
Also, when pango loads <prefix>/lib/pango/modules/*.so, this makes distribution
very hard, since it means that without recompiling an application, there
are built-in paths that dictate how a software can be installed on a
foreign machine. Or am I missing something ?

Are there some ways to address this problem ? Or some plans ?

FYI, here is the typical list of run time dependencies for a Gtk+ 1.2
application under Linux:

Libraries listed by ldd:
/usr/lib/libgtk-1.2.so.0
/usr/lib/libgdk-1.2.so.0
/usr/lib/libgmodule-1.2.so.0
/usr/lib/libglib-1.2.so.0
/lib/libdl.so.2
/usr/X11R6/lib/libXi.so.6
/usr/X11R6/lib/libXext.so.6
/usr/X11R6/lib/libX11.so.6
/lib/libm.so.6
/lib/libc.so.6
/lib/ld-linux.so.2

Libraries loaded when actually running the application:
/usr/lib/libgtk-1.2.so.0
/usr/lib/libgdk-1.2.so.0
/usr/lib/libgmodule-1.2.so.0
/usr/lib/libglib-1.2.so.0
/usr/lib/libdl.so.2
/usr/X11R6/lib/libXi.so.6
/usr/X11R6/lib/libXext.so.6
/usr/X11R6/lib/libX11.so.6
/lib/libm.so.6
/lib/libc.so.6
/lib/ld-linux.so.2
/lib/libnss_files.so.2
/usr/lib/gconv/ISO8859-1.so

For the same application with Gtk+ 1.3.3 (that does not even make use of
gdk-pixbuf libraries, such as loaders/libpixbufloader-*.so, while a typical
Gtk+ 2.0 application most likely will).

Things to note:
- there is now systematically a dependency on the thread
  library (libgthread + libpthread) which is not desirable for non threaded
  applications
- the number of shared libraries not referenced at link time is big
- libraries loaded with dlopen apparently need to be put at known
  and fixed locations.
- have an application linked statically with Gtk+ sounds like a real
  challenge.

Libraries listed by ldd:
/opt/gtk-1.3/lib/libgtk-x11-1.3.so.3
/opt/gtk-1.3/lib/libgdk-x11-1.3.so.3
/usr/X11R6/lib/libXext.so.6
/opt/gtk-1.3/lib/libgdk_pixbuf-1.3.so.3
/lib/libm.so.6
/opt/gtk-1.3/lib/libpangox-0.14.so
/usr/X11R6/lib/libX11.so.6
/opt/gtk-1.3/lib/libpango-0.14.so
/opt/gtk-1.3/lib/libgobject-1.3.so.3
/opt/gtk-1.3/lib/libgmodule-1.3.so.3
/lib/libdl.so.2
/opt/gtk-1.3/lib/libglib-1.3.so.3
/lib/libc.so.6
/opt/gtk-1.3/lib/libgthread-1.3.so.3
/lib/libpthread.so.0
/lib/ld-linux.so.2

Libraries loaded when actually running the application:
/opt/gtk-1.3/lib/libgtk-x11-1.3.so.3
/opt/gtk-1.3/lib/libgdk-x11-1.3.so.3
/usr/X11R6/lib/libXext.so.6
/opt/gtk-1.3/lib/libgdk_pixbuf-1.3.so.3
/lib/libm.so.6
/opt/gtk-1.3/lib/libpangox-0.14.so
/usr/X11R6/lib/libX11.so.6
/opt/gtk-1.3/lib/libpango-0.14.so
/opt/gtk-1.3/lib/libgobject-1.3.so.3
/opt/gtk-1.3/lib/libgmodule-1.3.so.3
/lib/libdl.so.2
/opt/gtk-1.3/lib/libglib-1.3.so.3
/lib/libc.so.6
/opt/gtk-1.3/lib/libgthread-1.3.so.3
/lib/libpthread.so.0
/lib/ld-linux.so.2
/lib/libnss_files.so.2
/usr/lib/gconv/ISO8859-1.so
/opt/gtk-1.3/lib/pango/modules/pango-basic-x.so
/usr/lib/gconv/ISO8859-8.so
/usr/lib/gconv/ISO8859-15.so
/usr/lib/gconv/EUC-CN.so
/usr/lib/gconv/libGB.so
/usr/lib/gconv/EUC-KR.so
/usr/lib/gconv/libKSC.so
/usr/lib/gconv/EUC-JP.so
/usr/lib/gconv/libJIS.so
/opt/gtk-1.3/lib/pango/modules/pango-arabic-x.so
/opt/gtk-1.3/lib/pango/modules/pango-devanagari-x.so
/opt/gtk-1.3/lib/pango/modules/pango-bengali-x.so
/opt/gtk-1.3/lib/pango/modules/pango-gurmukhi-x.so
/opt/gtk-1.3/lib/pango/modules/pango-gujarati-x.so
/opt/gtk-1.3/lib/pango/modules/pango-tamil-x.so
/opt/gtk-1.3/lib/pango/modules/pango-thai-x.so
/opt/gtk-1.3/lib/pango/modules/pango-myanmar-x.so
/opt/gtk-1.3/lib/pango/modules/pango-hangul-x.so

Arno




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]