Re: broken: pkg-config and $includedir/gnome-2.0



On Sun, 2001-10-28 at 12:47, Havoc Pennington wrote:
> 
> jacob berkman <jacob ximian com> writes: 
> > this isn't it - because i do the the -L/gnome/lib when i put
> > libgnomecanvas first.  the problem is that i get different (ie, one is
> > broken) ordering of the -L lines depending on the order they are passed
> > to pkg-config.
> 
> Note that this doesn't work in the general case, i.e. you can't do
> something like this:
> 
>  -L /foo/lib -lblah -L /usr/lib -lbaz -L /foo/lib -lfoobar
> 
> Because the position of -L options with respect to -l options is not
> significant. (I always thought it was, maybe no one else shared this
> delusion, but it turns out that it isn't.)

yeah owen pointed that out to me last night, but that's ok:  that
doesn't work for LD_LIBRARY_PATH either.

> So anyhow, you can only always prefer /foo/lib or always prefer
> /usr/lib, you can't mix-and-match. Sort of makes pkg-config lamer than
> it otherwise would be.

well the solution is the same with the headers: install libraries into
$libdir/libfoo-2.0/ :)

> If I properly interpreted your mail, I guess what you're saying is
> that flags originating from .pc files at the front of PKG_CONFIG_PATH
> should always be placed before flags originating from .pc files at the
> end of PKG_CONFIG_PATH. This would cause the -L flags to mirror
> LD_LIBRARY_PATH, assuming that PKG_CONFIG_PATH corresponds to
> LD_LIBRARY_PATH. Did I get that right?

precisely.

> Would it work to place the
> command line package list in a canonical order based on
> PKG_CONFIG_PATH order, before doing any work?

yes - after getting the dependency expanded list of packages.

> If I'm not confused I don't think this is a reliable/correct fix, but
> it would probably increase the number of install situations that
> happen to work.

well, if this isn't the case then PKG_CONFIG_PATH works unlike every
other PATH variable i am familiar with, in that it doesn't provide a
preference order.

jacob
-- 
"Beat mixing is 10000 times more fun than even video games."
	-- bt



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