I’m trying to install the PETSc scientific computation library on Mac OS X 10.6.8.
When configuring the project, I am running into the following error message:
cls ~/Downloads/petsc-3.2-p6 $ ./configure
===============================================================================
Configuring PETSc to compile on your system
===============================================================================
TESTING: checkFortranNameMangling from config.compilers(config/BuildSystem/config/compilers.py:589) *******************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
-------------------------------------------------------------------------------
Unknown Fortran name mangling: Are you sure the C and Fortran compilers are compatible?
Perhaps one is 64 bit and one is 32 bit?
See http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#gfortran
*******************************************************************************
I have the following versions gcc
cls ~/Downloads/petsc-3.2-p6 $ gcc --version
i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
and gfortran
cls ~/Downloads/petsc-3.2-p6 $ gfortran --version
GNU Fortran (GCC) 4.2.3
Copyright (C) 2007 Free Software Foundation, Inc.
Why are those not compatible?
It seems that the two compilers come from two different packages. Maybe you should show us where do their binary reside, for example by using
which gccandwhich gfortran. Try to find accompanying build of gfortran to your build of gcc, which comes fromLLVM. Your gfortran is probably not provided by LLVM, but it is normal gcc build. The installer suggests that they may even be 32 and 64 bit.