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

Re: gconf transition

On Sat, Jan 07, 2006 at 03:09:34PM +0100, Josselin Mouette wrote:
> Le vendredi 06 janvier 2006 à 14:28 -0600, Alejandro Bonilla a écrit :
> > /usr/lib/libgconf2-4/gconf-sanity-check-2: error while loading shared
> > libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such
> > file or dir
> Ladies and gentlemen, this is a perfect example of why linking indirect
> dependencies is a very bad thing. Let me explain.

Linking indirect dependency isn't a good thing, but not linking
to them isn't magicly going to fix bugs like this.

> Of all binaries shipped with GConf, gconf-sanity-check is the only one
> using GTK+. The only application using gconf-sanity-check is
> gnome-session. On first sight, it looks safe to exclude
> gconf-sanity-check for the computation of gconf dependencies, as
> gnome-session will always require libgtk2.0-0, and gconf-sanity-check
> isn't susceptible to use any symbols that could be added to GTK+.

You should _never_ exclude anything for the calculation of the
dependencies, because it will result in such errors.  Even if you
think some other dependency will (now) take care of this for you
doesn't mean you shouldn't have a depends on it.

There are cases where excluding something can make sense, but
this isn't one of them.

> Now, let's have a look at gconf-sanity-check:
>   NEEDED      libgtk-x11-2.0.so.0
>   NEEDED      libpangocairo-1.0.so.0

So gconf-sanity-check-2 (from the libgconf2-4 package) NEEDS
libpangocairo-1.0.so.0 from the libpango1.0-0 package.  So
libgconf2-4 should depend on libpango1.0-0.  And it doesn't.
This is an RC bug in the libgconf2-4 package.  It's also missing
all those other depends, specially the one on libgtk2.0-0.

> The only libraries from which it actually uses symbols are libgconf2,
> libgtk-x11, libglib and libc.

It seems to be: libgtk-x11-2, libgconf-2, libpopt, libgobject-2,
libpthread, libglib-2 and libc.

So make it only link to those libraries instead.  This shouldn't
be that hard.

And I think that using --as-needed as you did is the wrong way to
go.  This should be a last resort option in case you really can't
fix it some other way.

So in short you should:
- Remove the -Xgconf-sanity-check from DEB_DH_SHLIBDEPS_ARGS
  This is something you should do in _any_ case since it's just
- Remove the LDFLAGS="-Wl,--as-needed" from DEB_CONFIGURE_SCRIPT_ENV
- Use Debian's libtool
- Only link (gconf-sanity-check-2) to the libraries it needs.


Reply to: