On Mon, Oct 13, 2003 at 09:44:47PM +0200, Josselin Mouette wrote: > Le lun 13/10/2003 à 21:36, Steve Langasek a écrit : > > > All this additional information can be provided as well by pkg-config, > > > which is much more flexible and doesn't cause random breakages.
> > $ pkg-config libgnomecanvas-2.0 --libs > > -Wl,--export-dynamic -lgnomecanvas-2 -lart_lgpl_2 -lpangoft2-1.0 > > -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 > > -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 > > $ > This looks like a broken .pc file. > > It also doesn't even provide a complete list of all the indirect library > > dependencies, so this pkg-config line will even fail on platforms where > > libtool will succeed. (E.g., try to statically link a binary using the > > above list without having to append '-lX11'.) And if you use the > > pkg-config output as input for a libtool-using application, you'll get > > double the pleasure. > You're right as for static linking, I thought pkg-config supported > --static while it doesn't. Well, maybe it is better that way; I > personally feel we should deprecate the whole static linking stuff. In which case, we could easily fix all libtool installations by simply removing the .la files altogether, and we'll never have any more problems with mislinked dynamic executables or libraries. But if we're going to do that, then most of the available pkg-config settings are *still* wrong; in the above instance, the correct answer for dynamic linking is '-Wl,--export-dynamic -lgnomecanvas-2', and lose the other 50 entries on that line. Both of these tools are designed primarily to solve problems that do not affect stock Debian packages. We are not part of their target userbase, and as such, the tools are suboptimal for what we're trying to achieve. -- Steve Langasek postmodern programmer
pgplkLF0iQm8T.pgp
Description: PGP signature