[CMake] transitive linking topics

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed Nov 23 17:13:46 EST 2011


On 2011-11-23 22:35+0100 Michael Hertling wrote:

>> All this to quiet rpmlint warnings....
>
> Out of curiosity - I have not worked with RPM for ages: Are these
> warnings and the related overlinking due to transitive dependencies
> really an issue or just an inconvenience? Personally, I distinguish
> between real overlinking, i.e. pulling in libraries not used at all,
> and formal overlinking by DT_NEEDED tags for mediate prerequisites,
> or in other words: Real overlinking means the dependency graph has
> unnecessary nodes, and formal overlinking means is has unnecessary
> edges. Of course, the former is a real penalty, but is the latter
> also bad? If an executable X is linked against a shared library B,
> and B against a shared A, is it really critical if A explicitly
> appears among the dependencies of X, as A *is* needed for X?
> Perhaps, you can share some experiences from your practice.

Hi Michael:

Thanks for your informative and detailed post.

However, it's going to take a while to absorb everything you said
(since, for example, I still need to educate myself on the exact
meaning of DT_NEEDED), but I can immediately answer the last question
above.

I have no experience with rpm myself. I was just commenting on the
CMake transitive linking implications of what Orion told me about
rpmlint warnings he had encountered (which I confirmed with "ldd -u").
Since I wrote "all this to quiet rpmlint warnings", it turns out the
PLplot Debian packager (again not me) confirmed today that the Debian
lint programme was also complaining about overlinking.  So it appears
there is consensus amongst the Linux rpm and deb software packaging
tools that the formal overlinking (using your terminology) created by
CMake by default is bad, but I don't know the practical justification
for that conclusion.  My guess is it may be related to the problem of
specifying unnecessary package dependencies that are incorrectly
determined by following unnecessary direct linking, but I don't know
for sure.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list