In that case, I'd suggest you explicitly list -lmpich, -lopa and -lmpl in there for now. You can always look at "mpicc -show" for any released version to figure out what all flags/libs are being set.

 -- Pavan

On 01/07/2012 08:19 PM, Adam C Powell IV wrote:
That may be true, but it is a goal of Debian to be able to build the
archive using binutils-gold, which requires each ELF object (shared
library or executable) to link with every library whose symbol it uses.

As I understand it, the reason is that binutils-gold allows for much
faster build-time and run-time linking than standard binutils.

Feel free to ignore this, but at some point this will become a
release-critical bug.

-Adam

On Thu, 2011-12-29 at 23:44 -0600, Pavan Balaji wrote:
The best method is to use pkg-config to find what libraries need to be
linked in.  Currently, this list is libmpich, libmpl and libopa, if you
are using generic TCP/IP and shared memory support.  But if you enable
other modules, more libraries might be required.

   -- Pavan

On 12/29/2011 01:48 PM, Adam C Powell IV wrote:
X-DebBugs-CC: 653...@bugs.debian.org
Package: libmpich2-dev
Version: 1.4.1-1+b1

Greetings,

On mips(el) and s390, the scalapack build fails with:

gfortran  -o 
/build/buildd-scalapack_1.8.0-8-mipsel-D7TgwK/scalapack-1.8.0/TESTING/xspblas1tst
 psblas1tst.o psblastst.o slamch.o pblastst.o PB_Cwarn.o PB_Cabort.o -L 
/build/buildd-scalapack_1.8.0-8-mipsel-D7TgwK/scalapack-1.8.0 
-lscalapack-mpich2 -lblacsF77init-mpich2 -lblacs-mpich2 -lblacsF77init-mpich2 
-llapack -lblas -L/usr/lib/mpich2/lib/ -lmpich
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trfree'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_env2str'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trlevel'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trvalid'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trmalloc'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trspace'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_env2range'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trcalloc'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_env2int'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trdump'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_env2bool'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trstrdup'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trrealloc'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_TrSetMaxMem'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trinit'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trDebugLevel'
/usr/lib/mpich2/lib//libmpich.so: undefined reference to `MPL_trid'

All of these symbols seem to be in libmpl.so, so linking libmpich2.so
with libmpl.so would fix this problem.

You can see the error in at the end of the package build:

dh_shlibdeps -plibmpich2-3
        dpkg-shlibdeps -Tdebian/libmpich2-3.substvars 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 
debian/libmpich2-3/usr/lib/libmpichcxx.so.3.2 
debian/libmpich2-3/usr/lib/libfmpich.so.3.2 
debian/libmpich2-3/usr/lib/libmpl.so.1.1.0 
debian/libmpich2-3/usr/lib/libmpichf90.so.3.2 
debian/libmpich2-3/usr/lib/libopa.so.1.0.0
dpkg-shlibdeps: warning: symbol __cxa_pure_virtual used by 
debian/libmpich2-3/usr/lib/libmpichcxx.so.3.2 found in none of the libraries.
[and 9 more missing symbols]
dpkg-shlibdeps: warning: symbol MPL_trdump used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_TrSetMaxMem used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_putenv used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_env2range used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trrealloc used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trlevel used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trDebugLevel used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trinit used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trcalloc used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: symbol MPL_trfree used by 
debian/libmpich2-3/usr/lib/libmpich.so.3.2 found in none of the libraries.
dpkg-shlibdeps: warning: 8 other similar warnings have been skipped (use -v to 
see them all).

It's interesting that this works fine on other platforms, that it either
ignores or manages to find libmpl...  But in general, it's best to link
to all of the libraries whose symbols you use, I'm pretty sure it's also
a requirement of binutils-gold.

Thanks,
Adam

--
Pavan Balaji
http://www.mcs.anl.gov/~balaji



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to