Issue configuring PETSc during FF installation on Mac

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.

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.

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.

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

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

config.param, then ./reconfigure.

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

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

Sorry, please try --disable-yams instead.

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

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

It worked! Thank you very much.

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.

config.log (416 Bytes)

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

My apologies.

Here is the correct file.configure.log (1.0 MB)

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

There is a workaround there: Compiltion errors on Centos 7, but you GCC compiler is very old, so you’ll likely run into other issues.

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 (770.5 KB)

Sorry, I didn’t link the proper answer for this particular error, here it is: Compiltion errors on Centos 7 - #3 by prj
You can remove '--disable-mmg' and '--disable-parmmg' from your config.param.

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 config.log (191.6 KB)

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