FreeFem++ make petsc-slepc error CentOS7

I am trying to install FreeFem++ on the CentOS 7 cluster. Following the installation guide for Ubuntu the following error is found for make petsc-slepc, returns C++ compiler (/root/mpich-install/bin/mpic++) appears non-compliant with C++11.
Please help me to install it.

You need to update your C++ compiler.

The system is running the following version:
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
Copyright (C) 2015 Free Software Foundation, Inc.

Yes, what is not clear in my earlier answer?

Sir,
Thank you for your response. The system shows the latest version of GCC installed.

yum install gcc

Package devtoolset-1.1-gcc-4.7.2-5.el6.x86_64 already installed and latest version.

Can you suggest to me which version of GCC will be suitable?

Anything above GCC 5.0 will work. FreeFEM also requires a C++11 compiler, so you need to fix this before trying to go further.

Thank you very much. It worked with GCC 7.
But after that, the following error is displayed:

Checking PETSc installation…
ERROR: Unable to link with PETSc
ERROR: See “installed-arch-linux2-c-opt/lib/slepc/conf/configure.log” file for details
ERROR***********
Error building SLEPc.


Please share the corresponding configure.log as shown in your picture (also, do not post picture, but text instead).

Please find the file attached herewith.
configure.log (4.1 KB)

There are still old flags lying around: /usr/lib/gcc/x86_64-redhat-linux/4.8.5. Please remove all what you’ve done with the previous GCC and start from scratch.