[petsc-users] PETSc 3.5.2 on Mac OS X Yosemite, configuring gives C preprocessor error

Satish Balay balay at mcs.anl.gov
Sun Jan 18 15:03:38 CST 2015


>>>>>>>>>>
Checking for program /usr/local/bin/gcc...found

Executing: gcc -c -o /var/folders/_v/0817pkss07z1y_v4bzw9ssy80000gn/T/petsc-y_tzNl/config.setCompilers/conftest.o -I/var/folders/_v/0817pkss07z1y_v4bzw9ssy80000gn/T/petsc-y_tzNl/config.setCompilers   /var/folders/_v/0817pkss07z1y_v4bzw9ssy80000gn/T/petsc-y_tzNl/config.setCompilers/conftest.c
Possible ERROR while running compiler:
stderr:
gcc: warning: couldn’t understand kern.osversion ‘14.0.0
<<<<<<<<<

You have broken gcc in your PATH. [it broke due to Yosemite
upgrade]. Is this homewrew or something else?  You should delete your
/usr/local and reinstall whatever you need in there.

However wrt PETSc - you can use:

./configure --with-cc=/usr/bin/clang --with-cxx=/usr/bin/clang++ --with-fc=0 --download-mpich --with-debugging=0

However if you need gfortran - you would have to do the 'reinstall
/usr/local' stuff for that.

Satish

On Sun, 18 Jan 2015, Justin Dong wrote:

> Sorry, configure.log is attached below.
> 
> On Sun, Jan 18, 2015 at 3:48 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 
> >
> >   We need configure.log
> >
> >    You do not need --download-blaslapack Apple always has them
> >
> >    Suggest just running without passing the compiler names also.
> >
> >   Barry
> >
> > > On Jan 18, 2015, at 2:45 PM, Justin Dong <jdong217 at gmail.com> wrote:
> > >
> > > Hi all,
> > >
> > > I just updated to OS X Yosemite. I have the latest XCode and also
> > reinstalled command line developer tools.
> > >
> > > When I try to install PETSc, I get the following error:
> > >
> > > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> > --download-fblaslapack --download-mpich --with-debugging=0
> > >
> > >
> > ===============================================================================
> > >
> > >              Configuring PETSc to compile on your system
> > >
> > >
> > ===============================================================================
> > >
> > > TESTING: checkCPreprocessor from
> > config.setCompilers(config/BuildSystem/config/setCompilers.py:568)
> >
> > *******************************************************************************
> > >
> > >          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
> > for details):
> > >
> > >
> > -------------------------------------------------------------------------------
> > >
> > > Cannot find a C preprocessor
> > >
> > >
> > *******************************************************************************
> > >
> > >
> > >
> > > Can someone explain to me what's going on here?
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Justin
> > >
> >
> >
> 


More information about the petsc-users mailing list