tags 653616 patch
thanks

On Thu, 2012-01-12 at 10:39 -0600, Pavan Balaji wrote:
> On 01/12/2012 10:27 AM, Pavan Balaji wrote:
> > For the inter-library dependencies, I'd not like to have a Debian-only
> > patch.  But you are right, libtool should be able to disable
> > dependencies on platforms it doesn't support.  Let me look into this
> > some more.
> 
> Hmm..  In 1.5.x, it looks like we already have this dependency set.

Terrific!

> That should work on Debian, though Ubuntu seems to disable it, so I 
> can't test it on my laptop.  I'll try to find a Debian machine to test 
> it out.  But if you can give it a shot, that'll be great.
> 
> http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/nightly/trunk/

Just tested a build, it seems to set the link properly, thanks very
much.  Do you have a timetable for the release of 1.5.x?

I'm attaching a simple and working patch for the 1.4.1 package in case
it will be a while.  The -Wl,-z,defs checks the library to make sure it
links to all of the libraries it needs, but is not portable.

Those checks also indicated that the MPI C++ library needs to link to
the stdc++ library, so I added that link to the patch for 1.4.1 as well.
(1.5 has the stdc++ link already.)

Thanks very much,
Adam
-- 
GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Engineering consulting with open source tools
http://www.opennovation.com/
diff -urN mpich2-1.4.1.orig/debian/changelog mpich2-1.4.1/debian/changelog
--- mpich2-1.4.1.orig/debian/changelog	2011-08-27 03:06:32.000000000 -0400
+++ mpich2-1.4.1/debian/changelog	2012-01-12 16:56:38.000000000 -0500
@@ -1,3 +1,10 @@
+mpich2 (1.4.1-2) UNRELEASED; urgency=low
+
+  [ Adam C. Powell, IV ]
+  * Link shared libraries with their dependencies (closes: #653616).
+
+ -- "Adam C. Powell, IV" <hazel...@debian.org>  Thu, 12 Jan 2012 13:58:40 -0500
+
 mpich2 (1.4.1-1) unstable; urgency=low
 
   * New upstream release.
diff -urN mpich2-1.4.1.orig/debian/patches/link-libs.patch mpich2-1.4.1/debian/patches/link-libs.patch
--- mpich2-1.4.1.orig/debian/patches/link-libs.patch	1969-12-31 19:00:00.000000000 -0500
+++ mpich2-1.4.1/debian/patches/link-libs.patch	2012-01-12 16:58:55.000000000 -0500
@@ -0,0 +1,30 @@
+Index: mpich2-1.4.1/Makefile.in
+===================================================================
+--- mpich2-1.4.1.orig/Makefile.in
++++ mpich2-1.4.1/Makefile.in
+@@ -105,20 +105,20 @@
+ C_COMPILE       = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS)
+ # Build the shared library from the shared object files
+ lib/lib${MPILIBNAME}.@SHLIB_EXT@: lib/lib${MPILIBNAME}.la
+-	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPILIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ @LIB_DEPS@ -ldflags "$(LDFLAGS)" $(LIBS))
++	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPILIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ @LIB_DEPS@ -ldflags "$(LDFLAGS) -Wl,-z,defs" $(LIBS) -lmpl)
+ 	if [ -n "@NO_WEAK_SYM@" -a \
+ 		"${MPILIBNAME}" != "${PMPILIBNAME}" ] ; then \
+-	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${PMPILIBNAME}.la  -rpath $(libdir) );\
++	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${PMPILIBNAME}.la  -rpath $(libdir) -ldflags "-Wl,-z,defs");\
+ 	fi
+ # Build the shared library from the shared object files
+ lib/libf${MPILIBNAME}.@SHLIB_EXT@: lib/libf${MPILIBNAME}.la
+-	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o libf${MPILIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS)" $(LIBS))
++	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o libf${MPILIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS) -Wl,-z,defs" $(LIBS))
+ # Build the shared library from the shared object files
+ lib/lib${MPILIBNAME}f90.@SHLIB_EXT@: lib/lib${MPILIBNAME}f90.la
+-	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPILIBNAME}f90.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS)" $(LIBS))
++	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPILIBNAME}f90.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS) -Wl,-z,defs" $(LIBS))
+ # Build the shared library from the shared object files
+ lib/lib${MPICXXLIBNAME}.@SHLIB_EXT@: lib/lib${MPICXXLIBNAME}.la
+-	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPICXXLIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS)" $(LIBS))
++	(cd lib && $(CREATESHLIB) --mode=link  -version-info "$(ABIVERSION)" -o lib${MPICXXLIBNAME}.la  -rpath $(libdir) -L. @LDFLAGS_DEPS@ -l$(MPILIBNAME) @LIB_DEPS@ -ldflags "$(LDFLAGS) -Wl,-z,defs" $(LIBS) -lstdc++)
+ 
+ # --------------------------------------------------------------------------
+ .libstamp0: 
diff -urN mpich2-1.4.1.orig/debian/patches/series mpich2-1.4.1/debian/patches/series
--- mpich2-1.4.1.orig/debian/patches/series	2011-08-25 15:37:45.000000000 -0400
+++ mpich2-1.4.1/debian/patches/series	2012-01-12 16:56:38.000000000 -0500
@@ -1 +1,2 @@
 destdir.patch
+link-libs.patch

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to