The MPI thorn does not properly set the list of libraries necessary to link against it when built. In particular, when built on a Debian stable (stretch) system, the 'rt' and 'util' libraries are pulled in by MPI, but not set in MPI_LIBS, leading to a Cactus link error in the end. Adding 'rt' and 'util' in general might not be the best idea, as this is very likely system-specific (to Linux in this case).
What needs to be done is to use information about the built library after it was built to set MPI_LIBS, as we cannot (always) predict which libraries MPI will pull in. This is complicated by the fact that those variables are set in detect.sh, and not build.sh, so build.sh would need means to set/change those variables. But since this is executed in a parallel make session usually, this requires some care.
Note that in case a pre-existing library is used, 'rt' and 'util' are correctly added to the required libs, because detect.sh actually queries the library. It cannot do that when building, because by that time it isn't built yet, and by the time it is, it is too late to tell Cactus at the moment.
I'll file this as a bug for the MPI thorn for now, but a better handling in Cactus in general is needed here. Also setting this as critical for the release, because it breaks the build on a major Linux distribution.
One might be tempted to temporarily "fix" this by adding 'rt' and 'util' to LIBS in debian.cfg. That is a bad idea, however, because Debian isn't a Linux-only distribution, and in general one might not even want to use OpenMPI there.
The same is true for adding 'rt' and 'util' to MPI_LIBS in build.sh, because that would only work on a system that has this library installed. On a Linux system, however, this solves the linking problem.
Ideally, we find some at least partial solution within only the MPI thorn for the current release, down-grade priority and assign to Cactus itself for a general solution. This has come up with other libraries in the past if I remember correctly.