mpich3 install fails with iostream error

Hi
I’m trying to install mpich 3.3.2 with PGI compilers. The command is
./configure CC=pgcc CXX=pgc++ F77=pgfortran FC=pgfortran --prefix=/home/vibhum/local
The installation stops when performing checks for pgc++, with the error that iostream/iostream.h not found. The last few lines from terminal:

checking whether we are using the GNU Fortran compiler… no
checking whether pgfortran accepts -g… yes
checking for extension for Fortran 90 programs… f90
checking whether the Fortran 90 compiler (pgfortran ) works… yes
checking whether the Fortran 90 compiler (pgfortran ) is a cross-compiler… no
checking for Fortran flag needed to accept free-form source… none
checking whether Fortran 90 supports Cray-style pointer… yes
checking for Fortran 90 compiler flag for Cray-style pointer… none
checking whether pgfortran supports the Fortran 2003 routines to access the commandline… yes
checking for Fortran 90 module extension… mod
checking for Fortran 90 module include flag… -I
checking for Fortran 90 module output directory flag… -module
checking whether we are using the GNU C++ compiler… yes
checking whether pgc++ accepts -g… yes
checking dependency style of pgc++… pgcc
checking whether available… no
checking how to run the C++ preprocessor… pgc++ -E
checking iostream.h usability… no
checking iostream.h presence… no
checking for iostream.h… no
configure: error: C++ compiler pgc++ has neither iostream nor iostream.h.
configure: error: ./configure failed for test/mpi

The complete log file can be viewed at https://drive.google.com/file/d/1xdJLlG7zi3Cu5A-2iZ2EcZ3rHHYOaVaB/view?usp=sharing.
There are similar errors in the log when I try to configure cmake 3.17.3 with pgcc & pgc++. The command is
env CC=pgcc CXX=pgc++ ./bootstrap --prefix=/home/vibhum/local
The log file for this is https://drive.google.com/file/d/16g7bPJdsx8neqUIIH4tdVba_gP4wlFOy/view?usp=sharing.

Can you please guide how to fix this?

Hi Vibhu,

Which version of the PGI compilers were you using when you encountered this issue?

Thanks,

+chris