# Issue configuring PETSc during FF installation on Mac

**URL:** <https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889>\
**Category:** FreeFEM installation\
**Created:** [April 4, 2021, 2:04am UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889 "2021-04-04T02:04:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 4, 2021, 2:04am UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/1 "2021-04-04T02:04:14Z")

</div>

Hello,

I am trying to install FreeFEM v 4.6 on my mac (macOS Big Sur version 11.0.1) via the terminal using the source code, and I come across this issue while trying to configure PETSc:

> # =============================================================================== Configuring PETSc to compile on your system
> 
> ## TESTING: checkFortranCompiler from config.setCompilers(config/BuildSystem/config/setCompilers.py:960) \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
> 
> Fortran compiler you provided with --with-fc=/usr/local/bin/mpif90 cannot be found or does not work.  
> Cannot compile/link FC with /usr/local/bin/mpif90.
> 
> * * *
> 
> make: \*\*\* [petsc-3.13.0/tag-conf-real] Error 1

I am not sure how to properly complete installation.

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:** [April 4, 2021, 5:19am UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/2 "2021-04-04T05:19:59Z")

</div>

Please try again with FreeFEM 4.8 and let me know if this is fixed. If not, please attach _both_ `config.log` and `3rdparty/ff-petsc/petsc-3.14.2/configure.log`.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 5, 2021, 2:48pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/3 "2021-04-05T14:48:03Z")

</div>

Hello,

I tried installing v4.8 and I was able to successfully configure PETSc; however I run into a different issue trying to build the FreeFEM library and executable. I have attached a screenshot of the terminal output.

Thank you.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/6da227034fc0eda521fb464e82537dddac6fdd33.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:** [April 5, 2021, 2:53pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/4 "2021-04-05T14:53:08Z")

</div>

You should be able to configure with `--disable-freeyams` to fix this issue.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 5, 2021, 3:44pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/5 "2021-04-05T15:44:59Z")

</div>

Okay. Which config file should I change to implement that command?

---

<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 5, 2021, 3:47pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/6 "2021-04-05T15:47:20Z")

</div>

`config.param`, then `./reconfigure`.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 5, 2021, 3:55pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/7 "2021-04-05T15:55:58Z")

</div>

I tried that but it’s not working either. It says it’s an unrecognized option:

> configure: WARNING: unrecognized options: --disable-freeyams

---

<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 5, 2021, 3:59pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/8 "2021-04-05T15:59:09Z")

</div>

Sorry, please try `--disable-yams` instead.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 5, 2021, 4:32pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/9 "2021-04-05T16:32:58Z")

</div>

I think that helped, but now I’m trying to run examples and I get this error message:

`dyld: Library not loaded: @rpath/libhdf5.103.dylib`

---

<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 5, 2021, 4:37pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/10 "2021-04-05T16:37:15Z")

</div>

You have some HDF5 files lying around which have been picked up by configure.  
Please also add `'--without-hdf5'`.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 5, 2021, 5:11pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/11 "2021-04-05T17:11:40Z")

</div>

It worked! Thank you very much.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 26, 2021, 6:33pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/12 "2021-04-26T18:33:01Z")

</div>

Hello @prj ,

I have another issue compiling PETSc - this time on a linux system. The error seems to be an issue in compiling PTScotch. I have attached the screen output as well as the config.log file to aid in debugging.

Thank you.

 ![Screen Shot 2021-04-26 at 2.25.52 PM](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/13a39398965947a844d280cec8d22ed710497d9a.png) [config.log](https://community.freefem.org/uploads/short-url/eIYxgZBHSWWYudRLmrlVtSLGkUH.log) (416 Bytes)

---

<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 26, 2021, 6:35pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/13 "2021-04-26T18:35:15Z")

</div>

And yet you are still not attaching the proper `configure.log` file… I need the one from `3rdparty/ff-petsc/petsc-3.15.0`.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 26, 2021, 6:38pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/14 "2021-04-26T18:38:10Z")

</div>

My apologies.

Here is the correct file.[configure.log](https://community.freefem.org/uploads/short-url/zZ71MYF4RGQECTqvV8oMTveMD9y.log) (1.0 MB)

---

<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 26, 2021, 6:40pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/15 "2021-04-26T18:40:24Z")

</div>

You don’t have access to a newer GCC compiler, by any chance?

---

<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 26, 2021, 6:42pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/16 "2021-04-26T18:42:43Z")

</div>

There is a workaround there: [Compiltion errors on Centos 7](https://community.freefem.org/t/compiltion-errors-on-centos-7/872), but you GCC compiler is very old, so you’ll likely run into other issues.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 26, 2021, 6:56pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/17 "2021-04-26T18:56:33Z")

</div>

I modified the config.param file to include `'--disable-mmg'`and `'--disable-parmmg'` and recompiled and tried `make petsc-slepc` again, but the same error seems to occur. I’ve attached the configure.log file again in case it is different the time. [configure.log](https://community.freefem.org/uploads/short-url/4KnItJCH9ZYWOhee1qeFRse4SG.log) (770.5 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:** [April 26, 2021, 7:12pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/18 "2021-04-26T19:12:30Z")

</div>

Sorry, I didn’t link the proper answer for this particular error, here it is: [Compiltion errors on Centos 7 - #3 by prj](https://community.freefem.org/t/compiltion-errors-on-centos-7/872/3)  
You can remove `'--disable-mmg'` and `'--disable-parmmg'` from your `config.param`.

---

<div class="post-metadata">

**Author:** ![KBarrett](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@KBarrett](https://community.freefem.org/u/KBarrett)\
**Post date:** [April 26, 2021, 8:27pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/19 "2021-04-26T20:27:38Z")

</div>

That did fix the PETSc compiling issue, so I `./reconfigure` and everything looks good; however, when I run `make` I get a strange output/error. I’ve attached the screen output and config.log  
 ![Screen Shot 2021-04-26 at 4.26.26 PM](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/61b86e2be1e905096917ad93cb859a62ca900012.png) [config.log](https://community.freefem.org/uploads/short-url/b4eOwd4HOmg9ZnmLA5myb2tmWbm.log) (191.6 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:** [April 26, 2021, 8:28pm UTC](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889/20 "2021-04-26T20:28:16Z")

</div>

Ipopt error, so you need to add `--disable-ipopt` in `config.param`.

[Next page](https://community.freefem.org/t/issue-configuring-petsc-during-ff-installation-on-mac/889.md?page=2)
