From ecca9abc729df54017ed43d836eacfc6825be29e Mon Sep 17 00:00:00 2001 From: Federico Padua Date: Fri, 3 Mar 2017 01:33:36 +0100 Subject: [PATCH] Ior package: fix build issues (#3276) This commits address build issues reported in issue #3268. In particular, makes cleaner the dependency on parallel-netcdf when +ncmpi variant is requested and adds CFLAGS=-D H5_USE_16_API to handle the fact that Ior uses old 1.6 style APIs when +hdf5 is requested. These changes make Ior build fine and create modules for HDF5 versions 1.8.x and 1.10.0. Even though build is successfull the modules haven't been tested in a run. --- var/spack/repos/builtin/packages/ior/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/ior/package.py b/var/spack/repos/builtin/packages/ior/package.py index b8825c0fe4..04e32d8887 100644 --- a/var/spack/repos/builtin/packages/ior/package.py +++ b/var/spack/repos/builtin/packages/ior/package.py @@ -40,7 +40,7 @@ class Ior(Package): depends_on('mpi') depends_on('hdf5+mpi', when='+hdf5') - depends_on('netcdf+mpi', when='+ncmpi') + depends_on('parallel-netcdf', when='+ncmpi') def install(self, spec, prefix): os.system('./bootstrap') @@ -52,6 +52,7 @@ def install(self, spec, prefix): if '+hdf5' in spec: config_args.append('--with-hdf5') + config_args.append('CFLAGS=-D H5_USE_16_API') else: config_args.append('--without-hdf5')