pkg-config question



Hi all,

Lately I ran into some "issues" which, after some digging, seemed to be 
due to the way pkg-config rearranges -L and -l flags.

I'll give a quick overview of my setup.  I work on GStreamer and thus I 
have various versions of GStreamer installed to test out stuff and check 
bug reports.  Thanks to pkg-config this is all possible (I love it).

I have gstreamer in /usr (through RPMs), in ~/garnome (through garnome, 
and for gstreamer releases if for some reason garnome is behind), and in 
~/cvs (which I use for testing the cvs version).  In my setup, cvs takes 
precedence over garnome.

Now, GStreamer's .pc file pulls in glib, gobject, libxml2, and so on.
Apparently, pkg-config rearranges -L and -l flags so that all -L flags go 
to the front and all -l flags go to the back.  What this causes for me, is 
that, when I compile gst-player from cvs against GStreamer from cvs (so, 
using the gstreamer.pc file in ~/cvs), I would want the flags to be

-L /home/thomas/cvs/lib -lgstreamer -L/home/thomas/garnome/lib -lglib-2.0 
-lxml2 ...

What happens is that pkg-config brings -L/home/thomas/garnome/lib to the 
front, right in front of -lgstreamer, and thus I cannot compile gst-player 
against the cvs version of gstreamer, without deleting the version in 
~/garnome.

I hope I explained it right.  Now for the question ;)

What benefits exactly does this rearranging bring ? Are there actually 
cases where this is strictly necessary, and not covering up some build 
maintainer's mistake ? I feel like doing this causes me to loose build 
functionality (albeit maybe in a very contrived use case, though one that 
really allows me to fix bugs on all levels), and I've been thinking about 
situations where this rearranging would help instead of hinder, but 
haven't thought of any.

Any ideas ?

Thomas

-- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*-                      -*->
Anything for a lover 
anything for a friend
I only wanna see you happy 
<-*- thomas apestaart org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/





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