If the C++ build fails with messages about ambiquities in the definitions, try reconfiguring and rebuilding with the --without-profiling options to the C++ configure. In later versions of MPICH, a different C++ interface will be provided that should fix this problem.