how to understand pkgconfig Requires: fields ?

Matthieu Herrb matthieu.herrb at laas.fr
Sun Apr 30 07:12:43 PDT 2006


Daniel Stone wrote:
> On Sun, Apr 30, 2006 at 11:51:34PM +1000, Drew Parsons wrote:
>> On Sun, 2006-04-30 at 15:36 +0300, Daniel Stone wrote:
>>> On Sun, Apr 30, 2006 at 10:24:28PM +1000, Drew Parsons wrote:
>>>> I'd like to ask someone to clarifies the Requires fields in the
>>>> pkgconfig .pc files.
>>>> Allow me to use lib/XprintUtil as an example.  Its pc file (see
>>>> http://webcvs.freedesktop.org/xorg/lib/XprintUtil/xprintutil.pc.in?view=markup) has:
>>>>
>>>> Requires: x11 xt printproto
>>>> Requires.private: x11 xp xt
>>>>
>>>> What is the difference between Requires: and Requires.private:?
>>>>
>>>> xp is the odd one out, needed only in .private. At which point does it need to be installed?
>>> .private is required for static linking.
>> OK.  I'm not familiar with pkgconfig dependencies.  What is being
>> checked at build exactly? Does that mean Requires: need to be already
>> installed at build time, while Requires.private: need only be installed
>> for runtime (unless a static build is desired) ?
> 
> I believe so, yes.
> 

It depends on the system and on ld behaviour. Some linkers (the one in 
Darwin comes to my mind) require that all libraries are listed on the 
command line, including inplicit dependencies, even for dynamic linking.

pkg-config's 'Requires.private' is poorly designed and documented.
-- 
Matthieu


More information about the xorg-modular mailing list