Hi Orion:

Thanks for reporting this issue.  More below.

On 2011-11-22 16:00-0700 Orion Poplawski wrote:

> In my Fedora packages, the various language binding libraries are linked as
> follows:
>
> # ldd /usr/lib/libplplotcxxd.so
>         linux-gate.so.1 =>  (0x00fbe000)
>         libplplotd.so.11 => /usr/lib/libplplotd.so.11 (0x48cb0000)
>         libltdl.so.7 => /usr/lib/libltdl.so.7 (0x499d1000)
>         libdl.so.2 => /lib/libdl.so.2 (0x4704f000)
>         libcsirocsa.so.0 => /usr/lib/libcsirocsa.so.0 (0x47913000)
>         libcsironn.so.0 => /usr/lib/libcsironn.so.0 (0x47901000)
>         libqhull.so.5 => /usr/lib/libqhull.so.5 (0x478aa000)
>         libqsastime.so.0 => /usr/lib/libqsastime.so.0 (0x4790b000)
>         libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x47a01000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x470dd000)
>         libm.so.6 => /lib/libm.so.6 (0x47022000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x47073000)
>         libc.so.6 => /lib/libc.so.6 (0x46e75000)
>         /lib/ld-linux.so.2 (0x46e50000)

ldd without any options just lists all direct and indirect links
which doesn't tell you anything about overlinking.

Instead, use the -u option, e.g.,

software@raven> ldd -u bindings/c++/libplplotcxxd.so
Unused direct dependencies:

         /usr/lib/libltdl.so.7
         /lib/libdl.so.2
         /home/software/plplot_svn/HEAD/build_dir/lib/csa/libcsirocsa.so.0
         /home/software/plplot_svn/HEAD/build_dir/lib/nn/libcsironn.so.0
         /home/software/qhull/install/lib/libqhull.so.5
         /home/software/plplot_svn/HEAD/build_dir/lib/qsastime/libqsastime.so.0
         /usr/lib/libfreetype.so.6
         /lib/libm.so.6
         /lib/libgcc_s.so.1

This result agrees exactly with what rpmlint says below about the 9
libraries that are linked by our build system to libplplotcxxd.so when
they don't have to be.  And I assume overlinking is also an issue for
most or all of our other libraries as well.

>
> This generates the following rpmlint warnings:
>
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libltdl.so.7
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /lib/libdl.so.2
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libcsirocsa.so.0
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libcsironn.so.0
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libqhull.so.5
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libqsastime.so.0
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /usr/lib/libfreetype.so.6
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /lib/libm.so.6
> plplot-libs.i686: W: unused-direct-shlib-dependency
> /usr/lib/libplplotcxxd.so.10.0.0 /lib/libgcc_s.so.1
>
> [....]Can this be tackled?

We link libplplotcxx with CMake as follows in our build system:

target_link_libraries(plplotcxx${LIB_TAG} plplot${LIB_TAG})

In other words, we only mention the direct link to CMake.  However, by
default CMake uses transative linking (search for "transitive" in the
CMake man page).  That is, the generated link line for libplplotcxxd
not only includes libplplotd, but also all of the libraries linked by
libplplotd, all libraries linked by libplplotd dependencies, etc.  We
currently use that CMake default so that is why the above 9 unused
direct dependencies are generated.

>From a test I did (see details in my recent post to the CMake list) it
appears there is a way to drop transitive linking with CMake.  But I
will wait for replies to that post before trying to supply an
experimental option (which would default to OFF) with the PLplot build
system to disable transitive linking.  I would appreciate you testing
that experimental option once I implement it.

Meanwhile, could you give me a complete list of PLplot libraries which
generate the rpmlint warnings about unused direct dependencies?

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
__________________________

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to