Looks like the upstream fixes only worked for the C and Fortran libs, but they forgot the F90 and C++ libs. The end result is incorrect linkage for both, with the C++ lib causing link errors with other packages. The attached patch fixes the linkage problems with the above shared libs, and is very minimal compared to the old shared lib patch so should not cause any problems. Note that any currently installed instances of mpich2 with USE=cxx have a broken libmpichcxx.so (which is a latent error that will probably cause build failures in packages linking against libmpi*).
Created attachment 226489 [details, diff] Makefile.in patch for shared lib missing linker args Updated shared lib patch for current ~arch version.
Thanks. Did this get sent upstream (so I can put a link next to the epatch line)?
Right, so using mpich2 with c++ or f90 works fine for me as documented. Can you please either send this upstream or at least provide me with a test case so that I can send it for you?
Fixed upstream. http://trac.mcs.anl.gov/projects/mpich2/changeset/6848
I was really hoping that upstream would have cut another release by now. Anyways, +*mpich2-1.2.1_p1-r1 (05 Aug 2010) + + 05 Aug 2010; Justin Bronder <jsbronder@gentoo.org> + -mpich2-1.2.1_p1.ebuild, +mpich2-1.2.1_p1-r1.ebuild, + +files/mpich2-1.2.1-fix-missing-libs.patch: + Fix #313045, add missing libs during linking + Thanks for reporting and the patch.