I'm not sure how to resolve this. It looks to be related to the issue
of implicit dependencies which you talk about below, but it's actually
separate. DOLFIN could have determined on its own to use the flags
"-L/usr/lib/mpich/lib -lmpich", which would still have led to link
errors when installing lam4-dev.
I don't understand. Why is it necesary for DOLFIN to use the alternatives
system at all? If it is using MPICH libraries explicitly everywhere, I
don't see the problem, and from what I understand, that is what it is
doing.
Please elaborate.
No, the library path is explicit while the include path is the one
provided by the alternatives system. I'm not sure why both aren't
discovered in the same way, but it seems PETSc provides the link path
but not the include path. Still, the alternatives system should
guarantee that the different alternatives provided are
interchangeable, and in this case they're not, since they break
compilation.