[petsc-users] Installation error: C++ preprocessor

Satish Balay balay at mcs.anl.gov
Mon May 18 14:33:28 CDT 2015


Can you try using petsc development branch 'master' and see if
it works? It should also add in the c++ compiler to hdf5 configure..

Wrt petsc-3.5 - perhaps the attached patch will work..

Satish

On Mon, 18 May 2015, Gautam Bisht wrote:

> Attached below is the config.log for HDF5.
> 
> -Gautam.
> 
> On Mon, May 18, 2015 at 12:18 PM, Satish Balay <balay at mcs.anl.gov> wrote:
> 
> > On Mon, 18 May 2015, Matthew Knepley wrote:
> >
> > > On Mon, May 18, 2015 at 1:35 PM, Gautam Bisht <gbisht at lbl.gov> wrote:
> > >
> > > > Hi,
> > > >
> > > > While trying to install v3.5.3 with intel 15.0.0 on a linux machine,
> > I'm
> > > > getting an error related to C++ preprocessor. Any help to resolve the
> > issue
> > > > would be greatly appreciated.
> > > >
> > > > Attached below is the logfile.
> > > >
> > >
> > > The HDF5 configure is failing because it says your preprocessor does not
> > > work. We would need
> > > to see
> > >
> > >
> >  /clusterfs/esd/esd2/gbisht/MODELS/petsc3.5.3/lrc-intel-2015-0-090-fort-debug/externalpackages/hdf5-1.8.10-patch1.1/config.log
> >
> > I think the issue is - hdf5 configure is looking for c++ compiler -
> > but PETSc configure is not providing this info to hdf5 configure.
> >
> > Satish
> >
> 
-------------- next part --------------
diff --git a/config/BuildSystem/config/packages/hdf5.py b/config/BuildSystem/config/packages/hdf5.py
index 36ad5ad..944a28a 100644
--- a/config/BuildSystem/config/packages/hdf5.py
+++ b/config/BuildSystem/config/packages/hdf5.py
@@ -40,6 +40,12 @@ class Configure(config.package.Package):
     args.append('CFLAGS="'+self.framework.getCompilerFlags()+'"')
     self.framework.popLanguage()
     args.append('--enable-parallel')
+    if hasattr(self.compilers, 'CXX'):
+      self.framework.pushLanguage('Cxx')
+      args.append('CXX="'+self.framework.getCompiler()+' '+self.framework.getCompilerFlags()+'"')
+      self.framework.popLanguage()
+    else:
+      raise RuntimeError('Error: HDF5 requires C++ compiler. None specified')
     if hasattr(self.compilers, 'FC'):
       self.setCompilers.pushLanguage('FC')
       args.append('--enable-fortran')


More information about the petsc-users mailing list