Open mdorier opened 2 years ago
Can you have a look at ./testing/build-pnetcdf.sh file? That shows how pnetcdf can be compiled -> needs to be run in the top-level dir. Arguably, it does set CFLAGS and LDFLAGS. Still I agree, the auto-detection should be fixed.
Indeed, this works:
$ ../configure --with-hdf5 CFLAGS=-I`spack location -i hdf5`/include LDFLAGS="-L`spack location -i hdf5`/lib -lhdf5"
I think it would be a good idea to use pkg-config
to locate dependencies when possible, or to have a way of specifying the path if pkg-config is not an option.
I'm trying to build IOR with some backends. So far I tried HDF5, Parallel NetCDF, and AIO, and I don't manage to compile IOR with any of them.
HDF5
I have the
hdf5
package installed via spack and loaded, with the+mpi
variant.If I do
The configure process runs without any error, however the
make
command fails with this error:If I do
Then IOR simply doesn't compile ior-aiori-HDF5.c and the HDF5 backend isn't available when running IOR. Note that
spack location -i hdf5
correctly gives me the location where HDF5 is installed.The latter seems normal per the configure.ac file, which has
AM_CONDITIONAL([USE_HDF5_AIORI], [test x$with_hdf5 = xyes])
, so it doesn't expect a path, only "yes" or "no" (or just--with-hdf5
) however I don't know why it doesn't find HDF5 when it's loaded.With the former (just passing
--with-hdf5
, I can see this in the log:which corresponds to this in the configure.ac file:
Yes I can confirm with
nm
that the installed hdf5 library does have this symbol, and it's in the headers as well.Parallel NetCDF
I have the
parallel-netcdf
package install via spack and loaded.If I do
The configure command fails with this error:
If I do
The configure command runs fine, but aiori-NCMPI.c is not compiled and the NetCDF backend isn't available to IOR.
Once again, it seems that the configure.ac file is not expecting a path, and even though Parallel NetCDF is installed, IOR does not find it when passing just
--with-ncmpi
.AIO
I have the
libaio
package installed via spack, and loaded.If I do
The configure command runs fine, but the
make
command fails with this error:Once again, if I provide the path to libaio as
--with-aio=...
then configure runs fine but does not compile the AIO backend.