# FreeFem++ make petsc-slepc error CentOS7

**URL:** https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690
**Category:** FreeFEM installation
**Created:** [September 8, 2023, 9:39am UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690 "2023-09-08T09:39:04Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![prabir.barman](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@prabir.barman](https://community.freefem.org/u/prabir.barman)
#### Post date: [September 8, 2023, 9:39am UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/1 "2023-09-08T09:39:04Z")

</div>

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.

 ![Petsc-error FreeFem++](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/9/92cf3803da3c66efcad8125e0fe60c54ab3c4873.jpeg)

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 8, 2023, 11:59am UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/2 "2023-09-08T11:59:03Z")

</div>

You need to update your C++ compiler.

---

<div class="post-metadata">

### Author: ![prabir.barman](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@prabir.barman](https://community.freefem.org/u/prabir.barman)
#### Post date: [September 8, 2023, 12:36pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/3 "2023-09-08T12:36:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 8, 2023, 12:46pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/4 "2023-09-08T12:46:12Z")

</div>

Yes, what is not clear in my earlier answer?

---

<div class="post-metadata">

### Author: ![prabir.barman](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@prabir.barman](https://community.freefem.org/u/prabir.barman)
#### Post date: [September 8, 2023, 1:15pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/5 "2023-09-08T13:15:28Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 8, 2023, 1:18pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/6 "2023-09-08T13:18:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![prabir.barman](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@prabir.barman](https://community.freefem.org/u/prabir.barman)
#### Post date: [September 8, 2023, 1:48pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/7 "2023-09-08T13:48:58Z")

</div>

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.

* * *

 ![Petsc-error FreeFem++1](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/0/08dbc58a113cc79ce47d73a56b19520885856889.jpeg)

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 8, 2023, 1:52pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/8 "2023-09-08T13:52:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![prabir.barman](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@prabir.barman](https://community.freefem.org/u/prabir.barman)
#### Post date: [September 8, 2023, 2:08pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/9 "2023-09-08T14:08:58Z")

</div>

Please find the file attached herewith.  
[configure.log](https://community.freefem.org/uploads/short-url/bCd7UdwGMZPqzE0M9P3zFoGVxK4.log) (4.1 KB)

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [September 8, 2023, 2:17pm UTC](https://community.freefem.org/t/freefem-make-petsc-slepc-error-centos7/2690/10 "2023-09-08T14:17:52Z")

</div>

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.
