-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add sanity check for libraries with missing symbols #1304
Copy link
Copy link
Closed
Labels
testsGeneral test capability(ies)General test capability(ies)
Description
I've come across two packages now that have built without any trouble, but have later caused problems for users trying to link to them. The first was py-meep, which complained about missing symbols when imported (see #1156 (comment)). The second was Armadillo (see #1299 (comment)).
These problems can be hard to debug, but fairly easy to check for. In the case of Armadillo, it looks like this:
$ ldd -r libarmadillo.so
linux-vdso.so.1 => (0x00007ffdd8b61000)
libopenblas.so.0 => /blues/gpfs/home/software/spack/opt/spack/linux-centos6-x86_64/gcc-6.1.0/openblas-0.2.18-avx2mvh76o62v5a2dr5u6zz2ewer5p7w/lib/libopenblas.so.0 (0x00002b8a88ba1000)
libstdc++.so.6 => /blues/gpfs/home/software/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/lib64/libstdc++.so.6 (0x00002b8a89b7f000)
libm.so.6 => /lib64/libm.so.6 (0x00002b8a89f16000)
libgcc_s.so.1 => /blues/gpfs/home/software/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/lib64/libgcc_s.so.1 (0x00002b8a8a19a000)
libc.so.6 => /lib64/libc.so.6 (0x00002b8a8a3b1000)
/lib64/ld-linux-x86-64.so.2 (0x00002b8a886f1000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b8a8a745000)
libgfortran.so.3 => /blues/gpfs/home/software/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/lib64/libgfortran.so.3 (0x00002b8a8a963000)
libquadmath.so.0 => /blues/gpfs/home/software/spack/opt/spack/linux-x86_64/gcc-5.3.0/gcc-6.1.0-q2zosj3igepi3pjnqt74bwazmptr5gpj/lib64/../lib64/libquadmath.so.0 (0x00002b8a8ac8a000)
undefined symbol: zvout_ (./libarmadillo.so)
undefined symbol: dvout_ (./libarmadillo.so)
undefined symbol: cvout_ (./libarmadillo.so)
undefined symbol: dmout_ (./libarmadillo.so)
undefined symbol: smout_ (./libarmadillo.so)
undefined symbol: cmout_ (./libarmadillo.so)
undefined symbol: svout_ (./libarmadillo.so)
undefined symbol: zmout_ (./libarmadillo.so)
undefined symbol: ivout_ (./libarmadillo.so)I propose the following sanity check. Run this command on all installed dynamic libraries:
ldd -r <libname.so> | grep "undefined symbol"@citibeth You've been the biggest opponent of sanity checks. Can you foresee any problems with this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testsGeneral test capability(ies)General test capability(ies)