On Sat, Nov 24, 2007 at 03:47:24PM +0100, Micha Lenk wrote: > Hi, > > I'm currently investigating how http://bugs.debian.org/451582 could be > solved in a clean fashion. As far as I understand upstream, the library > libchipcard shouldn't need to be linked against libgnutls. But > apparently it got linked against libgnutls because of the content of the > .la files. > > libgwenhywfar.la contains: > # Libraries that this one depends upon. > dependency_libs=' /usr/lib/libgnutls.la -L/usr/lib /usr/lib/libtasn1.la > -lz /usr/lib/libgcrypt.la /usr/lib/libgpg-error.la -lnsl -ldl'
The package that ships libgwenhywfar.la (libgwenhywfar38-dev) should have a Depends on the packages shipping /usr/lib/libgnutls.la (libgnutls-dev), which it doesn't. This is a bug in libgwenhywfar38-dev, and I'll reassign it shortly. > libgnutls.la contains: > # Libraries that this one depends upon. > dependency_libs=' -L/usr/lib /usr/lib/libtasn1.la /usr/lib/libgcrypt.la > -lz /usr/lib/libgcrypt.la /usr/lib/libgpg-error.la -lnsl' And the package shipping libgnutls.la (libgnutls-dev) should have a Depends on the packages shipping /usr/lib/libtasn1.la (libtasn1-3-dev), /usr/lib/libgcrypt.la (libgcrypt11-dev), which it does. And there is also /usr/lib/libgcrypt.la that has: dependency_libs=' /usr/lib/libgpg-error.la -lnsl' So libgnutls-dev should Depends on the package shipping /usr/lib/libgpg-error.la (libgpg-error-dev), which it does. (You should read this in the reverse order). > If libchipcard shouldn't need to be linked against libgnutls -- as > upstream said -- I think libgwenhywfar.la shouldn't contain a reference > to libgnutls.la. But what needs to be done (in libgwenhywfar) to achieve > that? There are 2 problems here: - libtool uses the .la files when it finds them. And tries to read all of them. If one of the files mentioned isn't available, it will and should fail. There are 2 ways to deal with this (in Debian): - Add the right Depends to your -dev package. This is also needed for static linking. - Don't ship the .la files if you don't need them for other reasons - You have extra libraries you link too which you don't need. This is a problem in libtool that has no easy solution. There is a patch in the Debian version of libtool that mostly solves it, but it also has a few problems. Kurt _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool