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

Re: Dependencies of -dev packages



On Fri, Oct 21, 2005 at 07:15:38PM +0200, Kurt Roeckx wrote:

3D
> Pretty please don't suggest that unless you first fix pkg-config.
> It's always linking in the libraries required for static linking
> even if you don't request it.  See for instance bug #254290,
> which was closed, but didn't really do what the original patch
> did.

What needs fixing? I did not have time to guess what the completely
undocumented patch in #254290 does, so I did a little experiment:

a.pc:
	prefix=/usr

	Name: a
	Description: a
	Version: 1.0
	Requires: b
	Requires.private: c
	Libs: -la
b.pc:
	prefix=/usr

	Name: b
	Description: b
	Version: 1.0
	Libs: -lb
	Libs.private: -lbstatic
c.pc:
	prefix=/usr

	Name: c
	Description: c
	Version: 1.0
	Libs: -lc
	Libs.private: -lcstatic

$ pkg-config --libs a
-la -lb
$ pkg-config --libs --static a
-la -lc -lcstatic -lb -lbstatic

It seems to work perfectly. Of course the problem might be that .pc
files installed on my desktop currently do not seem to use either
Requires.private or Libs.private yet.

Gabor

-- 
     ---------------------------------------------------------
     MTA SZTAKI Computer and Automation Research Institute
                Hungarian Academy of Sciences
     ---------------------------------------------------------



Reply to: