# Compiltion errors on Centos 7

**URL:** <https://community.freefem.org/t/compiltion-errors-on-centos-7/872>\
**Category:** FreeFEM installation\
**Created:** [March 26, 2021, 9:53am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872 "2021-03-26T09:53:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 26, 2021, 9:53am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/1 "2021-03-26T09:53:40Z")

</div>

Hello,

I am trying to install FreeFem v4.8 on Centos 7 following this guide [Installation guide](https://doc.freefem.org/introduction/installation.html) section “Compilation on Ubuntu”.

I have found errors in step 6 with command “make petsc-slepc”:

 ![freefemerror](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/cf72b68ea05339270f78da23579ca1dad4f12c49.png)

Can you help me please?

Thank you.

---

<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:** [March 26, 2021, 9:59am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/2 "2021-03-26T09:59:55Z")

</div>

> Can you help me please?

Definitely, this is a rather common error. However, I don’t remember the easiest way to fix this. Could you please send the file `petsc-3.14.2/configure.log`?

---

<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:** [March 26, 2021, 10:16am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/3 "2021-03-26T10:16:01Z")

</div>

Also, I think you should be able to fix this by editing `3rdparty/ff-petsc/Makefile` and adding the flag `-D_POSIX_C_SOURCE=199309L` to `COPTFLAGS` [there](https://github.com/FreeFem/FreeFem-sources/blob/4046ffa/3rdparty/ff-petsc/Makefile#L85).  
`COPTFLAGS='-O3 $(FLAGS_MTUNE)'` → `COPTFLAGS='-D_POSIX_C_SOURCE=199309L -O3 $(FLAGS_MTUNE)'`.

Then, simply `make petsc-slepc` again.

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 26, 2021, 11:00am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/4 "2021-03-26T11:00:22Z")

</div>

Thank you very much for your quickly request, but now I have found a new error:

 ![freefemerror2](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/266bfdc4217e78b0c377fab4c4d01f44cee01953.png)

---

<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:** [March 26, 2021, 12:11pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/5 "2021-03-26T12:11:34Z")

</div>

Where is your `configure.log` that I asked for earlier? I can’t help you without. You can remove `--download-superlu` from `3rdparty/ff-petsc/Makefile`.

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 26, 2021, 1:22pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/6 "2021-03-26T13:22:41Z")

</div>

Sorry but when I try to attach my log the web tells me that new users cannot attach ☹

Thank you.

---

<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:** [March 26, 2021, 1:41pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/7 "2021-03-26T13:41:33Z")

</div>

OK, sorry about that. Is it working when you remove `--download-superlu`?

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 26, 2021, 5:32pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/8 "2021-03-26T17:32:36Z")

</div>

Superlu appears on several lines (lines 53, 69, 105, 106, 121, 226, 267, 268), do I have to delete all lines?

You can download my configue.log file at the following link [configure.log - Google Drive](https://drive.google.com/file/d/1z257Qa-WGCdC1_6IEyuGGmAPPdwyaLwn/view?usp=sharing)

Thank you.

---

<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:** [March 26, 2021, 5:39pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/9 "2021-03-26T17:39:21Z")

</div>

I told you to remove `--download-superlu`, how do you see `--download-superlu` lines 226, 267 or 268?

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 26, 2021, 6:27pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/10 "2021-03-26T18:27:27Z")

</div>

I have remove --download-superlu and now I have found more errors:  
 ![freefemerror3](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/e3f2db47b6fce9000e7f102244b11b1396102ba5.png)

Thank you.

---

<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:** [March 26, 2021, 6:49pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/11 "2021-03-26T18:49:04Z")

</div>

You can remove [that](https://github.com/FreeFem/FreeFem-sources/blob/develop/3rdparty/ff-petsc/Makefile#L42) line. Your system is very old, I’d suggest you update to a newer OS.

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 29, 2021, 7:45am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/12 "2021-03-29T07:45:21Z")

</div>

Thank you but now I have found errors when do make (step 7 on [Installation guide](https://doc.freefem.org/introduction/installation.html)).

 ![freefemerror4](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/d94957230c666d0380aa7b3445c6c5d251669f33.png) .

I have checked Makefile and I have found -fPIC option on serveral lines.

---

<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:** [March 29, 2021, 7:48am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/13 "2021-03-29T07:48:42Z")

</div>

OK, you’ll need to edit `config.param` and add the lines:

```auto
'--disable-mmg'
'--disable-parmmg'

```

Then, `./reconfigure && make` should do the trick.

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 29, 2021, 10:07am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/14 "2021-03-29T10:07:56Z")

</div>

Thank you,

now, when I have executed the command “make check” I get:

 ![freefemerror5](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/87c5d823656bb2974eb0a0ad7db8424fe357fc7e.png)

---

<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:** [March 29, 2021, 10:10am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/15 "2021-03-29T10:10:13Z")

</div>

Yes, that is to be expected since `Mmg` is disabled. You can skip that directory, and maybe try `cd examples/mpi && make check` or `cd examples/hpddm && make check`. But it looks good.

---

<div class="post-metadata">

**Author:** ![jeyc](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jeyc](https://community.freefem.org/u/jeyc)\
**Post date:** [March 29, 2021, 10:32am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/16 "2021-03-29T10:32:26Z")

</div>

Thank you very much for all the help you have given me, I think the installation has finally completed successfully.

 ![freefemok](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/c0b88a4a1cdbb3cd1c65bf0551f33f4d0c2a7582.png)

---

<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:** [March 29, 2021, 11:09am UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/17 "2021-03-29T11:09:08Z")

</div>

Good. No problem, thank you for your patience 😃

---

<div class="post-metadata">

**Author:** ![msinclair-hf](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/msinclair-hf/32/504_2.png) [@msinclair-hf](https://community.freefem.org/u/msinclair-hf)\
**Post date:** [April 14, 2021, 6:23pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/18 "2021-04-14T18:23:56Z")

</div>

Hi prj,

This is helpful, thank you. Is there any plan to release a Docker image with FreeFEM++ compiled for CentOS 7?

Many thanks.

---

<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:** [April 14, 2021, 8:39pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/19 "2021-04-14T20:39:13Z")

</div>

I’m not really sure what you are asking for, but there is a Docker image at [Docker Hub](https://hub.docker.com/r/freefem/freefem).

---

<div class="post-metadata">

**Author:** ![msinclair-hf](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/msinclair-hf/32/504_2.png) [@msinclair-hf](https://community.freefem.org/u/msinclair-hf)\
**Post date:** [April 15, 2021, 2:31pm UTC](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/20 "2021-04-15T14:31:10Z")

</div>

Thanks for replying so quickly. I noticed that the [Dockerfile](https://github.com/FreeFem/FreeFem-docker/blob/master/freefem-docker/Dockerfile) uses Ubuntu as a base layer. My use-case requires having CentOS 7 as a base layer, so that additional applications only available for CentOS 7 can also be installed inside the same Docker container. Ideally, I would use a FreeFEM++ Docker image (with CentOS 7) as a base layer in my own Dockerfile where I would include these additional applications.

It seems like this would be possible to do by adapting the current [Dockerfile](https://github.com/FreeFem/FreeFem-docker/blob/master/freefem-docker/Dockerfile), and would involve necessary changes to compile FreeFEM++ in CentOS 7. Is this something that might be made available? Or would it be something rather that a user could contribute?

[Next page](https://community.freefem.org/t/compiltion-errors-on-centos-7/872.md?page=2)
