[petsc-users] PETSc on GCC

Satish Balay balay at mcs.anl.gov
Thu Aug 4 15:51:49 CDT 2022


> Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions CFLAGS=-std=c99 --with-cc=mpicc --with-cxx=g++ --download-fblaslapack=yes --download-hypre=yes -with-x=0 --with-c++support=yes --with-mpi=yes --with-hypre=yes --prefix=/petsc --with-c2html=0 --with-ssl=0

Try:

./configure CFLAGS=-std=c99 --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack=yes --download-hypre=yes -with-x=0 --with-c2html=0 --with-ssl=0

Satish

On Thu, 4 Aug 2022, Simon Zhang wrote:

> I do have mpicc installed and have CFLAGS=-std=c99 but I'm still unable to
> configure.
> 
> On Thu, Aug 4, 2022 at 12:21 PM Satish Balay <balay at mcs.anl.gov> wrote:
> 
> > > gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
> >
> > Do you have a newer gcc version available for use on this machine?
> >
> > >>>>>>
> > /tmp/petsc-7thm2vwz/config.setCompilers/conftest.c: At top level:
> > cc1: warning: unrecognized command line option "-Wno-lto-type-mismatch"
> > [enabled by default]
> >
> >             Rejecting compiler flag -std=c99 due to
> > <<<<<<
> >
> > Hm - looks configure logic here is failing.
> >
> > -Wno-lto-type-mismatch checked went through earlier [so this flag was
> > accepted] - but then when a test is retried with "-Wno-lto-type-mismatch
> > -std=c99" its failing
> >
> > Perhaps one way to work around is to use configure option: CFLAGS=-std=c99
> >
> > But its better to use a more recent gcc than 4.8.4
> >
> > Satish
> >
> > On Thu, 4 Aug 2022, Simon Zhang wrote:
> >
> > > On Thu, Aug 4, 2022 at 10:05 AM Satish Balay <balay at mcs.anl.gov> wrote:
> > >
> > > > please send the corresponding configure.log
> > > >
> > > > Satish
> > > >
> > > > On Thu, 4 Aug 2022, Simon Zhang wrote:
> > > >
> > > > > To whom it may concern,
> > > > >
> > > > > I'm trying to install PETSc on my computer and PETSc is compliant
> > with
> > > > GCC
> > > > > but something keeps going wrong at the compilation step. It's
> > returning
> > > > the
> > > > > following message.
> > > > >
> > > > > PETSc requires c99 compiler! Configure could not determine compatible
> > > > > compiler flag.
> > > > >
> > > > > How can I fix this problem?
> > > > >
> > > > > Thank you,
> > > > > Simon Zhang
> > > > >
> > > >
> > > >
> > >
> >
> >
> 



More information about the petsc-users mailing list