[Fedora-packaging] pkgconfig dependency question

Rex Dieter rdieter at math.unl.edu
Fri Sep 8 16:51:52 UTC 2006

Orion Poplawski wrote:
> After skimming some of the thread about .pc files in -devel or not, it 
> seems like .pc files should be generating automatic dependencies.  Is 
> that not correct?

Nope, only newer versions (than what Fedora currently has) of rpm 
includes the feature to automatically add
dependencies extracted from .pc files (see Requires: line below, which 
happens to be empty).

> I package plplot, and plplot-devel contains:
> # cat /usr/lib/pkgconfig/plplotd.pc
> prefix=/usr
> exec_prefix=/usr
> libdir=/usr/lib
> includedir=/usr/include/plplot
> drvdir=${libdir}/plplot5.6.1/driversd
> Name: PLplot
> Description: Scientific plotting library (double precision)
> Requires:
> Version: 5.6.1
> Libs: -L${libdir} -lplplotd  -L/usr/lib -lqhull -L/usr/lib -lcsironn 
> -ldl -lm -L/usr/lib -lcsirocsa -lz -L/usr/lib -lfreetype
> Cflags: -I${includedir}
> But there are no dependencies on qhull-devel (via libqhull.so) and so 
> forth.  Should there be?

Kinda sorta.  2 solutions:
1.  (imo, preferred), strip all/most non-plplot libs from the Libs: 
line.  Those are only ever really needed for static linking (and Fedora 
doesn't include those, by default)
2.  Add to plplot-devel Requires for the pkgs that include the libs 
referenced in Libs:

-- rex

More information about the Fedora-packaging mailing list