[petsc-dev] Investigation about 'unused direct shared library dependencies'

Matthew Knepley knepley at gmail.com
Thu Oct 6 07:11:34 CDT 2016


On Thu, Oct 6, 2016 at 6:17 AM, Antonio Trande <anto.trande at gmail.com>
wrote:

> Hi all.
>
> I'm compiling PETSc 3.7.3 on Fedora; the libraries are built in 4
> different stages, each stage starting from a *clean PETSc source*
> directory:
>
> petsc src
>        |
>        v
>      petsc src1 |--> serial libraries (link1)
>      petsc src2 |--> serial (64bit INTEGER) libraries (link2)
>      petsc src3 |--> OpenMPI libraries (link3)
>      petsc src4 |--> MPICH libraries (link4)
>
> link1:
> http://copr-dist-git.fedorainfracloud.org/cgit/
> sagitter/petsc/petsc.git/tree/petsc.spec?id=ea7abab121859c66de05f70863950b
> 4a6c5f7035#n402
>
> link2:
> http://copr-dist-git.fedorainfracloud.org/cgit/
> sagitter/petsc/petsc.git/tree/petsc.spec?id=ea7abab121859c66de05f70863950b
> 4a6c5f7035#n559
>
> link3:
> http://copr-dist-git.fedorainfracloud.org/cgit/
> sagitter/petsc/petsc.git/tree/petsc.spec?id=ea7abab121859c66de05f70863950b
> 4a6c5f7035#n682
>
> link4:
> http://copr-dist-git.fedorainfracloud.org/cgit/
> sagitter/petsc/petsc.git/tree/petsc.spec?id=ea7abab121859c66de05f70863950b
> 4a6c5f7035#n842
>
> The resulting libraries look contain 'unused (strange) direct shared
> library dependencies'. Like for serial libpetsc.so:
>
> $ ldd -u /usr/lib64/libpetsc.so.3.7.3
> Unused direct dependencies:
>         /lib64/libmetis.so.0
>         /lib64/libhwloc.so.5
>         /lib64/libhdf5.so.10
>         /lib64/libquadmath.so.0
>         /lib64/libstdc++.so.6
>         /lib64/libgomp.so.1
>
> libmetis.so is (correctly?) activated with *--with-metis=1* option but
> results unused.
>

I am not sure ldd is smart enough to understand everything here. For
example, we directly call
API functions from libparmetis.so only, but that means we need a
libmetis.so, and do not rely
on libparmetis.so to have it correctly linked (which it often does not when
users build it).

   Matt


> libhwloc.so.5, libhdf5.so.10 and libstdc++.so shouldn't be linked.
>
> Here you can find a full build log on Fedora 24 64bit:
> https://copr-be.cloud.fedoraproject.org/results/
> sagitter/petsc/fedora-24-x86_64/00461492-petsc/build.log.gz
>
> RPMs built are:
> https://copr-be.cloud.fedoraproject.org/results/
> sagitter/petsc/fedora-24-x86_64/00461492-petsc/
>
> Do you have idea why this happens?
>
> Regards.
> ---
> Antonio Trande
> mailto: sagitter 'at' fedoraproject 'dot' org
> http://fedoraos.wordpress.com/
> https://fedoraproject.org/wiki/User:Sagitter
> GPG Key: 0x6CE6D08A
> Check on https://keys.fedoraproject.org/
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20161006/b51ddb79/attachment.html>


More information about the petsc-dev mailing list