Re: GTK library

Shaw Terwilliger (sterwill@postman.abisource.com)
Sun, 18 Jul 1999 02:43:00 -0500


Pierre Abbat wrote:
> I downloaded and attempted to install the part of the GTK library that I'm
> missing, but it had too many dependencies and would break too many other
> things. Is it OK to compile and install the library from source if the rest of
> my system is RPMs?

You can indeed do this, and your libraries will be just as functional
as if you got them from an RPM. You might try looking for RPMs of
glib and gtk from http://www.abisource.com/downloads/redhat/. There
might be a package available for just your release of Red Hat Linux
which would have fewer requirements than packages designed for
Red Hat 6 if used on Red Hat 5.

If you install from source, you will probably not be able to
cleanly install the RPM of AbiWord--manually installing the libraries
won't notify RPM that you have them. You might force RPM to ignore
the dependency checks. You could also use the dynamic binary .tar.gz
package.

> By the way, the library file the RPM of AbiWord is looking for has the wrong
> filename format. It should be libfoo.so.#.#.#, not libfoo-#.so.#.# whatever.
> (I've uninstalled it, and I forget what exactly it was looking for.)

That's actually how GTK now names their libraries. It's a new GNU
convention. I think it was conceived to work around broken linkers.

The dynamic linkers of many systems look for libname.so.[major].[minor].
Compilers link binaries to look for libname.so.[major], which
is usually a symbolic link to the most recently installed [major].[minor].

The problem is that most dynamic linkers consider all libraries
with the same [major] to be interface-compatible. GTK, because it
follows that "1.0" is stable, "1.1" is development, "1.2" is stable,
etc., will change interfaces between 1.0 and 1.2. If you installed
both libgtk+.so.1.0.6 and libgtk+.so.1.2.3, and ran Linux's ldconfig,
it would completely ignore 1.0.6, thinking it was old and outdated,
since both are major version "1".

The thing is that many GTK programs still want GTK 1.0 versions, so
this is how we get programs that want 1.1 to be able to use them
too. We put the major in the library name ("libname-[major].[minor]").
That way "libgtk+-1.1.so.3" can co-exist with "libgtk+-1.2.so.3" since
"1" and "2" appear to be their [major] fields, respectively.

It shifts the major off into the name, makes the first minor the
new major, and lets minor versions be linked to.

... seems like it would have been easier to fix the dynamic loaders
to me... :)

-- 
Shaw Terwilliger


This archive was generated by hypermail 1.03b2.