using pkg-config for dynamic release packaging

Tollef Fog Heen tfheen at
Mon Aug 16 23:50:47 PDT 2010

]] Enrico Weigelt 

| * Tollef Fog Heen <tfheen at> schrieb:
| > Build dependencies are not run-time dependencies.  I assume there's a
| > hook late in the build process that looks at any installed .pc files and
| > dumps the Requires information from those, which is then translated into
| > actual package dependencies by something that knows that
| > 
| > Requires: foo >= 1
| > 
| > means it must find the package containing foo.pc and add that as a
| > dependency.
| Well, that only doesn't give a precise description. It requires more
| deep analysis. For examples, binaries have to be examined for which
| libraries they're linked against. But that yet doesn't tell 
| everything, eg. files that get loaded at runtime.

This is true, but as I understand this, it's not about what a program
links to.  It's about if you have a foo-devel package that has a foo.pc
file which Requires: bar, foo-devel should depend on bar-devel (or
whichever package contains bar.pc). If you don't have this dependency in
place, pkg-config can't traverse the dependency graph and gets unhappy.

| In the end there's no _reliable_ automatic way to do it, unless
| we have some precise declaration coming from the package itself.
| I'm currently working on an file classifier and dependency detector,
| for use in package management and QM, but this is damned to be 
| imcomplete simply due lack of information.

You might want to take a look at how Debian does it with shlibs and
symbols files.  This is not an automatic thing, but it seems to get it
right, which is as/more important. :-)

Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are

More information about the pkg-config mailing list