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

Re: -Wl,--as-needed considered possibly harmful

On Mon, Dec 10, 2007 at 05:45:27PM +0100, Josselin Mouette wrote:
> Le dimanche 09 décembre 2007 à 15:44 -0800, Steve Langasek a écrit :
> > > For example, pkg-config --libs gtk+-x11-2.0 will return, among others,
> > > -lglib-2.0 and -lm. And this is perfectly intentional.

> > Just because it's intentional doesn't mean it isn't absurd and wrong.

> It may be absurd, but I don’t think it is wrong.

> > No, what can be done is to fix upstream's broken declaration that 'you can
> > assume glib functions are available when doing "#include <gtk/gtk.h>"'.  It
> > doesn't follow that just because this works in practice, it should be a
> > supported usage.

> When many of the types used by GTK+ are those provided by GLib, it
> sounds wrong to ask developers to include the GLib headers to have these
> types available.

Well, that part is fairly reasonable, I admit.  What isn't reasonable is to
go from "including gtk.h lets you use glib types" to "calling pkg-config
--libs gtk+-2.0 lets you invoke glib functions".  Yes, including gtk.h is
always going to be sufficient, in practice, to get the glib types; but a)
includes != pkg-config, b) since it isn't implied there really is no
obligation to support such an expectation wrt pkg-config use, aside from
upstream's apparent commitment to compatibility with foolishly-assembled
build systems.

Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Reply to: